import_that: XKCD guy flying with Python (Default)
[personal profile] import_that
What's the most popular programming language in the world? Or at least those parts of the English-speaking world which are easily found on the Internet? C, C++, Java, PHP, Javascript, VB? Is Python on the rise on in decline? How do we know?

There are a few websites which make the attempt to measure programming language popularity, for some definition of "popularity". Since they all have different methods of measuring popularity, and choose different proxies to measure (things like the number of job ads or the number of on-line tutorials for a language), they give different results — sometimes quite radically different, which is a strong indicator that even if language popularity has a single objective definition (and it probably doesn't) none of these methods are measuring it.

So keeping in mind that any discussion of language popularity should be taken with a considerable pinch of salt, let's have a look at four well-known sites that try to measure popularity.

TIOBE



The first, and oldest, language popularity site is probably the TIOBE Index. TIOBE is probably the most inclusive site, listing 100 different languages. TIOBE don't make their source code available, but they describe in detail how it works. Their raw data is not freely available, although you can purchase it going back to 2001. They also show the very long term history of ten languages, including Python, going back to 1989. (It isn't clear to me how they know what the rankings of languages were back in 1989 if they only started collecting data in 2001. Perhaps they borrowed Guido's time machine.)

In February 2014, TIOBE shows Python as falling in popularity over the preceding 12 months, something which many people are attributing to Python 3, but Java, PHP, C++ and Ruby are also falling, and none of them are going through a major version change.

Langpop.com



Langpop.com tries to distinguish languages people are actually using from those that people are talking about. It gathers data from various sources, including Github, Google, Reddit and Craigslist, and allow you to change the weight of each source. They don't make their source code or raw data available, but do describe their basic method. At the time of writing this, Langpop.com hasn't been updated since October 2013, with Python at number 6 out of 42 languages, below C, Java, PHP, Javascript and C++. However, Python is the second-most talked about language, behind only Java. (Apparently Java users like to talk about their language even more than Python users do. Or perhaps they're complaining?)

One indication that Langpop.com's results may be more idiosyncratic than accurate is that it includes Brainfuck in the top 40.

PyPL



The PYPL PopularitY of Programming Language index uses Google Trends. They describe the method used, but as it appears to be a manual process involving Excel, they don't provide source code. PyPL only tracks ten languages, and in February 2014 Python is third on the list behind Java and PHP, and the only one that had increased its ranking over the previous twelve months. (Three other languages, Javascript, Objective-C and Ruby, also trended positive, but not enough to increase their rank.)

CodeEval



CodeEval doesn't attempt to measure the popularity of languages over the entire Internet. Instead, they track the languages used by their own users, collected from thousands of programming challenges and tests. For the third year in a row, CodeEval has found that out of 18 supported languages, Python is more popular than Java, C++, C, PHP and Javascript, and in fact is more popular than Java, C and PHP together.



I think it is interesting to compare and contrast these different ways of measuring popularity, but then I'm a statistics wonk and I find even flawed statistics interesting. Remember that there is no one true definition of popularity, even if there were there is no accurate way of measuring it, and all of the sites that claim to do so are actually measuring subtley different things. Consequently, depending on how you measure popularity, you might conclude any of:

  • Python is the eighth most popular language, and falling slowly;

  • Python is the sixth most popular language;

  • Python is the second most talked about language;

  • Python is the third most popular language, and rising rapidly;

  • Python is by far the most popular language.



All of which are true, for a certain definition of "true", but none of which are the whole truth. All these sites give a useful perspective into some aspects of popularity, and they all show that Python's mind-set in the wider programming community is quite healthy. Despite a certainly amount of FUD out there on the Internet, Python is doing well and is not in any danger of being abandoned or becoming obsolete.

There are wider issues here than the accuracy of these popularity websites. It often happens that somebody notices that Python has fallen in its ranking on some site, or merely isn't rising enough, and they become convinced that Something Must Be Done lest the community of Python users suddenly abandon the language for Ruby or Javascript.

But, chasing popularity for its own sake is a waste of time. What makes Python Python is not just the syntax and standard library, but also the culture -- the Python community has neither the stultifying and toxic culture of "Java shops", nor the wild-west anything goes of cowboy PHP developers, but something unique. (As are other languages, of course. Perl culture is not Haskell culture is not Erlang culture.) In part, people take up languages because they like the culture. Python will never attract the corporate suits who like the Java philosophy, nor will it attract the cowboy web developers who like the PHP way of doing things. Should the Python community try to ape PHP or Java to attract the cowboys or suits? Or should we continue to make Python the best language that we like, regardless of what other people prefer?

Ultimately, apart from winning pissing contests on Slashdot and Reddit, what does it matter if Python is third most popular or ninth most popular? Its not a popularity context where the winner takes all. According to TIOBE, the most popular language, C, has less than 20% share of language popularity (whatever that means in the real world). If you think Python is a failure because it is in position 8, what does that make Javascript in position 9?

Update: I've added two more sites here.

An earlier version of this post appeared here.

Profile

import_that: XKCD guy flying with Python (Default)
Steven D'Aprano

May 2015

S M T W T F S
     12
345678 9
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags