Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
My own anticipation of this book was mixed with some reservations: I had harvested the Object Mentor website for years, digesting and even ruminating all those articles and previews which would make the bulk of its content. Would there be anything new to be found? I had also noticed that Robert C. Martin had changed his focus from C++ almost completely to Java in the last few years, and is even strongly advocating now the use of dynamic, scripting, OO languages like Python and Ruby. The book would contain a lot of Java code examples. Would there be enough interesting stuff in it for me?
After finally receiving the book - an euphemism for 'robbing it from my the desk of my boss before he could really notice' - I was extremely pleased and even surprised by what I actually got.
The book looks very beautiful, with a richly coloured cover, almost like those popular introductory physics textbooks, with wonderful illustrations throughout, and lots of well-rendered UML diagrams and splendidly typeset code examples in all shapes and sizes. It is also very well organized, which was a pleasant surprise after I had tried in vain to understand the table of contents that is available online. (Note that he back cover text contains some of this seemingly inevitable marketing speak nonsense. The most disturbing - plain wrong and almost unbelievably stupid - assertion is that the book contains a wealth of reusable C++ and Java code. Why do first-class authors like Robert C. Martin allow such rubbish to be thrown at their books? )
Much to my astonishment, a large part of the code examples were written in C++, all the others in Java. No scripting language anywhere. Indeed, given that the book promotes Agile Methods and Extreme Programming at large, and the author mentions the huge impact of the internet colliding with the planet, the focus is refreshingly conservative, about writing programs and components, not just web services and stuff. (I'm a C++ programmer working on simulation and data preparation software products for the semiconductor industry.)
The C++ code shown - I can't speak for the Java examples, of course, but they look very nice, too - is of high quality, adhering to a sensible naming convention and really illustrating one of the most important points in the book, the Agile and XP mantra that code must communicate its intent as clearly as possible. Code examples are used to demonstrate all design principles and patterns mentioned, and a dedicated programming episode shows the practices - pair programming, test-driven development, simple design, refactoring and targeting design patterns - in action.
Of course, the case studies shown - as far as they are complete - are very small, and are intended to illustrate techniques that are only really beneficial for medium to large projects. This is the typical problem with teaching advanced topics and it can only be solved if you are able to abstract away from the examples to a certain extent. But if you can't, why would you develop software?
The other main point of the book is the idea that dependency management is the single most crucial issue with growing and evolving software. In the authors opinion OO techniques are so very useful simply because they allows dependencies to be managed very effectively. This has of course attracted strong criticism from those who promote the OO models the real world better and/or the OO fits the way we think better view, as well as critique for empirical-pragmatism. You make the call whether these accusations speak for or against this book.
As a passionate C++ programmer strongly interested in generic and multi-paradigm programming and modern C++ styles and techniques, I find the complete lack of discussion of these topics a bit unfortunate. Robert Martin discusses templates only as alternative to interfaces in speed-hungry programs and as a useful code-duplication remedy. (Please don't misunderstand me, he uses STL containers, algorithms and iterators were appropriate.) He also has the good taste and judgement to defer any discussion of C++ resource management and exception safety to the real experts on that topic, urging his readers to run, not walk, and get Herb Sutter's books, which is definitely good advice, if they want to do real C++ programming.
I'm convinced that quite a lot is left to be said about the interaction between modern, multi-paradigm C++ and Agile Development Methods. But no book can cover everything, and I'm not really unhappy that this one leaves room for a more specialized treatment of those issues.
To balance these omissions, the book also avoids any discussion of dynamic languages. Using those should have a tremendous effect on the dependency management issues shown. You don't need templates, you don't need inheritance, and many of the patterns discussed in the book are probably not needed any more or change significantly in focus - e.g. the gist of the visitor pattern is understood almost completely different by C++ vs. Ruby programmers.
Now for some more of the praise I should probably give to the book since I declare it to be highly recommended:
This book shows you how to effectively and efficiently design and code software that fulfils its duty now and can withstand the changes to come in the future. It tells you how to keep software soft and avoid the problem of software rot.
Robert C. Martin emphasizes that you cannot achieve these goals just by adhering to a process, even if it would be XP. Neither would you succeed with slavishly doing OO and using patterns. You need to have knowledge, experience, talent, creativity, and discipline, and you need to balance all those virtues with each other. And 'you' in the preceding sentence should better refer to a team working closely together and communicating well.
This book is also extreme fun to read. This is good and even important, because the book also shows you that software development can be fun, and should be fun, and that having fun isn't contrary to, but indeed necessary to, a high productivity process and a high quality product.
If you want to, have to, or just happen to program in C++ and/or Java - or at least can understand examples in those languages - and want to improve your way of writing software - whether or not you want become agile or to go extreme - you will probably profit from reading this book.