Michael Hartl’s Ruby on Rails Tutorial Revisited
A while back I posted briefly about Michael Hart’s Ruby on Rails Tutorial. Over the Thanksgiving holiday I was working on a couple of projects and it occurred to me that I’ve let my testing fall by the wayside. I remembered that that Michael hit testing pretty hard in his tutorial and used autotest, which I had never used, so I had a closer look at the tutorial for Rails 3.0. I’ve been doing a lot of continuous integration work at my day job with heavy duty stuff like Team Center, Hudson, Bamboo, etc. I wanted to see what the cool kids were doing for single developers in the area of continuous testing.
Long story short, I took my leisure time over the holiday and walked through the entire tutorial. I’m now officially upgrading my assessment from “worth a look” to “everyone starting to learn Rails should go through this tutorial first.” Aside from one very minor error which I’ll send to the author soon, the tutorial not only is very complete, but gives detailed explanations on why things are done in certain ways. The tutorial also has a “Rails Flavored Ruby” chapter which is a great overview of Ruby, including it’s oddities, which is great for beginners. I’ve been doing Rails for about a year and going through the tutorial re-grounded me in the basics, gave me a flavor for how automated continuous testing with RSpec should be put together and was a great introduction to Rails 3.0.
The official RoR documentation says that it will be difficult to use Rails before learning Ruby. I have always disagreed with this, although you certainly won’t become a Rails ninja without Ruby proficiency. Michael apparently holds this view too and focuses on the aspects of Ruby that are used in Rails.
So, if you’re new to Rails, here’s what I recommend to ramp up:
- Go through the Ruby on Rails Tutorial in it’s entirety. I haven’t seen any of the accompanying screencasts, but the sample looks very good so check those out as well.
- Pick a project and build it, and rebuild it, over and over again in Rails until you get it right. Use Ryan Bate’s outstanding Railscasts to dig deeper into specific topics.
- Check out aRailsDemo to see how a Rails site was built by a developer relatively new to Rails.
- Go through some of the Teach Me to Code screencasts…the one on building a Twitter clone is great. It’s not as rehearsed as Railscasts which makes it a nice insight into day to day Rails development. There’s some good testing stuff there too.
- Do lots of coding…that’s the only way to learn.
The Ruby on Rails Tutorial book is available free on the web or you can buy it and all the screencasts on the site.