Because Ruby is capable, quick to write, quick to get running and a joy to use!

I’ve got a reasonably long and varied history of programming in many languages, and not just mainstream ones, but I’m mostly looking at Java and its ilk as my point of comparison here. So, here’s why Ruby is often a superior choice for me:

  • At least one .rb file and a Ruby interpreter is all you need. Edit code then run immediately. No compilation into class files then building into a jar/war/ear. But no biggie you say, my IDE hides all that building and I just edit then run with my Java code. Sure, but once your application gets big that build step is still a non-zero hit: for a big Java web app it might take a minute or more to build the eventual ear.

  • And then there’s the two minutes waiting for your Java web app to deploy as JBoss (or Java EE app server of your choice) grinds into action. Finally, three minutes after you edited the code you’re able to see the results in the browser! I use Ramaze for my Ruby web apps, which starts up in seconds, even for a big app. But more importantly, it reloads modified files at runtime so I don’t have to re-deploy to see the results of my actions. Zero wait between edit and test. The difference this makes when you’re hammering away at a problem is colossal.

  • Ruby is neat as a language, generally requiring less code to solve any given problem whilst still being readable. For a start, an endless procession of Java getters and setters can be replaced with attr_accessor :first_name, :last_name, :title. And that’s just one trivial example of Ruby goodness.

  • Ruby is a joy to use. This may be the single most important point here. If you’ve got to use it all day, you’ll be far more productive if you’re happy about it. When you lose track of time because you’re engrossed in what you’re doing, and making speedy progress too, you’re onto a winner.

Ruby’s not perfect (if you think you’ve found the perfect programming language I’ve got a bridge you might want to buy) but it’s a relatively young language and improving quickly right now. For me it’s way up there as the best available compromise for many types of projects. If nothing else, it’s been the single most interesting and enjoyable language to learn, having dealt with many others before. If you’re interested in learning Ruby, take a look at my review of The Ruby Programming Language – a very decent book to explain it all to you.

You must be logged in to leave a reply.