Mon

Mar 5
2007

Tim O'Reilly

Tim O'Reilly

Programming Language Wars, Part One

Last week's entry, Pycon a Hiring Fest, and particularly a comment by Marc Hedlund about his preference for Ruby over Python, led to the inevitable "mine's bigger than yours" in the comment thread. Seeing as how there's so much passion in this subject, I thought I'd throw a little more fuel on the fire :-).

A week or so ago, Mike Hendrickson, who heads up our "Open Technology Exchange" group (which includes our animal book publishing program and the O'Reilly Network), sent me a graph comparing book sales on computer languages between January 2006 and January 2007.

Comparing Book Sales on Computer Languages

As you can see, books on every language but Actionscript (Javascript for Flash), JavaScript, Ruby, and SQL were down, some more than others. Ruby books did outsell Python books. But Javascript -- driven by everything Ajax -- was the biggest winner.

This data comes from the Bookscan top 3000 report. (Remember, this is data from all publishers, not just O'Reilly.)

More provocative stats later.


tags:   | comments: 39   | Sphere It
submit:

 
Previous  |  Next

1 TrackBacks

TrackBack URL for this entry: http://blogs.oreilly.com/cgi-bin/mt/mt-t.cgi/5299

» Skill Sets and Job Markets from the forty-second parallel

I’m always interested to hear what people like Tim O’Reilly have to say about about current trends in programming languages. I wouldn’t call myself a programmer per se, but I do a fair bit of programming in my life as a web developer... Read More

Comments: 39

  Simon Wardley [03.05.07 05:53 AM]

Ok, hands up - I'm a vested interest.

It is worth looking at Steve Yegge's article on the Next Big Language (see http://steve-yegge.blogspot.com/2007/02/next-big-language.html)

  Jacob Kaplan-Moss [03.05.07 06:29 AM]

Am I the only one who thinks that flagging book sales for Python is a direct result of the general suckitutude of the available Python books?

I've read some really excellent Ruby books recently, and a number of above-average JavaScript ones... but nearly every Python book I pick up is just a badly-written retread of the online documentation.

  Chris [03.05.07 06:52 AM]

http://www.tiobe.com/tpci.htm

Python + Ruby = Perl

  Jeremy Zawodny [03.05.07 07:25 AM]

Maybe I'm reading the chart wrong, but Javascript is up YoY as well as Actionscript.

  Manuel [03.05.07 07:48 AM]

Are Rails books included in the Ruby books figures?

  Tim O'Reilly [03.05.07 07:55 AM]

Jeremy, I think you're misreading not the chart but the text, where I also said that Javascript was up (significantly.)

Jacob -- I've heard the thought about suckitude of Python books before but if that were the case, they shouldn't have been on the increase for the past 3-4 years. It's only after RoR came on the scene that they slowed down a bit. Ruby has definitely taken some of Python's momentum (as Python took Perl's.)

Chris -- I'm not a big fan of the Tiobe methodology, to the extent I understand it. It says they measure "availability of skilled engineers, courses and third party vendors." Availability of such things is very much a rear-facing mirror. We try to measure much more rapidly changing factors, such as the *sales* (not availability) of books, help-wanted ads (not people available to work), and web traffic. When Ruby started taking off, there were only 2 or 3 books available, versus hundreds for perl, but pretty soon those 2-3 had sales that were a significant fraction of perl, and accelerating.

What's often most important is to look at the rate of change.

  Tim O'Reilly [03.05.07 07:59 AM]

Manuel -- yes, Rails books are included. We measure multiple dimensions in our data mart, and language is separate from topic. (E.g. a book "Game Programming in Java" would be "Game Programming" by topic, but Java by language.) The graph that I showed is of the language dimension.

  Michael Silver [03.05.07 08:35 AM]

Interesting stats. Not that Tim was implying this, but they don't really help determine which language is "best". They certainly show which language is "hot" or popular though. Factors such as maturity/stagnation and saturation are probably the biggest secondary factors (after popularity).

Good stuff.

...Michael...

  ricardo [03.05.07 08:55 AM]

I've recently started with python and I am really impressed by how clean, elegant and powerful it is.

At the same time I'd love to hear a comment from a person that have good working knowledge of perl, ruby, python...to the question:

Do we really need all 3?

  Don Shanks [03.05.07 09:08 AM]

I don't in anyway doubt the validity of the stats, but do wonder if they are representative not of popularity of the movement of the language and the technology itself. Book sales go up not only with the popularity of the language but when advances in the technologies themselves appear. Ruby is not only a more recent development but it is still evolving and as such more books are bought. As a veteran Perl programmer, I wouldn't mind purchasing a Ruby book to see it's advances and improvement on the Ruby = Python + Perl front. That doesn't necessarily make it my next language or diminish my involvement in Perl. All in all it is interesting to see the trends.

  Don Shanks [03.05.07 09:10 AM]

That should say:

I don't in anyway doubt the validity of the stats, but do wonder if they are representative not of popularity of the movement "but" of the language and the technology itself.

  Tim O'Reilly [03.05.07 09:12 AM]

Actually, Don, Ruby has been around for the better part of ten years. (RoR is new, however.) We did our first book on it in the late 90s, and featured it prominently in the Perl Conference we did in Japan.

  Dave Edwards [03.05.07 09:13 AM]

It's not surprising to see Java still leading. It seems to be a language devised by the publishing industry to sell books.

  Tim O'Reilly [03.05.07 09:16 AM]

Dave -- There's a lot more to it than that. Java is the most commonly hired-for language. I'm planning on posting some job stats shortly.

  Ignorant Bystander [03.05.07 10:19 AM]

How many Ruby books were released by O'Reilly in 2006 and 2007? How many Python books were released by O'Reilly in 2006 and 2007?

  Steven Huwig [03.05.07 11:01 AM]

It would be interesting to compare this graph with a similar graph of allocated shelf display space in brick-and-mortar stores. Which book types outperform their display space allocation and which book types underperform?

  Dave McClure [03.05.07 11:48 AM]

hey Tim -

small request: do the chart graphic embed via Flickr -- that way, we can also link & share the photo thru that service, not to mention add visual comments on the graph.

(btw, does Radar have a Flickr acct? if not you folks should create one...)

  Tim O'Reilly [03.05.07 12:34 PM]

Dave -- I used to do that, but I seem to recall that flickr explicitly requested that people stop uploading slides and other non-photographic images. Have they changed that policy again?

In any event, you can still link to the photo very easily. The img tag doesn't require a local address for the image. Just get the image address from your browser.

To be sure, that doesn't allow collective commenting, but you can do that here, no?

  chromatic [03.05.07 01:10 PM]

Ignorant, that's one of my persistent grips about these graphs as well. For as much talk as there is about the long tail, we're certainly trying to get our books onto the shrinking shelves of physical retailers. For everything but the bestsellers, you can certainly tell when a book falls off the frontlist there.

I predict that Perl would have had a huge jump in sales if Programming Perl 4e had come out last summer.

  Manuel [03.05.07 01:22 PM]

Are book sales a valid technology trend indicator?

As for programming language books, the drivers behind the dynamics of book sales are:

1. Novelty of the language
2. Publication of new books/editions
3. Quality of the books on the market
4. Availability of free alternatives
5. Hype

Let's discuss point by point...

1. Ruby is a well-established language in Japan but it is really new in the western world where its popularity is mainly connected with the Rails web framework released in 2004. When a language is so new, developers are really hungry for new books. Moreover curiosity and experimentation also play a big role: at this stage most people are simple tinkering with Ruby and Rails. Python, on the contrary, is already a very popular language in Europe and USA: it never exploded but it gradually percolated the IT world finding some very interesting niches also at firms where the official languages are Java and C++ (see Google). In other words, Python knowledge is widespread now and the demand for new books is not so rampant. Curiosity and experimentation also play a minor role: most people are using Python to build real things in real world.

2. As a consequence, book publishers (O'Reilly, Apress, etc.) are flooding the market with brand new Ruby and Rails books. Of course they are following the money. They have to strike while the iron is hot! Python new books, on the contrary, are mainly new editions of already well-known books. In other words Python programmers are invited to upgrade their knowledge but, considering the small amount of change present in Python latest releases (waiting for P3K), they are generally not so hungry for new editions. In fact I suppose most Python books are nowdays purchased by language beginners, new fresh energies in the already large and active Python community.

3. As for the quality of books I don't see a great difference between the Ruby and the Python field. Most books are average quality works but Agile Web Development with Rails and Python in a Nutshell are among the best programming books ever. Pro Django, at the moment freely available online as a beta book, is another very promising book.

4. If you want to learn Ruby and Rails you have not choice: you have to buy a book. Online free documentation is fragmentary at best. As for Python the situation is radically different: online docs and tutorials are excellent and most commercial books are also available free in electronic form. In fact many good Python programmers never purchased a book about Python!

5. Hype is not a bad thing per se, but it never last. What comes up must come down, at last. The hype surrounding Ruby and Rails is very strong at the moment. Python, on the contrary, has a more understated attitude: never in fashion, never out of fashion but always useful and powerful, almost a secret weapon.

  Robert Scoble [03.05.07 03:26 PM]

Tim, interesting, this chart matches what I'm hearing on the street from entrepreneurs too who I interview for ScobleShow.

  poko [03.05.07 03:36 PM]

Jacob,

Core Python (second ed.), Python in a Nutshell (second ed.) and Python Cookbook(second ed.) are great books IMHO. And we'll have the Django book out soon, too :))

Tim, would it be possible to break down the Ruby category to Ruby and RoR? My gut feeling is that the ratio is like 10%-90% in terms of sales.

My other question to Tim: are we going to see any Django book published by O'Reilly ?

  someone [03.05.07 03:41 PM]

try implementing a compiler or an interpreter in ruby.

then rewrite it in haskell/ocaml/f#/scala/standard ML and compare: speed; line count; maintainability.

another challenge: try running a large ruby unit test suite in a reasonable amount of time.

  Luke Welling [03.05.07 04:00 PM]

I considered trying to make a mature, intelligent and insightful comment on the state of fanboyism in 2007, but linking to fanboy flamebait is both easier and more fun:

http://lukewelling.com/2006/08/03/java-programmers-are-the-erotic-furries-of-programming/

  Tim O'Reilly [03.05.07 04:32 PM]

Hey someone -- this post isn't about which language is *better* (for that you need to ask "better for what?) but about which is more popular.

If popularity were directly correlated to value, we wouldn't hear so much about Anna Nicole Smith and Britney Spears. (See http://www.cnbc.com/id/17469268 for CNBC's joke (I hope) about the "blonde correction" to the stock market.)

  TJ [03.05.07 04:40 PM]

Of course prog books are down. Aren't all books down? Anyway, there are *online* resources. Wanna pay $40 for a book? I don't.

  TJ [03.05.07 04:47 PM]

And oh yeah, I forgot: I agree that Python books suck. But then, *most* programming books suck. They're thrown together by people who aren't passionate about the subject ... or who are, but shoulda stuck with programming, because they're written like a PhD thesis.

Don't authors ever take a look at all-time top sellers anymore? Anyway, the Python books at the store are no better than the online docs. Sorry O'R, this means you. You want my $40, you have to *earn* it.

(I started with Fortran and 8080 assembler, so I've seen a few books.)

  Dave McClure [03.05.07 04:55 PM]

>>recall that flickr explicitly requested that people stop uploading slides and other non-photographic images.
>>Have they changed that policy again?

i don't believe that was ever policy... might be a bit problematic if you're not the *original* owner (altho even there, i think it's fairly rare that they do a takedown), but certainly if you *are* the owner i believe there's no problem at all.

in fact, i believe it's quite common practice -- and i think the visual commenting + social network benefits are substantial.

i'll check with stewart or caterina to see if any official policy issue, but i very much doubt it.

  Michael Sparks [03.05.07 04:59 PM]

I think there's also another issue at play here. Some languages you need books, for some the docs and (given experience with other languages) common sense combined with a consistent design are enough.

The core language areas of python and libraries in python are pretty well covered, especially if you follow through some freely downloadable books. For example, I bought Learning Python many, many years ago and was really disappointed with it and it put me off python for about 4 years (I'm sure the current versions are better :). Then, for various reasons, I read the downloadable "How to think like a Computer Scientist using Python", and being a CS grad it just clicked.

However beyond that, I have bought Python in a nutshell, but rarely reference it, same goes for the Python Cookbook. I tend to find once you get started you stay started.

Books are IMO useful to cover specific problem (but known useful) points. Things like how to use specific popular libraries. ALso, I don't think this is python specific - interest in Rails is a good example here - people wanted rails and got a language underneath.

Whilst my main flavour language at present is python (and I can't see that changing at present), I always think of the idea of language wars as ironic. They only make sense to people who don't want to choose for themselves, self-defeating the idea of a "war" :) (I wouldn't've found out that erlang is so close to what we're doing if I decided to be pro- any specific language :)

But back to the issue: consistency reduces the need for books, and in practice I expect the complexity in apps to be the growth area. (As I'm sure you're seeing alredy.) Personally I'm looking forward to seeing what the major language will be in 2010 - someone is using it already after all.

(Oh, BTW, "preview" is giving the error: Build error in template 'Comment Preview Template': Error in tag: Error in tag:)

  Mikael Bergkvist [03.05.07 05:08 PM]

Everyone knows javascript, so the more that can be done with it, the more will work with it.
Xindesk (http://www.xindesk.com) for example, is a serverside framework, which is all javascript, all serverside.

  Phaedrus [03.05.07 05:11 PM]

Am I the only one who sees book sales as indicators of...(drumroll please)...books for sale? Many languages (Such as Ada, Lisp, etc) aren't represented because there aren't any new books to be bought. If there were, we might buy 'em. Since there aren't, we certainly won't buy the old ones again!

  tim [03.05.07 05:52 PM]

I agree with Mike Sparks.

Some languages don't require hardback reference libraries. I would not correlate popularity or utility with book sales. I could correlate book sales with complexity. The harder it is to get productive with a language, the more you need a book.

  Ed [03.05.07 08:00 PM]

I hope there's another dimension where there's one publisher than rule the Python world.

Let's dissect books in Python

1. Learning Python (any edition)
Thick. Intro too long( cp 1,2,3 ). Depict Python as scripting language (can't get reader's attention)

2. Twisted book
Too thin. Who used it? (Snipshot, killed JotSpot feature)

3. Plone
Most Plone sites look robotic. Doesn't look web 2.0 ish (unlike Drupal). Runs on top of Zope (tagged bad)

4. Zope
Tagged as "bad" already.

5. Python Cookbook
Like any other Cookbook: tips, tricks, hacks. Not a good Intro/Bible like. Who needs cookbook book?

6. Python in a Nutshell
Just like any other nutshell books: just in the nutshell. With thick python docs. Who wants to buy Python docs? These are the definite turn-off for all nutshell books.

7. Other CS related Python book
CS related, CS theory.

8. Python Network programming
Well Okay, I have to give a prop for this one. It's good.

9. Turbogears
Good book, style is similar to AWDwR (RoR). CherryPy is the biggest turn-off, people prefer Apache/IIS. Released too early on its inception.


10. Pro Django
Chapter 1: Django this, Django that, PHP sucks. Django doesn't feed your cat, doesn't read your mind. What? No continuous example/project like?


Disclaimer: I like Python and I prefer Python more than Ruby. Unfortunately in Ruby world, PragProg guys are so smooth in publishing web 2.0 development books from language, framework, tools, migrating from Java. Heck they even wrote book of TextMate!

PragProg books are nice because:
- Nice font and spacing!
- Nice white theme for book cover
- Check AWDwR yet? Good structure, good flow, no wasting time in saying Rails can't feed your cat, read your mind.

Here's what I'm hoping:
1. The pickaxe of Python
-C has K&R,
-C++ has Lippman or Koenig (and Bjarne),
-Java has Eckel and Core Java
-(Prentice has Java series where Addison has C/C++ series)
-Perl has O'Reilly
-VB, Visual Studio, .NET has Microsoft Press
-Ruby has PragProg
-Python has? (Apress should pick Python up and make the best damn Python series because obviously Apress doesn't have a cornerstone language yet)

2. Django book AWDwR style
- Build something (AWDwR and TurboGears HAVE projects)
- Get rid of OLD, NEW. Just give the NEW
- People buy your book to learn about Django, don't make it too hard for them.

3. TurboGears to break up with CherryPy
- Plus update or 2nd edition of TurboGears

4. Plone+Zope3
- As one book.
- Don't make it too hard damn it.

5. SQLAlchemy, SQLObject
- As one book

6. Web development in Python
- As one book
- Discussed WSGI in general, CherryPy, Paste, Pylons, Web.py, Twisted/Nevow (sorry guys, basically, the leftover)
- Discussed templating in Python

7. Python series (de facto)
- Programming Python
- Network Programming in Python
- Database Programming in Python
- Web Programming in Python
- GUI Programming in Python (wxWidgets please)

My only problem with any of the O'Reilly books is the font and spacing aren't that nice for my eyes, but that's subjective (^_^)

I don't mean to bash/flame. Hopefully these are constructive criticisms to any publishers/authors of any future python books.

  Robert [03.06.07 06:15 AM]

chromatic: "I predict that Perl would have had a huge jump in sales if Programming Perl 4e had come out last summer."

I so agree with that statement. I mentioned it on use.perl the other day. It has been 7 years since 3e and I know that the language has changed and programming "styles" have changed. I sure would have purchased it.

  Laurent Szyster [03.06.07 08:51 AM]

Here are Google trends for "programming java, programming ruby, programming python, programming javascript":

http://google.com/trends?q=programming+java%2C+programming+ruby%2C+programming+python%2C+programming+javascript%2C&ctab=0&geo=all&date=all

Conclusion?

Java is big in Bengalore but sliding down a slippery slope while dynamic programming languages are hot everywhere else since mid-2005.

This correlate with O'Reilly sales figures.

Java is out, Ruby is in, JavaScript is up ... and Python is as resilient as C.

  gfranxman [03.08.07 08:13 PM]

I think the rise of ruby has as much to do with chunky bacon as it does with developers suffering java-fatigue who are not willing to give up their precious curly braces.

Python on the other hand might just be so straight forward, and well documented online that hard copy books just might not be neccessary. I've yet to meet an experienced developer that couldn't pick up 70% of python in a day, 80% in a week, etc. I don't suspect that'd be true of any of the other languages on that list.

I had dismissed python 6 or so years ago, but when I finally came back around, it had really grown up, and it was like the scales fell from my eyes.

  Warren Stringer [05.16.07 03:03 PM]

Hey Ze Maria, thanks for the link! Tis the first time checking out Google Trends.

Laurent, you say JavaScript is up? Here's my query on * tutorial:

http://google.com/trends?q=ruby+tutorial%2C+python+tutorial%2C+C%23+tutorial%2C++rails+tutorial%2C+ror+tutorial&ctab=0&geo=all&date=all

Seems that ActionScript and C# are losing ground, while Python and Ruby are holding steady. I left out Java - as the previous links show it is both huge and losing ground.

Am surprised that Ruby is merely holding steady, based all the interest around San Francisco. Meanwhile, the Java Meetups sometimes cancel, for lack of interest.

I have a bunch of old dusty Java books. Google search is faster than looking anything up.

As for books, I like "Python in a Nutshell"; I now have both editions. I think that Martelli's recent lecture slides would also be a decent intro for programmers. His slides on how Python differ and are related to other languages are compelling.

I also like the Agile Web Development with Rails book. Though I think the Layout and Typography is a bit bloated. This book was recommeded at a recent Ruby Meetup.

The Ruby Nutshell book is kinda funny - tis a much smaller nut than Python. I bought one but returned it, an hour later, for a TurboGears book.

I like Ed's comments, as well. They got me thinking.

Post A Comment:

 (please be patient, comments may take awhile to post)






Type the characters you see in the picture above.

RECOMMENDED FOR YOU

RECENT COMMENTS