Implementation Patterns - by Kent Beck
Posted on January 17th, 2015
Kent Beck provides on this book much lower level details into his programming preferences. He presents and discusses a lot of very common programming options and decisions.
Starting the book with some explanation into why those small decisions are important in the overall development of any application, Beck presents arguments to justify the care for each decision in te book along with explanations into how to read and understand the book.
He moves on to talk about specific implementation patterns around classes. From naming the class to structuring them into packages going through attributes and methods, multiple aspects about a class are covered. The approach is never to label a certain practice negatively but always to present the advantages it brings such as abbreviating names helps improving typing speed as well as "glancing" speed but not necessarily reading speed. And Beck argues quite well that every effort should be directed towards optimizing reading code rather than the other aspects except, in very rare cases, performance.
The one thing that makes me pretty said is his suggestion in favor of fVariableName or lVariableName to differentiate between attributes/fields and local variables. He also defends the IStatus naming to differentiate between an implementation and an interface. Slightly disappointing nowadays.
He moves on to talk about behavior patterns. Mostly methods and chunks of code. Nothing very impressive here. General techniques and some advantages vs disadvantages presented. In the state of impartiality all sorts of techniques are presented with appraisals and negative points.
Moving on to methods, the books gets a little heavier on the Java side since a lot of the details are pretty focused on the way Java is structured. Ignoring those which talk about method signatures, return types and special methods, most of the effort goes around naming and levels of abstraction.
It moves from there into the Java collection framework. The chapter starts by describing all the interfaces and implementations available from a short theoretical stand point and then moves on to a performance comparison of the main implementations. Although informative and educational, the analysis provides little in terms of usage or implementation insights. The books only appendix speaks more about the way the performance measures were taken in what seems to be an odd distraction from the book's main subject.
The book finishes by creating an exceptional case regarding implementation patterns for Framework development. The main point being around the fact that Frameworks are meant to be "consumed" by other programmers to achieve another goal than the one of the framework author. Being so, there are concerns about coupling, release and other concerns that go deeper than just regular application development.
Overall, the book is probably my least favorite Kent Beck book. The discussions are valid but very basic and taking on some practices that are very specific to a certain Java context that feels slightly outdated. For each chapter I caught myself expecting higher level arguments backed by actual code samples but only got slightly low level practices without as much of the valuable judgement side of each implementation. I would recommend the book for students that have reached the end of their first year of programming course and want some arguments around why certain things feel better than others. For people who have lived in a medium size codebase for over a year with a team of what Bob Martin would call Clean Coders, most of the contents of the book are probably very engrained in their mind and little would be valuable from reading the book except for the reference to point colleagues to.