Head First Design PatternsHead First Design Patterns by Eric Freeman

My rating: 5 of 5 stars

Dear Readers!

I’m very pleased to presenet my newest review, as it took quite some effort to get through this particular book. The effort was needed not so much for understanding the contents, but for the translation of the book’s Java code base into C++. In addition to familiarizing myself with a lot of Object-Oriented design principles, I had the opporunity to learn a great deal about C++, the difference between Java and C++, compiler error messages and source code management as well, all thanks to this little translation project. Finally, in order not to leave a chapter without a translation, I also needed to make my first ingress into concurrency and especially Qt, of which I’m especially happy. Thus, all in all, it was time well spent, not to mention all the valuable experience I got out from all this.

Lastly, in addition to the usual sharing of my goodreads review, I’m providing the translated code as well, which one can find on my github page. In case you have suggestions how this code can be improved, please don’t hesitate to drop me a mail or use github’s facilites. Until that, please enjoy the review.

I bought this book in the hopes of getting a nice introductory piece on design patterns, but it turned out to be quite more than that. While some of the other books on the subject are more of pattern catalogs, this one is a guide to design patterns and object oriented programming in general. All chapters are fashioned in a way, that patterns don’t just suddenly hit the reader out of the blue, but instead they are introduced in a more natural way. Each time chapters start with real world problems to which the authors thankfully provide some initial working, yet bad solutions. They also never fail to discuss why those solutions would fail in the long run and how they could be transformed into something that can stand the test of times better, using design patterns of course.

The authors also do not restrict themselves to discussing design pattern alone, but they also provide quite a few related recommendations, mind exercises and comparisons to broaden the readers’ views. Such exercises include crosswords, code puzzles, simple questions, matching tasks and more. While comparisons, which similarities and dissimilarities between their structure, intent and implementation is revealed, the exercises are about broader views, all helping to understand the whys and hows. At the end of each chapter there are also nice summaries, to which the reader can always refer to if there is a need for a bit of recap of chapters already read, and near the end of the book the authors also include a nice discussion about design pattern catalogs and a few words about how to use them, which is a definite plus.

Moreover, all these discussions are done in a very informal way with quite a few drawings and images, so this otherwise dry subject becomes rather enjoyable actually. There is also an ample amount of (Java) code examples, so besides imagining how all these patterns would work, one can directly examine them on their own computers as well. The code examples are just as informal (in naming) as the rest of the book, so learning is fun all the way through. Obviously, despite it being sizable, the book cannot include all the code, thus a freely downloadable package containing every piece of code was also made available. The quality of the code is rather good, but as the authors state, the structure of these mini-programs is not always like it would appear in real world situations, instead, they are presented in a way to make the general idea behind the solutions sink in easier.

So all in all, the authors achieve everything they set out for, and perhaps even more, hence the five stars. If you need an excellent introductory book on design patterns and object oriented programming in general, look no further, this will set you up quite nicely. I would highly recommend reading this as your very first piece on design patterns, and if possible, try to translate it into a different programming language to avoid copy-pasting and make things stick better. Since I honestly can’t come up with anything that I would say is lacking in this book, and the structure, the content, the quality and the amount of discussion is superb despite the highly informal presentation, it will definitely set you up for further, now educated explorations in the subject._

View all my reviews