Friday, December 21, 2007

trying out ruby

Last weekend was a slow weekend. It was really nice for a change. On Friday, Jason (from work) sent me a link to some demos of ruby on rails. He had been talking about ruby off and on for some time now - usually in the capacity of comparing developers.

I didn't want to be the kind of developer who had nothing to offer to a discussion about C# vs Ruby any longer, so I decided to heed his suggestion and spend some time with Ruby. So I spent nearly all weekend with Ruby and what have I got to say? Not much aside from a superficial evaluation.

I spent a lot of time getting the environment squared away. The actual Ruby on Rails install was simple. However I tried to configure it to work with Microsoft SQL Express. This was a bad idea. The reason this is a bad idea is the same reason the RoR motto is "convention over configuration." When you install RoR, you can see clearly that it plays well with MySql. Instead of going with the flow, I decided to travel upstream for several hours. Just like my analogy, I didn't get far. Right. So. Install MySql and things work like a charm.

Once I got the environment settled, it was time to get down to work. RoR installs with a small, super-powered notepad clone with some syntax highlighting. It's pleasant if you're into painful and tedious opening and closing of files. Otherwise I recommend an IDE I discovered, Aptana Studio, where I was able to start making sense of things.

So what amazingly stunning web sites did I produce? I walked through the tutorials I found online and attempted to apply them to the concepts I've been considering for my side project, ScoutOffice. Let's just say I'm not rushing out to become a Ruby developer. I'm still struggling with getting the relationships between various models right.

Despite my troubles and apparent inability to learn a language quickly, Ruby on Rails does have some interesting characteristics:

Drink the Kool-Aid. If you can swallow the quirky and debatable conventions Ruby on Rails prides itself on, it is truly amazing how quickly things can "just work." I was able to develop all CRUD actions within mere minutes provided I used MySql, named my data table as a plural, used an integer as the table primary key identity, and properly cased things. If you don't mind sacrificing a debate in best practices, this could be your language!

Ruby can make the bad web UI guys look really bad, really easily. It has this nifty scaffold feature which (I'm sure no real Ruby developer uses that) creates web forms for you on the fly. However the layout and style leaves a lot to be desired. That's great if you know how to modify those things easily. For those of us who struggle with Microsoft Paint, we're screwed. Ruby has a way of showing how bad one's UI skills a re in an instant.

So I have a pretty superficial opinion of Ruby on Rails at this point. It has a lot of merits, but I'm about to give up my day job. I do think I'll be revisiting it however and I haven't ruled it out as a possible avenue for ScoutOffice to go down.