Design Patterns

Amazingly, there are still many developers out there that have never read Design Patterns Elements of Reusable Object-Oriented Software:

image

This book was the start of the design patterns revolution, and if you haven’t read it yet and you are serious about writing software, you should stop reading your Star Trek fan fiction and instead rush out to buy this book and read it.  But, with two caveats:

  1. Do not read it cover-to-cover – it’s just too dry and you’ll find yourself consuming large amounts of liquids (H2O or C2H5OH) just to get through it.   I mean seriously, I’m a pretty hard-core geek and I still didn’t want to read this book cover-to-cover.  Instead, I read the introductory chapters in their entirety because they were interesting, and then I just read the first page and a half of each “pattern chapter”; this approach gives a nice overview of the available patterns.  Then, when you’re working on a problem and get that nagging “I’ve seen this before” feeling, you can flip through the book, find the relevant pattern and read the now suddenly interesting chapter in its entirety, solve your problem 10 times faster and more elegantly than you would have otherwise, and THEN you can go out and sip your liquid of choice with your many happy friends on a sunny patio.
  2. Do NOT read this book and then attempt to apply every pattern to your code in the next month.  Seriously.  This book is full of awesome ideas, many of which I have used many times, and some of which I still haven’t needed to apply.  This book provides you with a toolbox of great solutions to apply to very specific problems.  Don’t go looking for problems that need a solution.  I knew a guy that read this book, and then applied one pattern to his code every day for the next month, whether the pattern was relevant or not.  It made his code really, really bad.  Please don’t do this.  If you do, people will think your code stinks, and then probably think that you stink, and then not even the ugly girls (or boys, whatever you’re interested in) will want to dance with you at the next company party, and pretty soon you’ll find yourself all alone because everybody moved to a new corporate headquarters and forgot to mention it to you – all because you decided to apply these design patterns where they weren’t appropriate.
  3. Go to #2.  Then go study up on infinite loops.
Advertisements

1 comment so far

  1. Tom B on

    I found O’Reilly’s, Head First Design Patterns a great way to learn the basics and use the GoF as a resource.
    http://oreil.ly/U01Sj


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: