Goodreads helps you keep track of books you want to read.
Start by marking “Practical Object Oriented Design in Ruby” as Want to Read:
Practical Object Oriented Design in Ruby
Enlarge cover
Rate this book
Clear rating
Open Preview

Practical Object Oriented Design in Ruby

(Addison-Wesley Professional Ruby Series)

4.54  ·  Rating details ·  2,421 ratings  ·  172 reviews
The Complete Guide to Writing More Maintainable, Manageable, Pleasing, and Powerful Ruby Applications Ruby's widely admired ease of use has a downside: Too many Ruby and Rails applications have been created without concern for their long-term maintenance or evolution. The Web is awash in Ruby code that is now virtually impossible to change or extend. This text helps you so ...more
Paperback, 1st edition, 247 pages
Published August 19th 2012 by Addison-Wesley Professional (first published July 2nd 2012)
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about Practical Object Oriented Design in Ruby, please sign up.

Be the first to ask a question about Practical Object Oriented Design in Ruby

Community Reviews

Showing 1-30
Average rating 4.54  · 
Rating details
 ·  2,421 ratings  ·  172 reviews

More filters
Sort order
Start your review of Practical Object Oriented Design in Ruby
Steve Klabnik
Oct 30, 2012 rated it it was amazing
Shelves: own, ruby
Full disclosure: I helped contribute early reviews of much of the content of this book.

Sandi does a really great job, but not for the reason you'd expect: POODR is more pragmatic than one would expect. Especially in the Rails world, where OO design is looked down upon as 'academic' and 'not actually worthwhile,' one would expect all the usual explanations and reasonings.

But not this book. Sandi does a great job of explaining the tensions between all of these different maxims, and acknowledges th
Apr 23, 2014 rated it liked it
While this book starts out being excellent, it just turns out as yet another of those "static typing is wrong because type casts are dangerous and you need to write type annotations everywhere". Then in the last chapter it basically re-implements a type system via tests, by checking if a class has certain methods.

That, dear reader, is exactly what static typing is for, and in 2014, we do have type inference even in C++.
Magnus Lidbom
Apr 23, 2015 rated it really liked it  ·  review of another edition
Shelves: development
This book is an excellent book on good OO design. I would recommend it to anyone. But I would not recommend it to anyone without a large warning sign stuck to it:

"Warning: The portions about statically vs dynamically types languages show a very marked lack of balance, objectivity and depth of knowledge. Safest to simply not believe anything said about statically typed languages in this book. Most of it is not exactly wrong, but still very misleading."

Sandi: Should you happen to read this I would
Bjoern Rochel
Oct 01, 2012 rated it it was amazing
Shelves: 2013
This book is spot on when it comes to object orientation. It contains many of the lessons I had to learn the hard way during the last 8 years while extensively studying books & blogs on oo. Though POODR certainly doesn't come up with a lot of new ideas (at least I've heard most of them before), it compiles the ideas into a wonderful whole, where each part fits nicely with the rest of the book. Although definitely opinionated, the book shines by never being dogmatic and clearly explaining the dec ...more
Robson Castilho
Aug 10, 2015 rated it it was amazing
Great book about object-oriented design, tackling the main principles of OO.
Very well written, it explains how to manage dependencies, how to implement duck types and how to use inheritance and composition. It finishes with a great chapter about testing.
I do recommend!

(ps.: if you're a beginner with Ruby - like me - and you want to learn more about the language features FIRST, you should pick another book. This one is focused in OOD!)
Michał Szajbe
Oct 14, 2016 rated it really liked it
The book is full of valuable insights and good, elaborate explanations. Well worth the read.

The only thing I didn't like are code examples with real-world objects like Bike, Gear and Mechanic. You can write two or three good examples that way, but trying to adhere to it throughout the whole book make these examples worse and worse. The further into the book, the worse the code is.
Oana Sipos
Apr 19, 2017 is currently reading it
Chapter 3: Managing Dependencies

An object has a dependancy when it knows:
- 1) The name of another class.
- 2) The name of a message that it intends to send to someone other than self.
- 3) The argument that a message requires.
- 4) The order of those arguments.

Writing Loosely Coupled Code techniques
- Inject dependencies
- Isolate dependencies: isolate instance creation, isolate external vulnerable messages, explicitely define defaults, isolate multiparameter initialization
- Choosing the dependency d
May 24, 2013 rated it really liked it
Having been a Ruby programmer full-time for a year now, this book finally made "click" many of the Best Practices I've seen and used in code but haven't really been able to articulate. It got a little long-winded and redundant at some points, probably because it's geared more towards people who haven't been exposed much to OO, but overall it was definitely worth reading.

