Ruby Book Sales Surpass Python

I was just looking at our BookScan data mart to update a reporter on Java vs. C# adoption. (The answer to his query: in the last twelve weeks, Java book sales are off 4% vs. the same period last year, while C# book sales are up 16%.) While I was looking at the data, though, I noticed something perhaps more newsworthy: in the same period, Ruby book sales surpassed Python book sales for the first time. Python is up 20% vs. the same period last year, but Ruby is up 1552%! (Perl is down 3%.) Perl is still the most commonly used of the three languages, at least according to book sales, but Python and now Ruby are narrowing the gap.

Here are the trend graphs for books on ruby and python, respectively.

ruby.gif
python.gif

(Note that the scale on the two graphs is not identical, and that the graphs show two years of data, while it’s only recently that ruby has taken the lead. Note also that the downturn at the end of each graph is an artifact of the Thanksgiving holiday in the US. Book sales take a steep dive that week every year, and recover the following week.)

When I sent this tidbit around to our editors list, Jonathan Gennick remarked:

Largely due to Rails, I’d bet. Interestingly, I just happen to have
been talking today to David Ascher and others about Python web
frameworks. I get the idea that there is much (or at least some)
wailing and gnashing of teeth in the Python camp over the ascendency
of Ruby due to Rails. TurboGears and Django are two frameworks I’m
starting to learn about, but I don’t know that either of those is
truly an answer to what Ruby has in Rails.

Rob Orsini replied:

A friend of mine, Ben Bangert, is working with Ian Bicking on a direct port of Rails to Python called Pylons. They’ve chosen all the best of breed components from the Python world for Pylons.

Ruby on Rails is indeed, as Jonathan suggests, the driver of the interest in Ruby, which, after all, has been around for years without generating the kind of surge it’s seen in the past six months. But as you can see, we’re on the fence about whether or not Python has an answer to RoR (and we’re not even asking the question about Perl!) What do you think? Will Python hackers come up with something as good or better?

P.S. Added some other trend graphs in comments, but it looks like MT doesn’t allow images in comments, so I’ll add it all here in the body of the entry.

Don, you asked for numbers on PHP. I’m sure others would like to see the same for Perl, and the year on year graphs for Java and C#, and I realized I should show Javascript as well, since it’s seen a huge jump due to the AJAX buzz. So here are the rest of the graphs. Note that we get a new week’s data synced in every Wednesday, so these graphs show the post-Thanksgiving rebound I mentioned yesterday. And remember, they aren’t all to the same scale.

Here’s PHP. Still the largest of the “scripting” languages in terms of book sales (about 3x Ruby and Python), book sales have had a gradual downward trend over the past two years, but with the last twelve week period pretty much flat with the same period last year:

Here’s Perl. Bill — you noted that the newness of books can skew the data, and you’re right. Look at the June/July bump in Perl when O’Reilly published a number of new Perl books. But note that it doesn’t translate into what appears to be a sustained upward trend, as the two Ruby books from the Prags have done:

Here’s Java. The uptick I noted in my summer posting (referenced above) seems to have worn off, and the downward trend resumed. However, Java is still by far the most widely used programming language, if book sales are any indication, about 2x C#, 2.5x PHP, 4x Perl, and 9x Ruby/Python:

Here’s C#. I’m not sure what’s driven the recent upward trend, and don’t have time to delve into it right now, as I’m on the road. Would love any insight from readers.

c#.tiff

And finally, here’s Javascript. Unlike Ruby, there are no new books driving this spike.

javascript.tiff