The Programming Language with the Happiest Users

Which languages make programmers the happiest? It’s clear that some languages are more popular than others, and many of us debate long and hard over the relative merits of Python vs Ruby, C vs Java or Lisp vs everything else. But what’s the general consensus?

I decided to do a little market research. I scraped the top 150 most recent tweets on Twitter for the query “X language” where X was one of {COBOL, Ruby, Fortran, Python, Visual Basic, Perl, Java, Haskell, Lisp, C}.

Then I asked three people on Amazon Mechanical Turk to verify that the tweet was on the topic. If so, I asked if the tweet seemed positive, negative or neutral. You can try the task for yourself at http://crowdflower.com/judgments/mob/592.

Whenever you judge sentiment, there are lots of tricky cases. The tweet, interesting idea and a new cool language, unlike old boring Lisp:), seems negative towards Lisp, but the emoticon makes me think that the person may actually like Lisp. The tweet, Lisp … remains an influential language in “key algorithmic techniques such as recursion and condescension” could be construed as positive towards Lisp, but could also be construed as negative.

On the other hand, many tweets are very clear, such as, Once again I find myself battling with Haskell. Why oh why create such a language? or The more I learn about Haskell, the more impressed I am with the language. Nothing like intentional infinite recursion, mind = blown.

Without further ado, here are the results:

I am not surprised that COBOL was the least favorite, but I am somewhat surprised that Perl was the favorite. Sifting through the data, unlike other languages, there seem to be a surprising number of people that just felt like giving Perl shoutouts. More than other languages it has tweets like My favorite scripting language is Perl, which I can do in Linux, but right now, I need powershell. or I seriously love perl. Is there any better research language? truly?.

Clearly there are a million caveats. Are Perl or Lisp users happier people in general? Are the tweets ever from users? How do the people using Twitter differ from the population at large. And perhaps the particular day we scraped had an effect.


Notes:

  • There’s a great website langpop.com that does some nice analysis of relative language popularity.
  • The “C” query combines C++, objective-C, C and C#. It would be nice to split this out in future work.

Updates:

Just to answer a couple criticisms — C, C++, etc. were combined not because I don’t consider them to be completely different languages, but because it was difficult to search for just C or C++ or C#. I thought about taking it out completely, but figured why not show the data. I left out php because it was matching tons of webpages like example.com/home.php. I should have included JavaScript. For the record, the language I use the most these days is probably R, which I also forgot to include :).

