|Adam Petersen - Software Development Pages, Book Reviews Section|
Multi-Paradigm Design for C++
After visiting a talk by Coplien at ACCU
2007 I had high expectations on this book. Fueled by motivation I
picked it up, started to read, and came close to put it away already after
the initial chapters. Still, given Coplien’s track-record,
I knew there have to be some gold here, and on I went. At the end I’m
glad I made it though the book, but it was by no means an easy read. The
reason is Coplien’s writing style. The text is decorated with an
almost poetic touch and several concepts are clearly overcomplicated,
something that hinders the understanding and results in a dense book Large
parts have an academic tone to them, which is a shame because the techniques
of Multi-Paradigm Design are very pragmatically oriented.
An important artifact of commonality analysis is a document capturing the domain vocabulary; something every project would benefit from. This vocabulary also drives the design of the code itself, which ensures that the mapping between the problem domain and the resulting solution are kept.
During his discussion of variability analysis Coplien illustrates how to analyze and capture binding times for variabilities and specifies their C++ representatives (the binding times in C++ include source time (e.g. templates), compile time (e.g. function overloading), link time, and run-time). Interestingly enough, this sounds very similar to the seminal Generative Programming book, and it is clear that Coplien’s work has been a significant influence.
The later chapters in the book cover implementation techniques necessary to realize the resulting design. This is the only part of the book that hasn’t aged well with respect to modern C++, mainly when considering exception safety. The code also has a few bugs that makes some examples hard to follow (make sure to check out the errata). However, these are really minor nits as the main ideas still apply.
Finally Coplien walks us through some examples of Multi-Paradigm Design and this is where the book really takes of; all concepts are cleverly glued together and the read starts to pay-off and feel rewarding. Coplien finishes with a chapter on patterns in the context of Multi-Paradigm Design. Coplien, being a pattern expert and one of the key people in the patterns community, has a very interesting touch where he discusses how patterns solve different problems of commonality and variability. It’s not an exhaustive pattern review and as a reader you have to know the GoF patterns quite well to make sense of it.
It’s great material, but the problem with teaching analysis and design is that so much of it is an intuitive and non-deterministic process, no matter what heavyweight methodologies may indicate. Coplien avoids this trap and honestly points out that analysis requires domain expertise, intuition and experience. If you lack domain expertise in your project no techniques in the world will give you a good design; it’s really fundamental.
I like Coplien’s pragmatic approach and this book may well change the way you look at software development. The book has much to teach an experienced C++ programmer, but to successfully implement the techniques on a project you’ll need manager support as many of the techniques have non-technical implications.
Reviewed June 2007
|©2005 Adam Petersenemail@example.com|