<aside> <img src="/icons/info-alternate_blue.svg" alt="/icons/info-alternate_blue.svg" width="40px" /> Tidying up messy software is a must. And that means breaking up the code to make it more readable, and 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 tidyings 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.

</aside>

What is Tidy First?

“I have to change this code but it’s messy. What should I do next?”

Tidy First? is the next step in my mission to help geeks feel safe in the world. It’s also the first step to take when addressing the common question posed above. Software design is a powerful tool to ease pain in the world—if it is used well. Used badly, it becomes just another instrument of oppression and becomes a drag on the effectiveness of software development.

A tidying is a teensy-weensy, cute, fuzzy, little refactoring. It’s a change to the structure that will make it easier to change the behavior. This tidy-first work helps to make changing the structure of code not intimidating.

What You Will Learn

By the end of this book, you will understand:

And you will be able to:

intellectual puzzle.

Part I. Introduction

The author is writing about software design because they believe it's a powerful tool often misused or misunderstood. Their primary motivation stems from a personal mission to "help geeks feel safe in the world," which in this context means helping software developers design software in ways that are less likely to cause errors or strain team relationships.

The author emphasizes: