Jul 15, 2015
Table of contents:
Practical Object-Oriented Design in Ruby (Poodr) is an accessible guide to Object-Oriented design in Ruby. It covers the foundations of how to think about Object-Oriented design and how to design better objects.
The book walks you through how certain practices can lead to brittle code and how using alternative approaches will allow you to write code that is easier to maintain and evolve.
Poodr is written by Sandi Metz is a programmer and author with over 30 years of experience. Sandi is a highly respected voice in the Ruby community.
Poodr is an excellent introduction to Object-Oriented Programming whether you are a complete newbie, or you’ve been practicing it for years.
The book walks you through all of the foundational aspects of Object-Oriented Programming such as designing classes with a single responsibility, managing dependencies, inheritance and composition.
Ruby is an excellent choice of Object-Oriented Programming language and so Poodr explains and guides you through important topics such a duck typing and sharing behaviour through Modules.
Overall I think Poodr is an excellent book for really getting to grips with Object-Oriented Programming.
Throughout the book, you see bad code, and then how you should improve it. Sandi explains why the code is bad, and then why the new design is good. I really like this refactoring style of technical writing as it shows you the incremental stages of improvement.
There is also a running theme through the book of an application for managing bike tours. Working through a single “domain” is another aspect of technical writing I really like because it doesn’t require wasting pages explaining a new domain for each new concept.
This book is really an excellent guide to Object-Oriented Programming, rather than specifically about Ruby. Whilst there are many aspect of the book that are Ruby specific, I think even a non-Ruby programmer would get a lot of value from reading and learning the techniques of the book.
This book is primarily aimed at Ruby programmers who want to further their understanding of Object-Oriented Programming.
I would say it’s probably aimed at further on the newbie side of the scale, so if you are already very familiar with Ruby or Object-Oriented Programming, you might not learn anything totally new, however it will serve as a reminder of the good practices you should be following.
As I mentioned above, I would also recommend this book to anyone wanting to learn Object-Oriented Programming in general. Sandi is clearly a master of Object-Oriented Programming and she has a very clear and concise voice when explaining abstract or complicated content that is not overwhelming to the reader.
So should you read this book? Object-oriented design is very important and is a major hurdle to overcome on your journey to be a better programmer.
Reading books like Poodr is one way of gaining the experience you need to become a better programmer.
This book reinforces the need to learn and use the common design patterns of Object-oriented programmer.
It also helps you recognise bad code and how to improve it!
The book is fairly short and it is very readable. You don’t have to be a ruby expert and the code is very easy to understand.
Overall, if you are looking to learn more about Object-Oriented programming, I would highly recommend reading this book.