Is Linq having a mind-numbing effect on .NET programmers

netprogramming practices

A lot of us started seeing this phenomenon with jQuery about a year ago when people started asking how to do absolutely insane things like retrieve the query string with jQuery. The difference between the library (jQuery) and the language (JavaScript) is apparently lost on many programmers, and results in a lot of inappropriate, convoluted code being written where it is not necessary.

Maybe it's just my imagination, but I swear I'm starting to see an uptick in the number of questions where people are asking to do similarly insane things with Linq, like find ranges in a sorted array. I can't get over how thoroughly inappropriate the Linq extensions are for solving that problem, but more importantly the fact that the author just assumed that the ideal solution would involve Linq without actually thinking about it (as far as I can tell). It seems that we are repeating history, breeding a new generation of .NET programmers who can't tell the difference between the language (C#/VB.NET) and the library (Linq).

What is responsible for this phenomenon? Is it just hype? Magpie tendencies? Has Linq picked up a reputation as a form of magic, where instead of actually writing code you just have to utter the right incantation? I'm hardly satisfied with those explanations but I can't really think of anything else.

More importantly, is it really a problem, and if so, what's the best way to help enlighten these people?

Best Answer

It's basically because programming is fundamentally difficult. It requires a lot of logical, structured thought in a way that a lot of people just don't know how to do. (Or simply can't do, depending on who you listen to.)

Stuff like LINQ and jQuery makes certain common data-manipulation tasks a whole lot easier. That's great for those of us who know what we're doing, but the unfortunate side effect is that it lowers the bar. It makes it easier for people who have no idea what they're doing to start writing code and make things work. And then when they run into reality, and find something fundamentally difficult that their simple, high-abstraction-level techniques are not well suited to, they're lost, because they don't understand the platform that their library is built upon.

Your question is sort of on the right track, but much like the perennial controversy about violent video games "turning kids violent," it has the direction of the link backwards. Easy programming techniques don't make programmers stupid; they just attract stupid people to programming. And there's really not much you can do about it.