Google Trends allows you to compare the popularity of various search terms. A friend pointed me at this, having put Java into it and noted a "dropping trend". I played around with it for a while, sticking in various language names, and came away with more questions than answers.
How to write stupid conclusions
The obvious but stupid way to write a blog post based upon Google trends would be to look at the graph for
Java, look at the graph for
Lua (a recent scripting language suited to embedding) and spurt out things like, "OMGWTFBBQ LOOK! Java is getting less popular and Lua is getting more popular!". Let's look more carefully at this, though.
The giveaway that we have a bogus conclusion here can be found by taking a look at the list of related news stories to the right. For Java, most of them - all but one at the time of writing - are not about the Java programming language, but instead about an unfortunately disaster-prone Indonesian island. Looking at the ones for Lua are even more telling - none of them are about the programming language, but instead about a football player. Also, spot the correlation of the main graph with the rise in news stories. This makes our analysis of the Lua language becoming hugely more popular based upon this graph bogus. It may be gaining popularity, but we aren't going to learn that from Google Trends.
Finally, plotting them on
the same graph shows that the scales of the two previous graphs were completely different, and that the increase in searches for Lua, even if it they were to be about the programming language, is barely visible once you put the two on the same scale.
Why would people search by language name anyway?
I think the two main reasons people would search for a programming language are:
- They are considering using it or learning it and are looking for resources to help with this
- They are already using it and want help solving a problem or want to learn more
The first of these is indicative of growing interest in a language, and an increasing number of searches may point at that. The second may not be such a good indicator of usage, however. Once you have a number of experienced users, and if the language ships with good documentation, it is possible to have high usage with a relatively low number of people going to search results to find resources. There may well be good resource sites that a lot of developers go to rather than Googling it.
Therefore, it's not completely unreasonable to suggest that a declining number of searches may indicate that a language is retaining its current userbase, but attracting less new users. Therefore its userbase may be remaining relatively constant. Of course, this may not be the case too.
You can make arguments like this all day, but the point I'm trying to make is that you can't necessarily map number of searches onto size of user base and expect to come to correct conclusions.
Disappearing Programmers?
Let's assume that searches tell us something about take-up of a language, even if not overall usage. I did a plot of the
big four dynamic languages (Perl, PHP, Python and Ruby). This showed the Perl and PHP were both being searched for less. However, despite the fanfare about Ruby, with the Rails framework, there is no sign of a proportional increase in searches for Ruby. So where are those that were using Perl and PHP going, if they are declining?
Not Java, it would appear, since that would also appear to be getting less searches.
C# or
.Net? Nope, one is steady and the other shows a slight drop.
In fact, I'm finding it near impossible to find any programming language on Google Trends with a rising trend. Clearly, programmers must be a dying breed, or they are doing less searches, anyway. So what does that mean? If we don't want to believe that less programming is happening overall and just that searches are happening less, then it would suggest that those with declining trends are not declining so steeply, and that those with steady trends are actually rising in usage. There still seems to be something of a gap between the falling and rising. Then, I Am Not A Statistician.
Conclusions
So after an hour of playing with Google Trends, I'm left feeling like the most interesting thing I've learned is that you're more likely to be taking the weekend off if you're a
C# programmer rather than a
C++ one. So there's one reason for me to be happy I'm using C#, anyway.

But in all seriousness, I'm very much left with the feeling that the Google Trends data is probably not especially useful for trying to get an idea of relative programming language usage. Now, is it the weekend yet?