The Art of Clean Code: Best practices to eliminate complexity and simplify your life, by Christian Mayer, No Starch Press
If you wanted a short primer on how to be an exceptionally productive programmer, you could do a lot worse than Christian Mayer’s 142-page book. Mayer, a computer science PhD and founder of the Finxter.com Python site, has written an extremely readable book that will probably benefit not just coders but also anyone who wants to organize and spearhead a product development effort. As you might expect from his background, Mayer uses Python code to illustrate a lot of his concepts, but the code in this book is not extensive. Even non-Python programmers will be able to get the gist of the points he makes.
The premise of the book is that there are ways of reducing complexity that allow coders to work less while getting more value from results. It makes this point by examining nine principles, none of them new, but not necessarily applied to coding before Mayer’s treatise.
Mayer starts off by examining complexity, not just in coding but also in life. He expands the principle by covering the old 80-20 rule—80% of effects typically come from 20% of causes—but does so in a way that involves fractals, therein providing some interesting insights on this effect. As with several of the topics Mayer covers, this concept has implications outside programming. Ditto for other sections of the book devoted to performance optimization, building minimal viable products, and the build/measure/learn cycle.
The main thrust of Mayer’s thesis is covered in chapters on writing clean and simple code and on the Unix philosophy of doing one thing and doing it well. Less-experienced programmers may find several aspects of this material illuminating like, for example, readability trumps CPU cycles, and that small focused kernels work better over the long haul than monolithic programs that are perhaps more efficient. Also interesting are chapters on flow and on design and user experience.
In a nutshell, readers of this book will likely come away as believers in a more minimalistic mindset. Moreover, the book lives up to its title: The lessons taught can be applied not only in coding but also toward making the reader’s life generally more productive and successful.