Book Review: Head First Design Patterns

Book details

  • Book: Head First Design Patterns
  • Authors: Eric Freeman, Elisabeth Freeman, Kathy Sierra and Bert Bates
  • Publisher: O’Reilly (November 2004)
  • Purchase the book:

My Summary: 5 out of 5

For a book with about 650 pages, I got through this really quickly (for me, that is — about 8 hours)!

That should hopefully help summarize my view that I really liked this book.

An excerpt from the back cover answers the question, “What’s so special about this book?”:

We think your time is too valuable to spend struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First Design Patterns uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Head First Design Patterns

Using funny examples like duck simulators and gumball machines instead of some technical, boring algorithm or graphical windows application meant it was likely to be more memorable, and, crucially, not get bogged down in details about the application at hand, but the pattern being demonstrated.

The example code is in Java. I have been using .NET/C# as my main programming language at work the past 4 or 5 years, but this is no problem at all, as C# and Java are very similar, syntactically.

Book contents

Table of contents are as follows:

  1. Welcome to design patterns: an introduction
  2. Keeping your Objects in the know: the Observer Pattern
  3. Decorating Objects: the Decorator Pattern
  4. Baking with OO goodness: the Factory Pattern
  5. One of a kind Objects: the Singleton Pattern
  6. Encapsulating Invocation: the Command Pattern
  7. Being Adaptive: the Adapter and Facade Patterns
  8. Encapsulating Algorithms: the Template Method Pattern
  9. Well-managed Collections: the Iterator and Composite Patterns
  10. The State of Things: the State Pattern
  11. Controlling Object Access: the Proxy Pattern
  12. Patterns of Patterns: Compound Patterns
  13. Patterns in the Real World: Better Living with Patterns
  14. Appendix: Leftover Patterns

The first chapter also introduces the Strategy Pattern.

The leftover patterns also have decent descriptions for the following patterns:

  • Bridge
  • Builder
  • Chain of Responsibility
  • Flyweight
  • Interpreter
  • Mediator
  • Memento
  • Prototype
  • Visitor

The good

All sorts of good things in the book, including:

  • Funny examples — making it more memorable
  • Simple examples — letting you understand the pattern, and avoid worrying about the technicalities of the scenario
  • Side notes, pictures, exercises — encouraging you to write things down, and think about things
  • Imaginary conversations, repetition of points through different analogies and examples — reinforcing what you have learned
  • Reviews and summaries that build up chapter after chapter — further reinforcement

The bad

Couldn’t think of anything bad about the book — maybe that it is big and heavy, and that it would be nice if all the left over patterns got the same treatment (then I could update this “bad” section to say it is about 1000 pages!)

The ugly


Get the book

If you want to purchase it, or see more info (including reviews by others), look at the Amazon web site (note if you purchase the book via this site, then I will get a referral fee/bonus from Amazon’s associates programme).

These are similar books I have read on this topic:

  1. Design Patterns; Elements of Reusable Object-Oriented Software, by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (Addison Wesley, 1995). Some additional details:
    • This is regarded as the “classic” or original patterns book by the Gang of Four (also referred to as Gof).
    • It is well structured, grouping the various patterns into creational, structural, and behavioral patterns.
    • It uses a mixture of C++ and SmallTalk examples.
    • It is more formal and “dry” compared to Head First Design Patterns so took me a lot longer to get through, but is still good.
    • If I had to rate this, then I’d probably give it something like 3.5 or 4 out of 5.
    • Get more info from Amazon UK or from Amazon USA
  2. C# Design Patterns; A Tutorial, by James W. Cooper (Addison Wesley, 2003). Some additional details:
    • This book, as the name suggests, is specifically geared towards C# developers.
    • While C# 2.0 has come out since (with support for Generics etc) many of the techniques still apply.
    • Quite a lot of the book goes into explaining Object Oriented Programming, and C# language features which most seasoned C# developers could skip.
    • It is a bit dry and sometimes uses examples related to drawing desktop graphical applications or mathematics, so some of those details get in the way of explaining/highlighting the pattern.
    • In places it also uses Java-like conventions (such as code formatting and getter/setter methods rather than C# properties).
    • If I had to rate this, then probably 3 out of 5 (or, now that I have read Head First Design Patterns I might knock this one down to 2 out of 5 for comparison!).
    • Get more info from Amazon UK or Amazon USA

8 thoughts on “Book Review: Head First Design Patterns

  1. Sounds like they’ve struck on the perfect format for technical books there -a welcome antidote to page after page of dry head hurting code!

  2. Arpey, I agree — there’s been a lot of other books I’ve read on other aspects of programming or design since (not got round to mentioning them here yet – not had much time on this site in recent years!) and none have the style of this book (though some of them are very good in their own right, to be fair…)

  3. Technical books as such really need to look much inviting for readers to be motivated. The book designer of this book is truly creative to have come up with the idea.

  4. “Head First Design Patterns uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.”

    Yeah I’ve read several of those dense technical books that puts you to sleep. Good thing these authors are using the latest research to better teach us design.

  5. I have read a lot of the “head first” books and they make learning quick and easy due to their wonderful style which pulls out the important stuff and puts it into easy to understand case studies.

    They also incorporate a lot of images and use humour to make the material easier to digest.

    This is a great introductory book for anyone looking to learn design patterns (which will save you a lot of time and get you doing things professionaly).

    jessica smith
    web designer and framing nailer blogger

  6. quoted ” Sounds like they’ve struck on the perfect format for technical books there -a welcome antidote to page after page of dry head hurting code!”

    good line head hurting code . anyways i had this book and for my review its all good

    Greg of Brisbane

  7. I think this a brilliant concept. Though most of the programmers I know have a inherent and unusual tolerance of the dull and dry…there are millions breaking into the tech field and this will help them to gain the information and retain in it in order to better implement there own unique pieces.

  8. The book seem to be salable to all programmers. Stating that “the ugly” part of the book is “nothing”, will surely be a lot more convincing for the prospect buyers. Good job!

    Susie Gene

Comments are closed.