O’Reilly Media, Inc., 2024. — 98 p. — ISBN: 978-1-098-15124-9.
Tidying up messy software is a must. And that means breaking up the code to make it more readable, using guard clauses, and helping functions to make it understandable. In this practical guide, author Kent Beck, creator of Extreme Programming and pioneer of software patterns, suggests when and where you might apply tidying in your code.
Instead of trying to master tidying all at once, this book lets you try out a few examples that make sense for your problem. If you have a big function containing many lines of code, you'll learn how to logically divide it into smaller chunks. Along the way, you'll learn the theory behind software design: coupling, cohesion, discounted cash flows, and optionality.
This slim volume, the first of a series, is for professional programmers – that breed of software developers with a deep and geeky interest in their craft and in improving their work in small ways with big payoffs. The author, Kent Beck, is just such a dedicated professional, ever attentive to detail and ever in tune with the larger issues and the bigger picture. Practicing software developers often pay scant attention to theory, but Kent knows what he is talking about when he mixes practice and theory into a guide to tidy code that is both readable and practical.
In theory, there is no difference between theory and practice, while in practice there is. In bringing theory and practice together, Kent starts at the bottom, with tiny snippets of code and meticulous attention to small details, then works his way up to the larger view that explains the process of creating cleaner code that is more robust in the face of inevitable changes and corrections. In assembling this guide to practice, Kent ultimately draws on the real-world economics of software development along with core theory in software engineering.
What You Will Learn:By the end of this book, you will understand:
The fundamental difference between changes to the behavior of a system and changes to its structure.
The enabling magic of alternating investment in structure and investment in behavior, as a lone programmer changing code.
The basics of the theory of how software design works and the forces that act on it.