I think most of the criticisms about the validity of the data are reasonable. What we try to do with these blog posts is not peer reviewed science, but quick and dirty data exploration (see our blog’s manifesto: http://blog.doloreslabs.com/2008/03/the-manifesto/). I am not trying to imply that any language is better than any other language, just to get a rough measure of the sentiment out there on Twitter.

84 Responses to “The Programming Language with the Happiest Users”

  1. Isaac Gouy

    > the Happiest Users

    How did you establish that the authors of the comments actually were /users/ of the language rather than uninformed gossips?

  2. gvb

    Thanks for a thought provoking post and going through the effort of generating the statistics.

    It would also be good to know how many tweets of each language were considered. If two people liked perl and one didn’t, that would be 67% favorable, but the margin of error would be pretty large.

  3. uh

    Why did you leave out PHP and Javascript, perhaps the most popular languages in use on the web today…?

  4. Ben

    Ignorance is bliss…and yes I’m implying perl programmers are ignorant ;)

  5. Todd

    Yeah what’s up with no PHP ? Crawl out of your cave man and take a look around

  6. Rob

    > Ignorance is bliss…and yes I’m implying perl programmers are ignorant ;)

    *sigh*, Ruby/Python/Java fanboyism ;)

    Perl is great, and stands on its own merits… that’s all I’ll say

  7. Bill the Lizard

    Measuring true happiness is a tricky thing. People tend to seek validation from others, even (particularly?) when they’re unhappy or unsure of their own choices. You could do the same research with members of extremist religious cults, but I’d be skeptical of your results.

    Still, it’s an interesting idea, I’m just unsure of the measurement. (Of course, confirmation bias could easily explain my skepticism. :))

  8. jd

    The “C” query combines C++, objective-C, C and C#. It would be nice to split this out in future work.

    Please do that. I would expect major differences, like C getting 10% and C# 50%.

  9. Brenda

    would be great to see php on there, as there’s much cross over with ruby and perl, and perhaps even python.

  10. kaelin

    I’m pretty darn happy with PHP… I don’t bother writing about it on Twitter, though.

    I love JavaScript as well, or actually ECMA Script since I also write ActionScript.

  11. BruceA

    At my current job I’m using .net, but Perl will always be my first love as a programming language. Still, I’m surprised to see Perl rated so high.

    OTOH, I wonder how much of the negatives for Python and Ruby is from users dissing each other’s language. Ditto for C# and Java.

    Like many other commenters, I’d like to see PHP and JavaScript rated. I’d guess that they might have high negatives because their ubiquity and ease of use has brought them a lot of detractors.

  12. parv

    For some reason, I was expecting for COBOL to be in list, being the one with least number of happy users. I personally don’t have any beef, as I haven’t used it, or read|debug code of any significance. It seemed to be just as verbose as Java.

    My Perly happiness was perturbed by the listing of Java after Ruby|Python. I was hoping that the trend would be otherwise.

    Given that “C” contained many other languages, really don’t care about the experiment anymore.

  13. Mark

    Perl rocks, it is true. Python may be neater and more sterile, and great for academic-type problems, but the world can be a messy place. Perl makes dealing with the actual real world easy and natural.

    On the other hand, Larry Wall is a faith-head. Not exactly something to be proud of.

  14. ian

    those 17 perl programmers left in the world are sure glad your data isn’t normalised

  15. Federico

    Oh yeah, Perl/PHP/Python! 15 years of happiness :) Lisp? Haha, yeah right!

  16. stefanve

    Maybe because the people still programming in Lisp en Perl are the ones that mastered the langues and once you truly master something you love it.

  17. Philip

    Perl provides plenty of freedom – to write good or bad code – but this makes it more fun. Who wants to program in a straightjacket?

  18. Adam

    Very cool!

    Maybe you could rephrase the chart by having the bars go left and right from 50% positive sentiment? Shouldn’t there be more ink spent on the good and the bad, rather than just the top performers?

  19. Manuel

    Perl gives you a lot of freedom – to make huge mistakes, frequently enough, but once you truly master it, you can be incredibly productive and expressive in your code. Most senior Perl people I know have also mastered other languages… and know when to use each of them, but return to perl because they can do whatever the hell they want with minimum constraints – the gun is loaded, the safety is off, but if you truly know what you’re doing… bliss.

  20. W

    Nice graphs, but I would love to know more on how you sorted out your data. Sarcasm can be a difficult thing to parse. I’d also be interested in the size of the datasets.

  21. Alexandr Ciornii

    “Amusing result for people who like bashing my favourite language… when i google for “Weird perl problem”, i get back 1,880,000 results… could be bad… except that ruby (2,000,000), python (2,030,000) and php (3,490,000) seem to be doing worse. perl may have weird bits in it, but it seems to have less than the competition… :)”
    (c) ddick

    Also see Perl programming usage statistics

  22. Arunn

    Well – interesting research. I agree with the first comment though – it is hard to establish that these are actually users of that particular language.

    I myself follow a lot of programming language tweets, and most of the negative tweets are from non-users of any language.

  23. Richard Brannigan

    Ever Perl expert I’ve ever met has been ornery as hell. I’m calling 1-800-SHENNANIGANS on this report. Maybe those tweets said something along the lines of “I’m so happy that I’m not maintaining any Perl flavored spaghetti anymore!”

  24. hegemaro

    Admittedly I am frightfully biased but, I would argue that C, COBOL, and Fortran are really the only programming languages that actually require some skill in programming. The others can be learned from a book, the results of which are usually painfully obvious.

  25. Bobo the Sperm Whale

    What you need is a sarcasm detector.

    *ducks*

  26. shelfoo

    Interesting post. It always makes me laugh to see the perl bashing anytime that anybody says anything nice about it.

    Perl can be a really clean, easy to maintain language. The problem is similar to javascript imho, when CGI first came around, there were far too many companies pushing perl as fast as they could for any solution. Too few people knew it well, and the code that resulted is certainly spaghetti. Same thing with javascript, too many people writing poor/browser specific javascript gave it a really bad name.

    Both languages (ok, any language) can be written really cleanly, and I do believe that people that are hacking perl *now* are doing it because they like it, and it reflects in these results.

    Speaking as a perl developer that codes java.

  27. FatDave

    Perl does what you want it to, gives you choices on how to do it (quick and dirty script, full-blown OO application, or anything in-between) and the language doesn’t get in the way of the programming. I think that goes a long way to explain the results. People are happy with a language that lets them get the job done in the way they choose.

  28. Stephanie

    It is almost time for a meta sentiment analysis test on our collection of comments. ;)

    Thanks for all of your spirited replies!

  29. Jay Kuri

    It’s pretty normal, actually – People often wonder to themselves (whether they admit it or not) ‘did I make the wrong choice?’ (in this case in which language to learn) and so when they are presented with data that indicates that they might have, they get angry and resentful. Outwardly at the data (or the source), but ultimately it’s really at their situation and the result of the decision they made.

    Perl users can be guilty of this as well… though in my experience, the stress in the Perl programmers life is less ‘boy, I find this language frustrating, I wonder if I should have learned something else’ and more often related to ‘how can I make person X realize how great this language really is.’

    That is when they aren’t busy getting things done. ;-)

  30. mark

    Perl is great.

    If aliens arrive on planet earth, they will never find out what is going on. Thus, perl is a weapon against aliens.

    Perl is like the C++ of scripting languages, and this statistic proves that people on Twitter do like aliens.

  31. VAM

    Where are the dynamic languages and other popular langs:

    PHP
    Groovy
    JavaScript
    C#
    Scala
    Erlang

    your list itself is bias

  32. Sean

    It’s a decent list (kinda lame, but whatever), but it would be great if you could separate C, C++ and C#.

  33. Robbie

    I’m just wondering how C, COBOL, and Fortran are learnt if not from books; divine intervention, perhaps?

  34. florin

    Dude! PHP is not a language. It’s a spaghetti ingredient that takes semantic CSS as the sauce and is adorned with graphical toppings. It looks good, tastes good yet it gets really messy to stuff your face. Yuk.

  35. Moof

    PHP is a bamboo raft. A series of hacks held together by string. Still keeps afloat though.

    ;-)

  36. Adam

    I’m paid to work with ABAP (a proprietary extension of COBOL), Java and Perl.

    Of the three I much prefer Perl, mostly because I’ve used it the most. Next I like ABAP, it’s strange and limited but with the narrow confines of SAP it’s not bad. Finally there is Java which is a straight jacket that makes you work twice as hard to get half as much done….

    Over time I may grow to know Java more and learn to not hate it…

    I can’t help feel that it’s awfully personal and more to do with lots of factors not specific to the language. In my case the language I use the least is my least favourite and my favourite is the one I’ve used for the longest…

  37. m

    That question is more or less like asking why did you fall in love with a particular person. You can’t count languages required for use by an employer, unless you are the boss. If you haven’t really learned a significant number of languages you opinion doesn’t count. If you are just doing one night (or one semester) stands, your opinion doesn’t count. If you haven’t been around long enough to get over “Baby Duckling” syndrome your opinion doesn’t have any meaning at all. If your mother was bitten by a buggy compiler while she was carrying you, that opinion doesn’t count. There are now some 10,000 languages floating around, most of which are probably too obsolete to run on an emulator’s emulator.

    Languages have morphed so much that most of their original progenitors wouldn’t recognize them. So the real question is better put as which are the worst languages around.

  38. trey

    I didn’t realize how much I loved Perl until I had to write Java for a year. Coding in Perl is like cutting thin balsa wood with a brand new razor blade. Coding in java is like cutting through 2” oak with a cheap dull handsaw.

  39. name

    I wonder how many of those tweets are by proffesionals rather than random people trying to code.

  40. name

    C should rocket up without C++ and C# weighing it down

  41. chris

    These results can only be considered seriously, when people have seen the candidates’ syntax and semantics and coded with it a little. But that’s not possible. Next thing is that every language is constructed or useful for a certain domain or problem. I, personally, would never take Java for a web project, but instead PHP, Ruby, Python etc. They would make me happier. In contrast Java would make me happier in other domains.

    Cheers,
    Chris

  42. attila lendvai

    this is hopelessly unrepresentative, because it’s only about the people who use twitter. this is typically how politicians bend the facts…

    no offense though! just start the entire article with a thought like this, making *only* and *twitter* bold in the first sentence…

  43. KIngrd

    C, C++, C# and Objective C are four very different languages,
    combining them invalidates all data, Thus Your results are totally irrelevant.

  44. kordaff

    *tweet* PERL *tweet* PERL *tweet*

    ok now i’m a PERL twittering whore… i feel so used!

    JAPTH

  45. I fish the web

    What about languages like objective C and php? I guess you chose an interesting data set – measure twitter users who have expressed sentiment about a particular language. After looking through the graph above, my thoughts as to what would make a programmer happy? choices – when the majority cant seem to understand it and have to ask for help or pay maintenance or a feeling of self satisfaction of a working application. But a working application is a working application, which is by far a satisfying thing in itself, regardless of the language in use. That said, twitter itself has migrated to scala, and they aren ot using any of the languages mentioned here..

  46. igrg

    Hmmm.. very surprised at Python. I expected it to be at the top!
    I grok anything that’s Python/R/Java/C#/C++ so really happy to _any_ of them :”)

    identi.ca has R group if you guys wanna join ;)

  47. iamtheschmitzer

    What exactly are we measuring?

    Passionate flame wars will lead to a 50% rating (see Python and Ruby).

    Won’t indifference lead to the extremes (Lisp, Perl, COBOL)?

    I can’t explain Fortran though :)

  48. Aidan

    Although I am admittedly a Java/Ruby/Python fan myself, it makes sense that these would rank lower than older languages (i.e. Perl or Lisp), because they are being used much more actively nowadays. The majority of people still writing things in Perl have probably been using it for a long long time, so it would make sense that they would be comfortable with it and would have gotten their gripes out when Perl was new, long before the advent of Twitter.

    This “study” is far from scientific, so it’s not worth everyone taking the results so seriously.

  49. Charlie

    @luisx: Ruby (on Rails) ;)

    by the way, i don’t find this post interesting, since I use PHP, javascript most of time :S

  50. Gianluca

    I use Perl and I think is a very nice language. At first it may seem a little bit complicated but when you got it you feel that is powerful, that it doesn’t constraint you like other languages and is very funny.

  51. ak1010

    perl is highest because any complex code can be written in 140 char limit :-)

  52. Daniel Weinreb

    It would be interesting to see the denominators as well as the ratios. For each language, how many tweets were seen?

    I enjoyed the result since I’m a Lisp enthusiast. In fact, I was general chair of the International Lisp Conference 2009 last spring (ilc09.org). But for the reasons you yourself point out, it’s hard to draw serious conclusions from this research, even though it’s a lot of fun. Thanks very much!

  53. Cliff Wells

    Using Twitter to gather data about programming languages is somewhat akin to polling people at Walmart about their favorite philosopher. They might have one, but I suspect their choices will say far more about the chosen forum and participants than it does the philosopher.

    Perhaps the title should have been “Scientists discover life at bottom of landfill”.

  54. Paul Kooros

    I am primarily a Perl programmer, and super-happy with it. I use and love PHP, Python, R/Splus, Java, JavaScript, C++, C (and even x86 assembly) too, but Perl is the one that gives me that Kung-Fu “Huwwaaa Yah!” feeling of power.

    There is something to be said about the correlation of how long you’ve been using a language and how happy you are with it. Perl has been around for 21 years (14 in a mature form), and has a steady, broad user base, so that might help it. Guido (of Python) states that a principal mission of the language’s design is to be satisfying to program in. Most net-developed languages we have seen have been responsive to their shortcomings, and have significantly matured. Perl has a natural advantage, having had a longer time to mature (in a vibrant and responsive development environment), and indeed was the early open-source petri dish for experimenting with many cool language features that have migrated in to many other languages, like PCRE and embeddability.

    There are many criticisms of Perl (“Too complex”, “Too Unix-paradigmy”, “Too cryptic and quirky”), and there is some truth to these. Perl is very large (operators, functions and notation from C, C++, awk, Fortran, Pascal, lisp, Algol, Bourne/C shell, etc.), it has typing-saving shortcuts (cryptifying it), and is not “TSA” child-safe, but once you really know it well (and follow basic best practices), you have a big Harry Potter’s magic bag full of tools to apply to a huge domain of problems.

    My programming happiness thus, is like any American man’s visceral satisfaction and happiness with his garage full of tools (more=better), able to attack any mechanical or home improvement problem (read and follow all safety procedures!) with Crouching Tiger Hidden Dragon -ability. Hhuwwaaaa Yah! :-)

  55. Sammy

    Currently I program in Perl, PHP, Javascript, Labview. In the past, I have programmed in VHDL,Verilog,C and C++.

    Perl is the most humane and most powerful of these languages. It has never failed me.

  56. Scott L. Burson

    How interesting that the top two are Perl and Lisp. These languages are in many ways very different — as a Lisp aficionado, I find Perl is the language I most love to hate, and of course lots of people love to hate Lisp :-) But they do have one element of their design philosophies in common, which is that both believe firmly in empowering the programmer: making it as easy as possible to implement the desired functionality, without trying to force any particular structure on the code. In a way it stands to reason that they would come out on top in this little experiment.

  57. Mrs Ada Lovelace

    Hi, you forgot my language,
    ADA is my preferred programming language…

    and what about intercal or brainf*ck ?

    And also, object oriented cobol ? (i.e. ADD 1 TO COBOL) ?

    Ada Lovelace, countess and programmer

  58. Brent Longborough

    Do you think that being a Twitter user might distort the population a bit? (As in “If you like Java, you are likely to have a tendency to Twitter…”, for instance.)

    But thanks for an interesting insight.

  59. Thijs Blaauw

    I would like to see the absolute numbers. Like LISP 60 tweets, 40 positive, 20 negative. (This is just an example)

  60. circuit_breaker

    I’d really like to see a poll taken. Sampling twitter is inherently biased, a lot of people don’t care to use it.

    For the record, I prefer perl. nothing else allows me to be as expressive and achieve such an amazing density of function per line.

  61. jaslene

    It is taught online with help of different technologies such as, speech aided tutoring packages and digital white board services. Programming languages packages are provided, also different study materials can be downloaded. The person learning a specific field such as Java, can get to work how to impress a girl with different programs online, with aided help from different experts. There are instruction videos on how to use a specific application and program it, which is a great help for people who can get confused.

  62. perllover

    I have been a software developer for over 20 years. I have written in many, many languages over those years. Perl stand out to me as the most concise language and I use it almost exclusively now, unless I need to optimize, and then of course it is C. If you are going to jump to object oriented languages, why not use the most concise? Larry Wall is a genius. You may be surprised to find how many things in so many other languages have been influenced by perl.

  63. NaveeN Kumar S

    Perl programmers can expect Perl to do what you mean
    [do what I mean]
    I Love Perl than any thing.