"Build Your Own Ruby On Rails Web Applications" review


This was 90% written in January 2007 but the draft was misplaced. Apologies to ORUG who organized obtained a copy for me in exchange for this review.

Ruby on Rails is a simply wonderful technology to develop web applications in. Like all technologies, especially ones with such depth and, at times, unique ways of working, it can take some time to get started using it to develop your own sites. Patrick Lenz comes to the rescue with his Build Your Own Ruby On Rails Web Applications book that I recommend for beginners.

"What's it all abou'?"

Over the course of the book's 400+ pages Mr Lenz gives a good foundation to build from, from installing all of the requisite tools, to basics of how to use the Ruby language that forms the basis of this system, to lots of good advice on testing your applications. The book builds up layer upon layer as it steps you through building a site similar to the community-driven link rating system Digg, all of which follow commonly used "best practices" (the techniques that help your sites be more stable, more flexible, etc).


The book reads very easily and does a good job of explaining the sample code provided as part of the Digg application.


An unfortunately common trait with many introductory books on technical topics is to hint at subjects related to the technology at hand, but then disregard it with a wave of the editor's delete key. This book was missing three key concepts that would have greatly rounded it off for beginners:

  • Sending email. This topic was waved away but would have been very valuable. When you think about it, the majority of web applications send email - either notifications, for verifying new accounts, or for custom newsletters, it is an extremely relevant topic and shouldn't have been skipped.
  • Interaction with 3rd party APIs. Lots of web applications use 3rd party APIs, whether it's verifying credit cards, submitting orders, obtaining mapping data, or getting the weather, there are a many, many good uses they can be put to (check if it's raining in your area, if so find stores that stock umbrellas and give you a map to them..). Interestingly this topic wasn't even mentioned, which was disappointing. Hopefully the next edition will have some good coverage.
  • REST. Everyone knows developers need more REST. Puns aside, Representational State Transfer is a new, and most would say improved, technique to pass data to and from web pages, APIs and services. Based off a more logical use of the HTTP system that binds the web together, REST defines that if you submit an ID in the URL you are reading a record, if you are submitting a form then you're either updating or creating a new record, etc, and so applications are structured to behave more cleanly in this regard. REST support was added to Rails v1.2, which this book is focused on, but it was a major oversight to not cover it. Again, a second edition should set the record straight.

Eth Ned

While not a perfect book, it does succeed with its intended goal, of easing you into writing your own Ruby on Rails applications. Some of the missing topics would have made the book more useful to intermediary users, but they shouldn't detract too much for beginners.

Recommended for beginners

CardRaider - great little app for recovering lost photos


