Archive for November, 2008

Ruby

Saturday, November 1st, 2008

I had a client request an application in Ruby. I explained that I’ve never used Ruby, but that I’d do it if that was what was required. Having got that cleared up I downloaded Ruby and Rails and got started. Actually I discovered that Leopard has it pre-installed, but anyhow…

I know I’ve been out of the loop for a few years as far as new tools go, blame it on working in a very conservative environment. I was regarded as  radical for promoting Hibernate. I heard a lot of great things about Ruby I just never got round to using it.

The requirement involves an RSS reader filtering apps into a database with a UI displaying the most recent matched articles. Pretty simple stuff, and I figured a couple of days work in Java. But with the added problem of working in a language that I’m not familiar with I estimated a week. Turned out to be pretty accurate, but unfortunately that’s also about how long the thing takes to run.

It turns out that Ruby is a pretty cool language.  I do like some of its features, especially the whole class worh of getters and setters (and variable declarations) in a single line. But it’s interpreted, ffs. It’s S-L-O-W. Especially reading and parsing files. I don’t know why nobody’s produced a Ruby JIT yet, but it’s sorely needed.

I also found that if you want to get things done with Ruby you have to do it Ruby’s way – it’s all about programming by convention and if you don’t know (or like) the conventions you’re out of luck and life is going to be tough.

My overall impression is that Ruby is great for the things it claims to be great for (simple stand-alone web apps), but it’s not going to take over the rest of the development arena any time soon.