Peter Miller

Musings on Technology and Programming
in

July 2006 - Posts

Ruby Ups and a Downer

    I've been kicking my Ruby investigation into higher gear again, this time focusing on Rails. It has been a mostly a positive experience with one major downer.

The Positives

    I admit it, after trying to live with just a text editor as my primary development environment, I found RadRails, an Eclipse based Rails IDE and haven't looked back since; it looks nice and plays very nice with Rails. Just feels comfortable and while I can see what is happening behind the scenes, I don't need to type everything out anymore.

    On the subject of appearance over utility, I downloaded the great command line enhancer for XP, Console. Amazing how much having tabs and some nice transparency effects makes you feel better about your command prompt.

    Also, Agile Web Development With Rails, another hit from the Pragmatic Programmer folks. I read it once through without doing any of the code examples and I'm now working through the sample app, Depot. As the title suggests, this book talks about Rails, but also a lot about Agile development.

    Finally, Rails itself. I will try to write more about this, but so far it really has been a joy to work with. Things that seem like they should have always been easy in web development seem to actually be in Rails. For example, just the actual process of creating a table, running a script and then having a full fledged CRUD front end ready is sweet. Kind of ugly looking, but sweet. Similarly, add some validation with one line and have a nice little error box show up on bad submits. Of course, working through a prepared sample app should be smooth, so we will see.

The Downer

    Simply put, documentation woes. So Ruby has a feature, RDoc where you can generate a set of local HTML files as documentation for the core and standard libraries (actually for any Ruby code on your machine). I thought that sounded like a good idea and tried it myself.

    Turns out that some of the Rails classes themselves give RDoc a fit, and by fit, I mean a sit there and cycle the CPU at near 100% for hours type of fit. After a couple of failures here, I found that by just running RDoc in my installdirectory\lib\ruby\1.8 directory, everything worked fine. A very annoying  waste of time though.

    Also, I was annoyed to discover that RDoc doesn't seem to really generate anything until it has parsed every file. Is it doing everything in memory? Some intermediate files or something would be nice to see. To be fair, the API docs are available online pretty easily and I had to learn something about where everything was installed on my machine. Still, not quite as easy as downloading the .NET Framework, the SDK and an Express version of Studio.