Meditations on programming, startups, and technology
New Relic

Review of Rails Best Practices

Over the weekend I had a chance to play around a bit with Rails Best Practices, so I thought I’d share a few thoughts I had regarding it.

In the startup world we often debate the merit of ideas vs execution. In this particular case, the idea behind this product is pretty straightforward. It’s a video course about common idioms and best practices in Rails, that helps you learn how to refactor bad Rails code/anti-patterns/habits into good ones.

Rails Best Practices

Click to enlarge

As is often the case, the implementation is what makes this course really worthwhile. It’s Khan Academy meets Rails (and Khan Academy truly is the future of education).

Rails Best Practices provides a series of small videos that show examples of common bad code that may be used when trying to resolve a particular problem, then they introduce a refactoring that uses best practices to make the code a lot better.

In the process, these videos end up introducing some of the latest tools and features that are available in Rails 3. So if you haven’t made the switch yet from Rails 2 to Rails 3, you’ll find the videos particularly interesting.

This course isn’t just a collection of well produced videos and downloadable slides though. It’s dived into five levels, akin in that regard to a video game. To proceed to the next level, you need to correctly complete and submit all of the exercises for the current level. Each exercise will award you 250 points.

While working on very practical exercises, you’ll be able to reference the videos and re-watch them as often as you please. You’re also able to make mistakes and then see the exceptions that are raised by Ruby.

Rails Best Practices Exercises

Click to enlarge

When you complete a level, you’re awarded a badge. As well you’ll receive a few bonuses once you’ve completed the whole course (including a free peepcode.com screencast, $5 codeschool.com credit towards your next purchase, and 35% off all books at InformIT).

I’m a firm believer that the approach to learning in which one is taught by doing exercises in a game-like setting is a highly effective way to help retain the material you’ve has studied. (I should mention that there is a support forum as well, just in case you’re stuck or need some help.)

At $75, this course isn’t exactly a bargain basement deal, however it’s currently on sale for a considerably more wallet friendly $45, and you’ll definitely get your money’s worth if you are a Rails developer.

In conclusion, given that levels are not visible until you pass them, here is the complete table of content, including all the levels, for this course.

Level 1 & 2

  • Skinny Controller, Fat Model
  • Scope it out
  • Fantastic Filters
  • Nested Attributes
  • Models without the DB
  • Really REST
  • Enter the Presenters
  • Memoization
  • Reject SQL Injection
  • Rails 3 Responder Syntax

Level 3 and 4

  • Loving your Indices
  • Protecting your Attributes
  • Default Values
  • Proper use of Callbacks
  • Sowing the Seeds
  • N + 1 is not for fun
  • Counter Cache Money
  • Batches of Find Each
  • Law of Demeter
  • to_s & to_param

Level 5

  • No Queries in your View
  • Helper Skelter
  • Partial Sanity
  • Empty String Things
  • Yield to the content_for
  • Meta Yield
  • Rock your Block Helpers

All in all, I was very pleased with this enjoyable course, and I think that beginner to intermediate Rails developers are the ones who stand to get the most out of it.

Full disclosure: I was granted access to the course for free, and the link to the course contains my affiliate id. Nevertheless, everything above is my frank and honest opinion.


If you enjoyed this post, then make sure you subscribe to my Newsletter and/or Feed.

receive my posts by email

4 Responses to “Review of Rails Best Practices”

  1. Timon Vonk says:

    Great review on a great course! Even for the more advanced Rails players, some quality advices are made that can really help out and keep your app clean.

  2. David Brear says:

    I completed the Rails For Zombies course which seems more geared towards beginners and am about to begin this course. I think the thing that scares me is how you lose points for incorrect answers / asking for help. I feel like I need to study.

  3. jess johnson says:

    I did the free Rails for Zombies course which is the same format and done by the same people, but aimed more at beginners. I have to agree that the execution was wonderful, but personally I don’t learn well from videos. I prefer to have the material written down. I would much rather learn from a book or web page than a video or lecture.

Leave a Reply

I sincerely welcome and appreciate your comments, whether in agreement or dissenting with my article. However, trolling will not be tolerated. Comments are automatically closed 15 days after the publication of each article.

Copyright © 2005-2014 Antonio Cangiano. All rights reserved.