jump to navigation

Joel on Ruby
Friday, 1 September 2006

Posted by austin in: Ruby, trackback

Joel Spolsky wrote a little piece today on web programming. In the main, I think he’s right. But he makes some statements about Ruby that are dead wrong. He says:

I for one am scared of Ruby because (1) it displays a stunning antipathy towards Unicode and (2) it’s known to be slow, so if you become The Next MySpace, you’ll be buying 5 times as many boxes as the .NET guy down the hall.

They’re wrong enough that the creator of the Ruby, Matz, has said something about it on the ruby-talk mailing list:

[W]e disagree in the middle.[…]

(1) Although we took different path to handle m17n issue from other Unicode centric languages, we don’t have any “stunning antipathy”.

(2) Although Ruby runs slower than other languages in those micro-benchmarks, real bottleneck in the most application lies in either network connection or databases. So we don’t have to buy 5 times as many boxes.

What can be said about Ruby and Unicode right now is that it shows apathy toward Unicode. It neither helps you nor hinders you; it leaves you in about the same place as if you were programming C or C++ without using ICU or something similar. The future is something different. I’ve done enough Unicode and m17n work to know that while Unicode is a great choice for new data, it doesn’t help you much with your legacy data—and all the languages which have chosen to be Unicode to the core have trouble with legacy-encoded data to some degree. Ruby’s m17n support is being planned to be legacy-encoding aware. That way, whatever encoding you have to deal with, it should properly be handled in Strings.

Further, Ruby may be “Known To Be Slow”, but what people Know is bunk. There’s long discussions about this on ruby-talk. There’s clear examples where changing one’s algorithm results in a dramatic performance improvement—to the point where people don’t care that the program is written in Ruby. Can Ruby’s performance improve? You bet it can. But anyone who tries to tell you that Ruby is Known To Be Slow is simply repeating outdated and inaccurate information and is not speaking from actual experience. Whether Ruby is too slow depends on what you are trying to do.

That said, I don’t use Ruby exclusively. I’m not paid to. Even if I were able to use it as an option, I know that Ruby is too slow for the specific domain problems that I have to solve at work. But for other problems (including some picture sorting that I’ve had to do at home and have written an article about), Ruby is as fast or faster than other tools.

Comments

Sorry, comments are closed for this entry