Slashdot Mirror


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.

21 of 185 comments (clear)

  1. JavaScript... or HTML DOM? by Anonymous Coward · · Score: 2, Interesting

    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.

    1. Re:JavaScript... or HTML DOM? by justforgetme · · Score: 4, Insightful

      I'd like to rephrase Your point a bit:
      Javascript is in the #1 spot because the process of learning js is much more fragmented and because the language usually is utilized inside a browser environment, which complicates the language's behavior even more.

      A lot of people are learning to write js via copy paste tutorials which are distributed via many blogs and forums. Also a lot of people (eg: web designers) get to grips with the language by putting ready to use modules into their HTML pages. Now learning through the Internet is very much feasible, I'm not saying that. The problem from learning in this fashion is that your knowledge is very much fragmented, having usually no specific understanding of the program structure you should target and therefore ending up debugging very obscure problems.

      Javascript is unique in this (followed maybe by php) because for most other languages you have to set up an environment, get to grips with a compiler etc. This usually is seen as an obstacle but because of those prerequisites people usually take learning those other languages much more seriously, reading much more documentation (hardcopy or online).

      So I guess that it really isn't such a big newsitem.

      --
      -- no sig today
    2. Re:JavaScript... or HTML DOM? by man_of_mr_e · · Score: 2

      Yeah, all 3 of them? ;)

      (yes, I know arduino is relatively popular, but it's popular in a relatively unpopular sub-culture)

    3. Re:JavaScript... or HTML DOM? by mwvdlee · · Score: 2

      Perhaps it's because JS developers have to deal with incompatible browsers and wildly different levels of support and a relatively small standard library.
      I've rarely needed more than a good reference manual for C/C++/Java/PHP/etc., but for JS I'm regularly googling (or indeed on StackOverflow) for a solution to dealing with the latest IE incompatibility or finding a way to do something basic that'll work in all browsers I'm trying to support.
      Or perhaps developers of, for example, C# or Java can find their answers without using StackOverflow. My process for searching solution is Google first, StackOverflow second.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    4. Re:JavaScript... or HTML DOM? by bsane · · Score: 3, Interesting

      I'm guess you've never actually used Pascal before? (either that or you've never used C).

      There are some glaring superficial differences between Pascal and C, and thats about it. I've converted 1000s of lines of Pascal to C with very little effort, the structure can stay _exactly_ the same, just fix the blocks and do some standard find/replace. Try converting BASIC to Pascal or C and get back to me.

      Background is similar to GP, learned everything in Pascal, including the old school Mac Toolbox (all Pascal), then one day everything new had to be C, you had to figure it out yourself. Not a big deal though- very similar...

    5. Re:JavaScript... or HTML DOM? by OeLeWaPpErKe · · Score: 2

      Every non-object oriented imperative systems programming language can easily be converted into any other. There are bigger issues in the conversion :

      1) strings. Pascal uses length + value, C uses null-terminated strings
      2) memory allocation is different. C is better though. It would be much harder translating C to pascal imho.
      3) Calling conventions. Though both C and Pascal support mostly any calling convention, hooking one up to the other correctly is a minefield. Although I suppose that's not a problem if you always use either only C or only Pascal.

      I've once seen a genius/total idiot create a series of #defines that allowed BASIC code to be entered in C. It actually mostly worked. I'm sure something similar can be done for pascal ("#define begin {" will actually work). It supported all sorts of strange things, from translating declarations (%i = 0 => int i = 0;). It wasn't even that much code, only about 50 lines.

      C is very versatile, but boilerplate in C rivals that in Java. You can fix that using the preprocessor, but that's also a minefield.

  2. Obvious by whisper_jeff · · Score: 5, Insightful

    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.

    1. Re:Obvious by justforgetme · · Score: 2

      what this means (and what larry bagina points to) is that the rate of clueless (as in: advice needing) individuals from those that use js is much higher than the same rate for other languages.
      roughly that means: the mean js developer/tinkerer is the least knowledgeable developer/tinkerer (accepting that every one person only tinkers with one lang of course)

      --
      -- no sig today
    2. Re:Obvious by man_of_mr_e · · Score: 2

      That assumes that the TIOBE index is accurate, and I have no strong belief that it is. I know that in my area, there are not 3x as many Java jobs as there are C# jobs. In fact, Java has been losing a lot of ground since the Oracle takeover.

      What's more, there's a lot of difference between an Enterprise Java developer, and a mobile Java developer. It'a almost completely different skill sets.

      And certainly, C has lost a lot of popularity in the workplace. It's primarily only used in Unix and Embedded environments these days.

      Do some searches on Dice. If you search for C (it includes C++ in the results) you get roughly the same results as Java, but most of the results say C/C++, so it's hard to know just how much C is actually used.

      However, the biggest disparity is that JavaScript is used by a lot of novices with very little programming background. ie, they are not professional programmers.

  3. Javascript has always been a copy & paste lang by jrumney · · Score: 4, Insightful

    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.

  4. conclusions by bigdavex · · Score: 5, Insightful

    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
  5. a mirror of stack overflow users, nothing else by sick_soul · · Score: 2, Insightful

    "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.

  6. Difficulty or Popularity or Medium Popularity? by gameweld · · Score: 2

    -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!

  7. Most Misunderstood... by SharpFang · · Score: 3

    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
  8. C Programmers by paithuk · · Score: 5, Funny

    All the C programmers are busy over at bufferoverflow.com

  9. Re:Good programmers don't use StackOverflow. by Windwraith · · Score: 2

    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.

  10. Re:Good programmers don't use StackOverflow. by mikael_j · · Score: 3, Insightful

    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
  11. Re:Good programmers don't use StackOverflow. by man_of_mr_e · · Score: 2

    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.

  12. Re:Javascript has always been a copy & paste l by Qzukk · · Score: 2

    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.
  13. Re:Good programmers don't use StackOverflow. by GGardner · · Score: 3, Insightful

    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.

  14. Re:My take on the C figure by Tacvek · · Score: 2

    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