Recently the HD in my main Mac died. While I had just made a full backup, I had also moved some pictures off our digital camera into iPhoto, causing me to lose about 60 pictures. Well, thanks to how digital photography software work (they don't fully erase pictures off memory cards, just do a partial delete) I stood a chance to recover the pictures using one of the file recovery tools available.

After looking on MacUpdate for a suitable tool I settled on CardRaider, a $20 app that makes the process very easy: run the app, insert your memory card, click Scan and wait while it pours over the card looking for your lost media. As each photo is discovered it will be displayed as a thumbnail with some associated metadata, giving you enough information to decide which photos to recover. You decide which photos to recover and can either save them out to disk or import them straight into iPhoto - a little touch that goes a long way to boosting its simplicity.

The only issue I discovered was a slightly glaring problem that will hopefully be remedied soon: only photos can be recovered, the movie clips that almost all digital cameras can take are completely ignored, as are any other types of files. This greatly reduces its usefulness for me, and ultimately I'm going to have to find another app to recover the lost movie clips (we take a lot of them of our kids playing). I emailed the developers to ask when this feature would be added and was informed that while the feature was being considered for a future release nothing had been decided yet and so they could not give any guarantees.

If you are someone who only uses their digital camera for taking photos and not movie clips, this is $20 well spent that can probably save you much anxiety for those occasional accidents. If, on the other hand, you do take a lot of movie clips with your digital camera, you may want to look elsewhere.


Interestingly, I emailed the author my suggestion that it also be able to recover other files and at first he didn't seem too interested. Before I'd even finished this review, however, he sent me a test release of the next version that can recover AVI files (the format most cameras use). Talk about support! So, with this feature due to be added soon, I can't recommend this program enough! Well worth it!

And then I discover File Juicer which can recover images, movies and do a boatload more. Doh. C'est la vie.

Radiant is a great CMS


I just wanted to pass on the meme on a great RoR-based CMS - Radiant. It is OSS, very stable, fairly actively developed and has a really good plugin system.

While searching for a RoR-based CMS I looked at it a few others:

  • Development has dried up due to the developers not having the time to continue it.
  • No support for snippets (see below).


  • Development seems to have dried up, the last messages on the blog were from 2006 and talked about a complete rewrite, which is usually a bad sign IMHO.

Some of the benefits that got me hooked on Radiant include:

  • snippets (keep your content DRY),
  • separate layouts vs content,
  • layouts support custom mimetypes (ensure your RSS feeds get the right content type),
  • the ability to structure the pages in a heirarchy,
  • a set of custom tags for manipulating the content,
  • built-in support for textile.
  • Some existing plugins that make life evey easier, specifically Google Analytics and Virtual Domains (multiple sites from one install!).

The few limitations I see are:

  • the plugin system needs to be improved to make extending the pages list easier,
  • the blog-like functionality needs improving,
  • some of the documentation needs work.

I've already used it on one site and am working to move all of our more static sites over to it - the less static ones will have to wait until I write a few plugins.

iTunes TV shows - worth trying out


(Originally started in December 2006)

My wife and I don't watch much TV, primarily because we cancelled our TV cable subscription several years ago. While we are both fans of science fiction shows there simple was too much junk on aside from two or three shows to spend upwards of $60 each month, and we also wanted to move towards more constructive ways of spending our time. However, there are still those one or two shows we really enjoy and wish to keep up with, without having to wait a year or more for the episodes to be released on DVD. Enter what is currently IMHO the best alternative solution to our predicament - iTunes!

Although originally released as a music-only platform, iTunes has expanded to cover an array of additional media, starting with podcasts and audio books, and more recently to music videos, TV shows and full movies. When the TV show and music video support was originally launched in late 2005 I was not overly keen, primarily because the size of the video was a pokey-small 320x240. This screen size is less than quarter of DVDs, so a video playing in full-screen looked pretty bad, at times worse than an old VHS tape, which wasn't worth it to me.

It took almost a year, but the day finally arrived that I was eagerly awaiting - Apple announced that from September 12th, 2006, all video downloads would be at the much improved 640x480 size, equivalent to the venerable VGA computer monitor resolution of yore and just a smidgin under full DVD size. In addition, over the summer several new TV shows were added to their lineup, including two of the main shows we were interested in obtaining - the SciFi channel's Stargate SG1 and Battlestar Galactica (yes, we're geeks). As a gift to my wife we splurged on a season pass to SG1 for $38 while I'll be picking up BSG weekly for $2, which works out to be less than $8 per month for TV shows ($38 + 20x$2 = $88 / 12 = $7.50) versus the almost $60 for the comparable cable service, so its worth it for us.

After watching several episodes in this new format I have to say that on the whole it is a great way to obtain media you can't otherwise. One thing I can see lots of people using it for is if they are following a show on TV but miss an episode, $2 gives them a chance to catch it later, regardless of any rerun schedule. It is also a great way to try out new shows - for less than the price of a decent coffee you can view an episode of any show available to see if you might like it. Lastly, the obvious market is for people, like my wife and I, who don't pay for a cable or satellite TV service but still wish to follow shows as they happen rather than a year down the road.

Along with the chance to buy TV shows, there are a few other tidbits worth mentioning to pique your interest. Firstly, every week Apple gives away some content via the iTunes Store - a few songs and a few TV episodes. What I've enjoyed seeing is the pilot episodes of some shows getting posted for free, giving you a chance to see what a brand new TV show is like while it is fresh on the market.

