Meditations on programming, startups, and technology
New Relic

Review of the screencast series The Ruby Object Model and Metaprogramming (episodes 1-3)

Even if you’re new to the Ruby community, you are unlikely not to have heard about the Pragmatic Programmers, who are well reputed for publishing great programming books. You may not have noticed that lately though, they’ve also been releasing several series of screencasts.

Each episode lasts about half an hour and sells for a mere $5. This strategy will work well in their favor because screencasts are a great way to teach programming. So far they’ve put out 5 series: Expression Engine, Core Animation, Erlang by Example, Everyday Active Record and, their latest entry, The Ruby Object Model and Metaprogramming.

If you are reading this blog, I’ll assume you’re mostly interested in the last two topics. I haven’t had a chance yet to watch the Active Record ones, so I can’t say much about them, other than that I have faith in their author, thanks to his magnificent work on the Railscasts.

Today after work however, I spent about an hour and a half watching the first three available episodes of The Ruby Object Model and Metaprogramming. This is a brief review of my thoughts on them. In short: they’re fantastic. But let me provide you with a bit more of a in-depth analysis than that.

These screencasts shine for the simple reason that you feel as though you’re sitting right there, next to a master programmer like Dave Thomas, as he explains Ruby concepts in detail to you. Whenever you’re not very clear about a concept, you can go back and listen to the explanation as many times as you’d like. You can pause, experiment with irb, and then go back to the screencast. After watching the first episode, I though that the $5 price was a steal.

Currently the following three episodes are available:

  1. Objects and Classes (29 mins)
  2. Sharing Behavior (39 mins)
  3. Dynamic Code (31 mins)

The first episode lays the groundwork for the series and introduces a useful diagram that enables you to easily visualize the Ruby object model correctly. Concepts like singleton methods and ghost classes are really well explained. The first episode also covers ‘self’ and the concept of current class, which is often confusing to beginners.

The second episode explores what constitutes good object oriented design, as well as the usage of prototype programming, inheritance (and how not to abuse it), and finally an excellent explanation of modules and mixins. If you are a beginner you may not know the difference between including and extending a module, or the true power of mixins. Fear not, the last part of second episode really covers those subject well.

The third episode starts by defining blocks and their usage, including the difference between lamdba and Proc.new. It then moves on to explore the concept of bindings capturing the execution context, and the importance of closures in metaprogramming. The last 12 minutes or so are spent dealing with the subject of dynamically defining methods, which is at the heart of metaprogramming, and the video includes a nice example of how to create your own version of attr_accessor by defining, in a module, a method that dynamically defines getter and setter methods.

I’d say that aside from the feeling that I was enjoying a “private lesson”, what I liked the most was the coding style recommendations about when to employ a given concept and when to opt for something else. The examples were clear and easy to follow as well.

I can’t recommend this series highly enough to any Ruby programmer with a basic grasp of the language. I feel that intermediate developers will get the most out of these videos, but they’ll also definitely be very beneficial for beginners. Real experts shouldn’t find any alien concepts, at least in the first three episodes; I know I didn’t. Yet, they’ll appreciate, just like I did, the fresh slant when it comes to reviewing some of the illustrated concepts and examples. There will also be a few “ah-ah!” moments here and there, I guarantee you.

Five stars, and I’m certainly looking forward to future episodes.


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

receive my posts by email

5 Responses to “Review of the screencast series The Ruby Object Model and Metaprogramming (episodes 1-3)”

  1. Subbu says:

    Wow. Thats a pretty good review. I was looking for Ruby screencasts for a very long time. There are quite a few Rails screencasts sites (Railscasts and Peepcode) but not Ruby. You can’t go too further in Rails without knowing advanced Ruby concepts. And who’s better qualified than Dave Thomas to teach us all these concepts!

    Thanks for the review. I’ll definitely check these out.

    -subbu

  2. I can confirm, i’ve watched those episoded last night and it wasn’t a waste of time. Instead each episode was clear, professional, and instructive. Dave fortunately know a lot bout ruby and teaching.

  3. Jim Neath says:

    I was looking at these a couple of days ago. I’ll probably check them out later today. Thanks for the review.

    The Active Record screencasts are quite good but I feel they’re aimed at beginners.

    The first one covers the basics of relationships (belongs_to, has_many :through etc). Very in depth, but if you’ve been using rails for a while there’s not a lot to learn from them.

    The second one covers things like named_scope and chaining them together, which is quite useful and definitely worth watching.

  4. Just plain thank you for this review.

  5. Trevor Turk says:

    I can confirm that the screencasts from Ryan Bates are well worth the money, too. They’re a little bit on the beginner side, but even an intermediate developer like me will take something away from them. No doubt they’re worth $5.

  6. [...] Antonio Cangiano has also reviewed these videos. Check out his review for a slightly different [...]

  7. [...] The Ruby Object Model and Metaprogramming. So far they’ve received glowing reviews, including my own, hence I highly recommend that you evaluate [...]

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.

Current month ye@r day *

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