Analyzing StackOverflow Users' Programming Language Leanings
AlexDomo writes to point out this statistical breakdown of the programming languages represented at StackOverflow. "Suprisingly, JavaScript turned out to be the most 'over-represented' language on StackOverflow, by quite a long way at 294% [where "a representation of 100% means that the SO tag count is aligned exactly with the TIOBE language index"]. Could this also be because programming JavaScript is generally quite difficult and will result in people seeking help more often? Following this was C# (which I had expected to be number 1), at 153%. After this, PHP, Ruby and Python were basically fairly balanced at around 100%. The most 'under-represented' major language would definitely be C at 11%. Three other major languages which seemed to be a bit under-represented, below 50%, were C++, Java and Objective-C. For details of the method used and the full results, refer to the original article." One of the attached comments makes an interesting point about the difficulty in divining meaning from such statistics, though.
JavaScript is most often used for client-side web scripting. I imagine a lot of javascript tagged stackoverflow questions are related to figuring out the HTML DOM, which can be confusing, or trying to figure out browser quirks, jQuery syntax, etc
On the other end, I don't know anyone personally who is in the process of learning C. Everyone I know who uses it are old C hackers who have years and years of experience, and aren't likely to need to ask many questions about it.
The reason Javascript is the most popular is obvious (to me at least): the web is based primarily on three languages - HTML, CSS, and Javascript. With those three, one can do most of what they want with a website. More advanced languages are for more advanced applications. Now, when some geek-lite decides they want to make a website, as many people now toy with, they are going to learn what? The advanced languages or HTML, CSS, and Javascript?
Javascript is the most common not because it's the most difficult. It's the most common because it's the most sought after. Supply - Demand.
Seems obvious to me.
I wouldn't say Javascript is a particularly difficult language to program, but there is a huge variation in the skill sets of people developing in it, with a heavy bias towards those who couldn't write an original line of code to save their ass. This is the type of programmer who will flood message boards with requests for help with trivial little problems.
JavaScript is something a newbie might want to try out. Newbies ask more questions.
I don't think that's a reflection on the difficulty of JavaScript.
-Dave
"Suprisingly, JavaScript turned out to be the most 'over-represented' language on StackOverflow, [...]
Could this also be because programming JavaScript is generally quite difficult and will result in people seeking help more often?
I think that JavaScript is also used by people that do not understand it very well, and they are more likely to resort to the kind of help that this website provides.
Following this was C# (which I had expected to be number 1), at 153%. After this, PHP, Ruby and Python were basically fairly balanced at around 100%. The most 'under-represented' major language would definitely be C at 11%.
I am a C programmer and do not need help from this "stack overflow" web site.
My references are the C programming language standards and the single UNIX specification.
-Do we ask questions because of difficulty or because the underlying technology is more popular?
-Are javascript developers more likely to use sites like stackoverflow vs traditional means (books, mailing list, forums, etc).
-Do we underestimate javascript usage? Does javascript span more projects, i.e. I have a C# based web-project, but still use javascript for the UI.
These are the underlying questions that would have to be answered before we could derive anything from this sort of analysis. That said, in our recent study of stackoverflow questions (publication pending), we found that there was a strong correlation between the frequency of using a particular API class (as defined by google code search), and the numbers of questions asking about those classes. This could suggest questions have a large popularity component, or it could mean people are more likely to run into difficulty with popular components!
Javascript is - according to its author - the most misunderstood programming language in the world. While it bears surface similarity to languages like C and Java, and allows you for simple programs to be similar in structure to these, its core design is much closer to LISP (and the syntax quite efficiently obscures/hides that), and so few people truly understand it... so questions are very frequent.
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
All the C programmers are busy over at bufferoverflow.com
I don't disagree with your post, however, many good programmers start out as "shitty" programmers.
That's simply because not everyone has the background or know-how to get into a "code mentality" right away, and asking stupid questions is a good way to learn (specially if you realize that your question was, indeed, stupid).
I don't think reputation points and badges are worth anything though, but that's me. Still, you can see a incredible amount of really good, informative and "stimulating"** answers posted to not-so-smart questions.
**Stimulating as in some kind of answer that makes you want to try alternate ways to reach your goal. the kind of thing that makes you fire up your IDE/text editor to hack, right away.
Virtually all of the questions asked there can be answered by doing the following:
1) Reading the documentation of the programming language, library or software in question.
2) Having even a basic level of skill with the technology in question.
A big problem with this is that when "the library" is "All of the .NET framework" just going through the docs isn't always as easy as it seems. And even if you do find what you think is the right parts of it to use you can find yourself confused right up to the point where you ask a question on StackOverflow and someone helpfully points out that .NET actually has multiple implementations of what you want to do and that the obvious one is rarely the right one. Not to mention actual honest-to-god bugs and implementation quirks that aren't mentioned in the official docs (sure, you can search all of MSDN and hope to stumble across some MS advisory that explains a workaround but even then you might find it is overly specific, if you find it at all).
As for JavaScript there are definitely a lot of beginners out there trying to use it. There is also the issue of JavaScript being frequently used with (X)HTML, CSS and some web service that it fetches data from. Couple this with a lot of the information about JavaScript out there being wrong or outdated and it isn't really that strange that a lot of developers who would normally mainly work in say, Java, C# or Python, find themselves confused and facing conflicting information on how to solve a seemingly strange problem. JavaScript as implemented by various browsers also has a few oddities (both in terms of differing implementations and plain WTFs that are bound to baffle developers unfamiliar with it).
Greylisting is to SMTP as NAT is to IPv4
While certainly, there are a large number of questions that could easily be solved by googling, many questions are more subtle or deal with issues that are not well documented.
Particularly in technologies that change quickly, there is a huge need for this kind of site. One problem with googling information that changes quickly (for example, Linux) is that information that's out there quickly gets out of date, and people spend hours trying to solve their problems with inaccurate how-to's and man pages. Asking a question gets you more up-to-date information from people that know what they're doing, and it becomes a self-documenting system.
StackOverflow has become the primary location to go to search for programming issues you're dealing with, because unlike google, it doesn't contain extraneous results, spam, and things non-programming related.
If you need web hosting, you could do worse than here
there is a huge variation in the skill sets of people developing in it, with a heavy bias towards those who couldn't write an original line of code to save their ass.
That, combined with the fact that the internet is flooded with ancient javascript snippets ripe for copying and pasting despite the fact that they don't work on anything but netscape 4.
If I have been able to see further than others, it is because I bought a pair of binoculars.
Virtually all of the questions asked there can be answered by doing the following: 1) Reading the documentation of the programming language, library or software in question.
This is one reason there are so many JavaScript (perhaps actually DOM) questions -- where is the documentation to answer questions like "how do I do x, across every major browser versions which didn't really follow standards well"? If I'm programming in, say, Java or C++ with some framework where I control more of the environment, I can go to one place to answer questions, but there's no one definitive source for these cross browser problems.
C is only particularly dangerous when inexperienced developers just jump in and start writing code without having more experienced developers review what they wrote. The inexperienced developers have not yet developed good practices to ensure they don't overflow a buffer. Similarly they don't understand ownership of allocated memory, so they end up either freeing memory owned by other code, or failing to free memory when ownership is passed to their code.
If experienced developers carefully reviewed the code, these sorts of problems would be noticed and corrected, and things are fine. Unfortunately, real code review is somewhat rare in the business world, as are static analyzers that would also tend to catch many of these same mistakes. If you properly implement safeguards C can be a fine language, (although admittedly I'm a bit partial to C++ myself as a "low-level" language, despite its many, many flaws).
For a high level statically typed language, I actually prefer C# as a language over Java, although C#'s strong ties to Microsoft are admittedly a negative. They are rather similar languages, each with their own flaws, but I like that C# sometimes adds some syntactic shortcuts for common patterns, while Java absolutely refuses to even consider many syntax-only changes, and when they do add one, like anonymous classes, they feel half-baked.[1]
[1] Anonymous classes must be inner classes, they do not provide the option of being static nested classes which I find to be far more useful than inner classes. They are also not full closures, which are (were?) planned for java 7, which would (will?) end up making anonymous classes feel largely obsolete. (Although in Java's Defense, I'll admit that C# made a similar mistake with the anonymous methods, which really are entirely obsoleted by the newer lambda expressions. On the other hand, C#'s anonymous methods were in fact full blown closures.)
Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524