HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Design Patterns in Ruby

Russ Olsen · 4 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Design Patterns in Ruby" by Russ Olsen.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Praise for Design Patterns in Ruby " Design Patterns in Ruby documents smart ways to resolve many problems that Ruby developers commonly encounter. Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby. He clearly explains each idea, making a wealth of experience available to Ruby developers for their own daily work." ―Steve Metsker, Managing Consultant with Dominion Digital, Inc. "This book provides a great demonstration of the key 'Gang of Four' design patterns without resorting to overly technical explanations. Written in a precise, yet almost informal style, this book covers enough ground that even those without prior exposure to design patterns will soon feel confident applying them using Ruby. Olsen has done a great job to make a book about a classically 'dry' subject into such an engaging and even occasionally humorous read." ―Peter Cooper "This book renewed my interest in understanding patterns after a decade of good intentions. Russ picked the most useful patterns for Ruby and introduced them in a straightforward and logical manner, going beyond the GoF's patterns. This book has improved my use of Ruby, and encouraged me to blow off the dust covering the GoF book." ―Mike Stok " Design Patterns in Ruby is a great way for programmers from statically typed objectoriented languages to learn how design patterns appear in a more dynamic, flexible language like Ruby." ―Rob Sanheim, Ruby Ninja, Relevance Most design pattern books are based on C++ and Java. But Ruby is different―and the language's unique qualities make design patterns easier to implement and use. In this book, Russ Olsen demonstrates how to combine Ruby's power and elegance with patterns, and write more sophisticated, effective software with far fewer lines of code. After reviewing the history, concepts, and goals of design patterns, Olsen offers a quick tour of the Ruby language―enough to allow any experienced software developer to immediately utilize patterns with Ruby. The book especially calls attention to Ruby features that simplify the use of patterns, including dynamic typing, code closures, and "mixins" for easier code reuse. Fourteen of the classic "Gang of Four" patterns are considered from the Ruby point of view, explaining what problems each pattern solves, discussing whether traditional implementations make sense in the Ruby environment, and introducing Ruby-specific improvements. You'll discover opportunities to implement patterns in just one or two lines of code, instead of the endlessly repeated boilerplate that conventional languages often require. Design Patterns in Ruby also identifies innovative new patterns that have emerged from the Ruby community. These include ways to create custom objects with metaprogramming, as well as the ambitious Rails-based "Convention Over Configuration" pattern, designed to help integrate entire applications and frameworks. Engaging, practical, and accessible, Design Patterns in Ruby will help you build better software while making your Ruby programming experience more rewarding.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I've seen multiple people mention the GoF's Design Patterns book. This is well known and worth several reads through; it will take multiple passes to grok all of it.

There are several other books that have tried to explain the GoF's Design Patterns in either an easier to approach manner, or in the context of a specific language they have tried to explain where new design patterns have emerged or the original patterns had mutated.

A couple of those worth checking out are

"Head First Design Patterns"

http://www.amazon.com/Head-First-Design-Patterns-Freeman/dp/...

"Design Patterns In Ruby"

http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/032...

"Learning JavaScript Design Patterns"

http://www.amazon.com/Learning-JavaScript-Design-Patterns-Os...

Among the books "programmers have read", I have read K&R, Programming Pearls and bits and pieces of Effective Java and C++. I thoroughly enjoyed these books.

The other books on the "have read" list are on my "don't bother reading" list. Code Complete, Pragmatic Programmer, Mythical Man Month et al aren't my kind of books. As far as design patterns go, I believe if you code in Python/Ruby/Perl etc, books covering them in Java/C++ are needlessly verbose and boring. I recommend Alex Martelli's talks

http://www.youtube.com/watch?v=0vJJlVBVTFg

http://www.youtube.com/watch?v=1Sbzmz1Nxvo

And this book which covers design patterns using Ruby.

http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/032...

Both approaches actually show you practical examples of design patterns in the standard library or real world problems, and shuns patterns which aren't applicable to the language or are too trivial. These talks aren't the end-all, but they will give you a good overall knowledge, and will make further exploration easy.

And from the "haven't read" list, CLRS is a good book and isn't as dense as it is generally taken to be. It does have sections on proofs, but you can skip it and jump directly to the data structure/algorithm. The pseudo code used in the book is extremely clear, and will convert to simple python in most of the cases. Use it as a reference, or read first few hundred pages. If the book isn't for you, you will know it after you have read the first 100 pages.

Another book I recommend is Sedgewick's book on Algorithms. I have read the C version. It mostly covers basic data structures and some accompanying algorithms. The code is succinct(sometimes needlessly so) and more importantly, it works. It doesn't sit well with everyone, but I liked it - it helps me see the whole picture without bombarding me with a lot of code.

Skiena is another obvious favorite.

Dragon book is decent, but you need guidance and discipline to make anything out of it. Consult your peers or teachers while using the book, or use another book.

I haven't read TAOCP and it's low on my list for now. I have read bits and pieces and I didn't find it as fascinating as I had hoped. It's dense and extensive, and can be used as reference.

"Effective C++" will be a better alternative to "The C++ programming language". But I must say, when I first read "The C++ programming language", I found it fascinating - lengthy, but fascinating. That would be mainly because I was beginning programming when I first read it.

The Rails Way is pretty good.

http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-...

I've found the peepcode webcasts worth their weight in gold, but that's not a book =)

And I found Design Patterns in Ruby pretty good for Ruby beginners

http://www.amazon.com/Design-Patterns-Ruby-Addison-Wesley-Pr...

http://peepcode.com/

luminary
Thank you, sir.
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.