Sergio and the sigil

Design Patterns in Ruby - book review

Posted by Sergio on 2008-07-22

I have a friend that is very much into Design Patterns and wanted to learn Ruby with a more applied perspective of the language.

I went the exact opposite direction. I know a little bit of Ruby already and I wanted to improve my limited patterns knowledge.

What we had in common is that we both picked up Design Patterns in Ruby by Russ Olsen. The title can be a little deceiving in that you might think it assumes Ruby knowledge, but no, it actually covers the Ruby language at a level that doesn't bore the reader with programming basics. The book assumes you know how to program already but you're new to Ruby.

After an introductory chapter about Ruby basics, the book delves into Design Patterns, their formal definitions, how they look like in Ruby, how to leverage Ruby features to tweak the patterns, and examples of the pattern being used in examples extracted from the Ruby class library or popular components (gems). As the examples and tweaks are being presented, any new Rubyism being applied is explained.

I found this book to be a great way to learn more about the Design Patterns and the proper way to implement them in Ruby. I also learned a little more Ruby and some language features that I did not know how to use yet.

The new crop of .NET Screencasts

Posted by Sergio on 2008-07-20

I finally carved up some time and watched the first episode of Steve Bohlen's Summer of NHibernate. These are sessions that Steve recorded for his team's Dine and Discuss events and he was kind enough to share with the entire community.

Steve undoubtfully knows his stuff and how to explain the topic with the right amount of details and sprinkled with lots of insightful comments. I'm looking forward to watching the other sessions soon.

It takes a lot of effort to put a screencast like that together and I admire the people that create and make them available to us. I think screencasts are quickly becoming the best way to learn a new technology or tool. Imagine the number of hours I would have to spend reading a NHibernate book, 20 or 30 hours for a slow reader like myself? The amount of information you can get from videos, especially screencasts where you feel like you're in a coding session with the author, just can't be matched by a book.

Screencasts aren't without problems either. They're expensive to host, stream, and download. They're typically not searchable. You need a computer so you can't just have them on your side table (no, I'm not gonna watch them on an iPod, sorry.) They don't substitute reference material, which is not really a problem, just not the role of this medium. I can't watch them during my commute because I'm a responsible driver.

I'm happy to see a lot of new sources of .Net screencasts and I wish I had time to watch them all. Here's a list of screencast series that I watch/watched/will watch.

.NET Screencasts

Non-.NET

  • Railscasts: Great way to get familiar with Ruby on Rails development.
  • Peepcode: Commercial, inexpensive videos. At $9.00, they're a steal.
  • Pragmatic Programmer's screencasts: Since I'm big fan of these guys, I'm sure I'll buy at least a few of these very soon.

JavaScript: The Good Parts - book review

Posted by Sergio on 2008-05-11

I just finished reading Douglas Crockford's JavaScript: The Good Parts and it only took me a few hours to go through it this weekend. This is a short and delightful read. The book has not been released in print yet and I read it via O'Reilly's Safari Bookshelf, which will be the subject of a future post by itself.

Update: The book became available almost at the same time I posted this review.

In its 170 pages the book describes not only the HOWs but, most importantly, the WHYs of the JavaScript language. Douglas Crockford is known for his great contributions for JavaScript development, including JSON, JSLint. JSMin, and several programming patterns and practices.

In this book, Douglas explains JavaScript and how it differs from other popular object oriented programming language. Special attention is given to JavaScript's inheritance model and scoping rules.

Crockford doesn't limit the coverage to what is considered good in the language design. He also sticks his finger at the problems in the language and what he considers (justifiably) bad language design and missing features. A lot of attention is also given to common sources of bugs and how to avoid them.

This is such an easy and valuable read that I have to recommend it to anyone trying to produce solid and maintainable JavaScript code.