These are some of the parts that were most valuable to me:

"Sometimes the value of having the feature right now is so great that
Apr 18, 2014 rated it it was amazing
Starting with a story about technical debt, sandi metz lead us step by step through obstacles we have to face when designing a program. This book shows us when to use different kinds of designing techniques such as :inherit, duck-typing, composition. At the last chapter, Sandi tells us a fresh view about testing, with concepts of inbound message, outbound message. I highly recommend this book for any ruby-ist who want to write code better.
Tomas Smagurauskas
If you wan't to learn basic of object oriented design and don't have much experience in the field - then the book is right for you. It present's good basic ideas to follow to improve your OO design and provides simple examples that are understandable to everyone.

If you want information beyond the basic topics, then this book about that. Ideas presented in the book are good, but the examples are not so much. Examples are very well chosen to fit the narrative of the book and are far from reality.
Oct 12, 2019 rated it really liked it  ·  review of another edition
Granted that this is the very first book about software development I've ever finished, this is the best I've ever read. It was clear and understandable to me as a beginner (with some exceptions) but also comprehensive and fairly complex. The writing was excellent and persuasive about the appeal of writing well-organized code. The first few chapters were slightly more clear and persuasive than the later chapters, which veer away from general principles into the weeds of specific techniques, but ...more
Soheil Karami
Sep 03, 2019 rated it liked it
it was a good book, I am a .Net developer but this book give me a vision about OOD
Nov 09, 2013 rated it it was amazing
This book helped tie together my understanding of OOP best practices in Ruby and has produced immediate benefits in the quality of code I'm writing. It contains great examples of refactoring code, along with checklists, red flags and questions to ask yourself throughout the design process.

The author does a great job of following the development and improvement of a sample app throughout the book (an app for a bike shop). The continuous narrative helps you see how the pieces fit together, though
Túlio Ribeiro dos Anjos
In my humble opinion, this book's greatest strength lies in its advice to think first not of objects themselves and their responsibilities, but as actors and messages passed between them. Perhaps you already knew this; I didn't, and doing so has been a tremendous new tool in my arsenal to tackle problems. Seeing and defining public interfaces and abstractions has become a lot easier. It's become so much clearer now, it's like the idea just popped into my head.

Chapter 4: Creating Flexible Interfa
Robert Postill
Aug 30, 2014 rated it it was amazing
I loved it. The thing about Sandi Metz is she has that wonderful mix of good communication and years of experience. This book is a great demonstration of the power of that combination. It's got a laid back style that makes it feel like you and Sandi are pairing on the code under examination. As Sandi's explaining to you why she's thinking what she's thinking you spend the length of the book saying "yes, I hand't thought about it like that but now it's obvious". There aren't many programming book ...more
Rafael George
Oct 25, 2012 rated it really liked it  ·  review of another edition
This is a good book for learning about object oriented design using the Ruby programming language. From a pragmatic point of view, it could be better with some exercises; but from a conceptual one it's great. I'll be referencing this book a lot every time I'm working in a new app till I get everything in it right. Even if the design of good unit tests can be a book on itself, Sandi manage to provide enough information to start creating better tests on your Ruby applications. A must read.
Leandro López
Jan 26, 2016 rated it it was amazing
Excellent read, no matter how much experience you have or if you use Ruby or not.

I was a bit skeptical at first, 'cause I thought the book was going to tell me things that I already knew. Boy was I wrong! I already feel that I've learn a lot and can't wait to apply all this new knowledge on my next and existing projects.

I think it's definitely a must have in your library as a reference. Very well written, simple yet very understandable examples, and lots of insights.
Federico Saravia
Feb 13, 2017 rated it it was amazing
I read this book in a time where functional programming is gaining a lot of traction and it was both refreshing and reassuring to read it.

This book approaches OOP with grace and simplicity, showing the strength of Ruby and OOP in small but concrete examples. As much experience I have on the field, this book taught me a lot and I think everyone who takes programming seriously and loves Ruby must read it. I'll definitely read it again a couple of times.
Paul Kuruvilla
Jan 03, 2018 rated it really liked it
Well-crafted analogies that really drive the point home. The last section on testing is gold. There's a 30 min talk based on it (by the author) that is available for free:

