Review of the first two Envycasts

The following quiz contains five fairly simple questions about ActiveRecord and Rails 2.2. Try to see if you can answer all of them.

1) What’s wrong with the following (technically valid) line of code?

Guide.find(:all, :include => [:user, {:questions => [:user, {:answers => :user}]}],
                 :conditions => "answers.user_id = 42")

2) Having specified :counter_cache => true in an association, what’s the difference between invoking size, length or count on the associated collection?

3) How do the following models work?

class Rate < ActiveRecord::Base
  belongs_to :rateable, :polymorphic => true

class Post < ActiveRecord::Base
  has_many :rates, :as => :rateable

4) In Rails 2.2 how would you disable validation of a model’s associated objects?

5) How would you use caches_action to cache the content of an action but not the layout?

Confused, lost, not sure? Read on.

Gregg Pollack and Jason Seifer, of Rails Envy Podcast fame are up to something interesting, yet again. They recently started publishing commercial screencasts.

The first envycast is called Advanced ActiveRecord and as you’d expect, it covers several intermediate level topics that often confuse beginners. From relatively simple concepts like dirty objects to polymorphic associations and Single Table Inheritance (STI), including several performance considerations. The video is 37 minutes long and ships with a useful PDF cheatsheet.

The second envycast is titled Ruby on Rails 2.2 Screencast. It comes in at almost 45 minutes long and will prove useful to any Rails developer who’d like to upgrade their skills to Rails 2.2. It covers most of the changes, but for a more thorough analysis of every detail in the change log, they are also making a PDF by Carlos Brando available. Both the video and the PDF sell for $9 each, but you can get them together in a bundle for $16.

This is a preview of the Rails 2.2 one:

Overall I think these videos are very solid. They are informative, accessible, have good examples, and above all are fun and entertaining to watch. If you enjoy the style of humor distilled weekly through Gregg and Jason’s podcast, you’ll love their videos as well. Nine dollars to learn more about ActiveRecord or to get you up to date with Rails 2.2 in less than an hour, is truly an inexpensive price to pay. I also like the fact that their videos are made available in both Quicktime and Theora Ogg format.

Final verdict: I can confidently recommend them.

Disclosure: I obtained the two videos for free, as review copies, but I have no commercial affiliation whatsoever with the Envycasts producers.

Get more stuff like this

Subscribe to my mailing list to receive similar updates about programming.

Thank you for subscribing. Please check your email to confirm your subscription.

Something went wrong.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.