I have started reading Sandi Metz’s Practical Object Oriented Design in Ruby book (currently on chapter 4) and would like more resources to improve my experience/skillset in this area. Does anyone have any other materials they could recommend on this topic that they felt improved their knowledge and practical application?
Thanks so much,
I’ve been recently trying to get a deeper understanding of design patterns and have taken to reading two books in parallel.
I’m starting with Elizabeth Freeman’s Head First Design Patterns book.
This book is written in an odd style and some may hate it, but I’ve found the more informal, conversational style useful.
After I read about a pattern in this book, I read about the same pattern the the Russ Olsen Design Patterns in Ruby book. This gives me a slightly different view of the same pattern and also translates it to Ruby. The Ruby implementation is often very different from the traditional Java version of the pattern. I find this really useful as I’m not much of a Java programmer and sometimes find the Java examples a bit tedious.
I’ve found this approach of trying to assimilate two different views of the same subject very useful in trying to give self a deeper understanding of a new topic.
It’s probably somewhat wrong to pump a thoughtbot source here on this forum, but I read the Sandi Metz book around the same time I watched @benorenstein’s “Refactoring From Good to Great” talk, and the combination of the two had a huge effect on the way I wrote code, namely in that I started breaking things into many, many more classes with much smaller responsibilities. The talk is short, but I think the core message is super important.
Here’s a link to one of the times he gave it last year:
Thanks everyone for the resources!
I did some extensive googling and also managed to find some additional resources in case other people are interested:
TutsPlus: Object Oriented Design and Refactoring Patterns in Ruby
TutsPlus: Gang of Four Design Patterns in Ruby
TutsPlus: Design Patterns in Ruby
TutsPlus: Object Oriented Design in Ruby: SOLID Principles
Thoughtbot Weekly Iterations (on various topics)
Growing Object Oriented Software Guided By Tests (examples in Java)
Clean Code is something that is worth reading every few months, I think. In fact I think I’ll reread it right now. But mostly it is practice.
After finishing POODR, I would start with Design Patterns in Ruby by Russ Olsen, it is a ruby focused rewrite of the classic gang of 4 book.
Follow that up with Refactoring: Ruby Edition. It is a ruby focused rewrite of Martin Fowlers classic Refactoring.
Other than that remember single responsibility and write a bunch of code.