System Design Space
Knowledge graphSettings

Updated: April 16, 2026 at 4:19 PM

Tidy First? (short summary)

hard

The core idea of this book is that messy code is rarely fixed by one heroic refactor. Systems usually get healthier through small structural moves made exactly where the next behavior change is about to happen.

Its practical strength is the clean split between structural preparation and behavior changes. The book gives teams useful language for discussing future change cost, dependency pressure, and the economics of small steps that reduce regression risk.

It is also one of the calmest ways to talk about technical debt and maintainability. The material helps explain why it is often worth clearing the path before changing behavior, how to choose a sensible cleanup batch size, and where useful tidying turns into unnecessary perfectionism.

Practical value of this chapter

Small improvements

Shows how incremental structural changes reduce long-term change cost.

Separate preparation

Teaches separating feature work from structural cleanup to minimize regression risk.

Decision economics

Helps decide when cleanup is worth doing now versus deferring for delivery speed.

Interview pragmatism

Provides practical language for technical debt and maintainability trade-offs.

Primary source

Book Cube series on Tidy First?

Five posts covering the introduction, examples of structural tidying, change management, and the theory behind coupling, cohesion, and design economics.

Open post 1/5

Tidy First?: A Personal Exercise in Empirical Software Design

Authors: Kent Beck
Publisher: O'Reilly Media, 2023
Length: ~170 pages

Kent Beck's book on small structural improvements: separating structural preparation from behavior changes, lowering the cost of the next step, and deciding when cleanup is worth it.

Original
Translated

What the book is really about

Kent Beck is not advocating a giant scheduled refactor. He is describing a habit of removing local structural friction right before the next product change needs to pass through that part of the code.

That is what makes the book practical: design is treated not as abstract theory, but as a daily tool for lowering the cost of the next step and reducing stress during delivery.

The original edition is available on O'Reilly Learning. Russian translation (Piter): book page.

System behavior

What the product does for users right now. The effects are visible immediately, but weak structure quickly makes those changes expensive.

System structure

How cheap and safe tomorrow's changes will be. The payoff is delayed, but it defines long-term team velocity.

Part I: Small structural improvements

The first part is a toolkit of low-cost moves that make code easier to read, easier to navigate, and easier to change before feature work begins.

Readability

  • Guard clauses and early exits
  • Explanatory variables and constants
  • Reading order and visual grouping of code

Structure

  • New interface over the old implementation
  • Keep declaration and initialization together
  • Extract helpers and align neighboring logic

Hygiene

  • Delete dead code
  • Normalize symmetries across the codebase
  • Delete redundant comments

Part II: Managing those changes

The second part is about process: when to tidy, how to keep it separate from behavior changes, and how to size the work so it stays cheap and reviewable.

  • Keep tidying separate from behavior changes (ideally in a dedicated MR).
  • Plan a sequence of small structural moves, but stop before they turn into over-engineering.
  • Choose batch size by balancing review cost and merge-conflict risk.
  • Maintain a rhythm: frequent small cleanup is better than occasional heroic cleanup.
  • If a change gets tangled, roll it back and rebuild it in a clearer order.

Part III: Economics and theory of change

Structure vs Behavior

Behavior creates value now, while structure determines how quickly and safely the next change can happen.

Time Value + Optionality

Earlier results usually matter more, but good design buys room for safer future changes.

Coupling and Cohesion

High coupling makes broad changes expensive, while strong cohesion keeps the touched surface area smaller.

Reversible vs Irreversible

Structure changes are often reversible; production-side behavior consequences often are not.

One memorable idea is close to “Constantine's equivalence”:cost(software) ~ coupling. The more tightly parts of the system depend on each other, the more expensive any broad change becomes.

Practical adoption pattern

Before feature work

Do one or two structural tidyings exactly where the next behavior change is about to land.

During feature work

Keep your focus on behavior and do not widen the cleanup unless there is a clear economic reason.

After release

Close the remaining structural tail with a small follow-up change while the context is still fresh.

Related chapters

Where to find the book

Enable tracking in Settings