Would've rated 5 stars if it wasn't for the unnecessary dissing of statically typed languages.
Mar 28, 2014 rated it it was amazing
I am going to make this book compulsory reading for every Ruby developer I work with from here on out, and if I need to compel them too hard, I probably won't stay working with them for much longer.
Svetlio Blyahoff
Mar 28, 2015 rated it it was amazing
Shelves: ebook
A very good read in deed. Adds a great understanding of OO design and ways of using different design patterns appropriately.
May 19, 2015 rated it really liked it
Shelves: programming
Very approachable tone, pretty clear examples.
Apr 06, 2016 rated it it was amazing
I wish I read this years ago, but I think it hits home more for me because I can relate to design headaches I've already experienced.
Nov 25, 2016 rated it really liked it
This is a really good book, and I liked it a lot, but it feels weird to give a programming book 5 stars
Aaron Wolfson
Mar 03, 2014 rated it it was amazing
This is the gold standard for practical programming texts.
Dmitry Khmara
Apr 05, 2019 rated it really liked it
I would definitely recommend this book for absolute beginners and for those with some experience in software development. Read it through, go write some code, and reread it again in 6-12 months.

For an experienced developer, there may be no new concepts in the book, but it is still a good opportunity to refresh your knowledge. And Sandi’s cycling coding examples are just brilliant.

The book will teach you how to create stable abstractions and design maintainable hierarchies, when to chose composi
Robert Hernandez
Mar 30, 2020 rated it it was amazing
Amazing. There are many books that claim to teach you concept without teaching you the language, and this does just that through the power of ruby. Even for those who might not understand ruby but understand the concepts of OOP, this book teaches you how to further elevate your thinking to write OOP that is decoupled in nature, but powerful to put together. It covers composition which is usually overlooked by its “favored” cousin inheritance, which is great to see the power of each and weaknesse ...more
Oct 19, 2017 rated it really liked it
Shelves: programming
I love the Ruby language and I have loved it pretty much from the first time I found out about it. My brain loves creating connections between concepts, and coming up with abstractions to depict situations, problems and solutions. This book gave me a dose of both Ruby and abstractions that was very soothing.

Sandi has a very engaging way of writing, very much like the way she talks at conferences. She's neither patronizing nor overly complicated when explaining topics, but rather finds a great ba
Jose Lobato
Apr 21, 2019 rated it it was amazing  ·  review of another edition
Somehow I have recovered the will to read technical books. I stopped some time ago and only managed to read one a year. But books like this one are the ones that push you not to stop reading. I got to be honest, and I should say that I have not learned very much with this book. After so many years developing software and interacting with so many good and bad developers you reach the same conclusions that Metz is explaining in the book although I found some ideas on inheritance that are kind of n ...more
Adrian Cuadros
May 13, 2017 rated it it was amazing
I recommend this book as a must read for any novice to intermediate developer and as a communication tool for more experienced folks. The core is really about design and much less about ruby specifics. It touches on design best practices and concepts really clearly and gives easy to understand examples of subjects like: Single responsibility principle, the law of Demeter, duck typing, inheritance, composition, testing and more.

The big selling point is that Sandi writes from a highly practical po
« previous 1 3 4 5 6 next »
topics  posts  views  last activity   
Læsegruppe for ud...: Snart tid til at snakke om resten af bogen 8 4 May 13, 2013 06:11AM  
Læsegruppe for ud...: Forslag til næste bog 23 7 Apr 22, 2013 04:57AM  

Readers also enjoyed

  • The Well-Grounded Rubyist
  • Refactoring: Improving the Design of Existing Code
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • The Pragmatic Programmer: From Journeyman to Master
  • Agile Web Development with Rails: A Pragmatic Guide
  • Clean Architecture
  • Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • Test Driven Development: By Example
  • Designing Data-Intensive Applications
  • Growing Object-Oriented Software, Guided by Tests
  • Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People
  • Remote: Office Not Required
  • Working Effectively with Legacy Code
  • Head First Design Patterns
  • Shape Up: Stop Running in Circles and Ship Work that Matters
  • The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change
  • Effective Testing with Rspec 3: Build Ruby Apps with Confidence
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

Other books in the series

Addison-Wesley Professional Ruby Series (1 - 10 of 14 books)
  • Eloquent Ruby
  • Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series)
  • The Rails 3 Way
  • Rails Antipatterns: Best Practice Ruby on Rails Refactoring
  • Service-Oriented Design with Ruby and Rails
  • Distributed Programming with Ruby
  • Refactoring: Ruby Edition, Adobe Reader
  • Design Patterns in Ruby
  • The Rails Way
  • Professional Ruby Series Writing Efficient Ruby Code

News & Interviews

Ashley Poston made her name with Once Upon a Con, a contemporary series set in the world of fandom, and her two-part space opera, Heart of...
38 likes · 6 comments
“You don’t send messages because you have objects, you have objects because you send messages.” 7 likes
“Novice programmers don’t yet have the skills to write simple code.” 7 likes
More quotes…