Book review: Tidy First?

Clean up first? The new book by software development legend Kent Beck has now been published in a German translation and is arousing curiosity.

Save to Pocket listen Print view
Buchrezension: Product Ownership meistern

(Image: iX / generiert mit ChatGPT)

5 min. read
By
  • Ralf D. Müller
Contents
This article was originally published in German and has been automatically translated.

Kent Beck
Tidy First?
Mini refactorings for better software design
O'Reilly, March 2024
124 pages, from 26.90 euros (print/digital)
ISBN: 978-3-96009-244-5

Kent Beck is not only known to most developers through the Agile Manifesto and his books on Extreme Programming and Test-Driven Development. His work has long since propelled him into the software development hall of fame.

Ralf D. Müller

Ralf D. Müller beschäftigt sich hauptsächlich mit verschiedenen Aspekten der Softwarearchitektur und dem Softwaredesign. Er hat sich auf Architekturdokumentation spezialisiert und ist ein Verfechter des arc42- und des docs-as-code-Ansatzes.

I have devoured many a book without reading the foreword and introduction, as these usually do not contribute to the content. This is different here, because the introduction already contains two important pieces of information.

Firstly, "Tidy First?" is the first book in a series of as yet unwritten books on the subject of software design. This explains the book's slim 124 pages and why the hunger for knowledge is not yet completely satisfied after reading it. As with a good TV series, at the end I ask myself whether I should have waited for the other parts and then devoured them in one go.

(Image: dpunkt.verlag (O'Reilly))

Secondly, Beck defines software design as an "exercise in interpersonal relationships". An important aspect, because too often I have optimized my code not with readability as the highest quality criterion, but rather with the high art of my skills in focus. True to the non-serious motto, the code was difficult to write, so it should also be difficult to read, code likes to demonstrate the cognitive abilities of the author and forgets that it actually depicts the human-machine interface from the developer's point of view. Accordingly, Beck's definition promotes collaborative work on code through good readability.

The book is divided into three parts, the first two of which are devoted to practice and the last to theory. The practical sections on tidying up and how to use it correctly are written in the relaxed style of a blog post and convey the ideas without going into great depth. The practical sections can therefore be devoured quickly.

In the first part, Beck describes various approaches in 15 chapters on how to tidy up code to make it more readable. Each approach is briefly illustrated with pseudo-code. The approaches seem like a guide to the Boy Scout rule that you should leave every place or every snippet of code in a better state than you found it.

For experienced developers, most of the ideas for tidying up will seem banal (e.g. "write explanatory comments"). However, it is useful to see them all put down on paper in a structured way.

The second part is about how best to use this tidying up. When is it worth tidying up? Do I first make my changes and tidy up when everything is working? Or do I tidy up first to make it easier to implement my change?

The third part is the most exciting, as it deals with the theory behind tidying up and therefore software design. Beck explains his theory in twelve short and concise sub-chapters. He defines the concept of software design as a "beneficial relationship between elements". Where I missed a little more content at the beginning of the book, the texts become more detailed at this point and encourage reflection.

To make the value of software design easier to grasp, Beck draws an analogy to finance and the value of options. For someone familiar with the world of finance, this comparison is certainly helpful, but for others it can be confusing. Cleaning up the code to improve the software design to keep more options open for features in the future is a balancing act. How much time do I want to invest now to make it easier to make a change later that may never come? The third part of the book provides the right answers to this and similar questions.

The new book "Tidy First?" by Kent Beck is interesting and makes me curious about the other parts of the series on the subject of software design. The translation is a success. However, at the beginning I checked the original from time to time and realized that the writing style is sometimes unusual, even in English. In terms of content, it offers interesting views on refactoring code, above all to simplify work on the code and not just for the sake of refactoring.

[Editor's note: dpunkt.verlag, the publisher of the German-language O'Reilly book, is, like iX, part of the heise group]

(anw)