The second item worth considering is that Apple also makes full movies available through their service. For a price between $10 and $15 you can download a full length movie to view any time on your computer - no discs required. This may not seem like a great deal when you compare the price against buying a discounted movie via Amazon or a brick-n-mortar discount store, but it could be useful to e.g. build up a library of kid/family-friendly entertainment that you can allow your children to watch whenever they like; couple that with the "allowance" system that the iTunes store has, and parent controls on access to content based on the standard movie ratings, this could be useful for many parents.

Lastly, it does have to be mentioned that you can view the content at any time you like. You are no longer at the mercy of when the TV stations decide that your favorite show should be aired, and you also no longer have to deal with the flaws associated with digital video records (DVRs), which have a tendency to be occasionally hit-or-miss with start/stop times. So, if you like you can queue up five hours of new Battlestar Gallactica episodes some night your newborn is having difficulty sleeping, or organize to have some friends over for a Supernatural party, or you could be really boring and watch that Disparate Housewives show.., that's your choice :-P

There are a few limitations which are a little frustrating. Firstly, there is no way to download a file multiple times without paying for it again. With technology the way it is, it is quite likely that you may some day need to re-download your files again, but Apple would prefer you not. Instead Apple recommends that you back up your downloaded files rather than relying upon them, which I can't really fault too much.

Secondly, TV shows and movies can't be burned to DVD to play in your living room or your portable players, you need either a video iPod to play portable or hook to your TV, or a laptop, and neither solution is particularly enticing. An obvious problem with playback on either laptops or on a desktop computer is the size of screen - most people have much smaller monitors than they do TV screens so the picture won't look as enticing. As for video iPods, those are stick stuck with tiny three inch screens and cost at least $250, which is pretty poor in comparison to the $80 portable DVD players on the market.

Thankfully Apple are well aware of these problems and so have released a set-top box, called the AppleTV, to connect to your TV to play any iTunes content directly from your computer through either a wired or wireless connection; though priced a little high at $300, it will give people an easier solution in their desire to view their paid-for content in their more comfortable living room setting. On the portable front I'm still holding out for an iPod with a larger screen, probably something with a six or seven inch screen, basically something that can be more easily placed on a shelf near the viewer (think: prop it in a cupboard while doing dishes) or propped up while lying in bed, without having to squint quite as much.

One final concern is the video size itself. The decision to go with 640x480 versus the only slightly higher 720x480 DVD resolution is curious. Almost all video content is sold on DVD at some point so the content providers (TV stations, movie companies) have to re-save a new version of their content, which may or may not be possible; it has been mentioned online that some content has been the older 320x240 sized up, which defeats the purpose entirely. Also, with the announcement that the set top box has HDMI connectors for connecting to HDTVs, the realization hits that none of the iTunes content will be available at a native HD resolution as the smallest HD size is 720x480 (same as DVD); this means that all iTunes content played through the set top box will be sized up, reducing the overall quality and, therefore, the value of buying content through this alternative means. My only guess as to why this happened is that the movie & TV studios were unwilling to allow Apple to encroach directly on "their" territories so denied them the right to use standard DVD or HD sizes. Here's hoping that Apple manages to push the movie & TV industry into doing the full resolution as it really makes no sense.

So, these issues aside, I personally think that, unless you happen to watch a great deal of TV and thus can warrant the expense of cable vs picking a few shows ad-hoc, iTunes is a great way to keep up with your favorite TV shows, and the new AppleTV will just make it even better.

VIA USB PCI card unreliable on OSX


Here's a frustrating one. I inherited a PC recently that had a USB 2.0 PCI card which I figured I'd try to get to work in my Mac. The card is based on the VIA VT6212 chipset and after some searching I found official drivers for the card (that only work with G4 Macs). Well, after rebooting the Mac the card seemed to work fine - it showed up in the system profiler and I could work with devices connected to it without any problems. At that point I decided to leave it for the night (it is set to go to sleep after 30 mins), so this morning went to see how it was doing only to discover the machine had locked up. It appears that there's a major problem with the VIA drivers that cause the Mac to not waken up properly after going into sleep mode. Rather unfortunate as I was looking forward to having the extra USB ports. So, I suspect if I hadn't set the machine to go into sleep mode it would be fine, but that isn't something I'm interested in doing. Ah well, back to ebay I suppose.


Subscribe to Reviews