System Design Space
Knowledge graphSettings

Updated: June 23, 2026 at 4:50 AM

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.

Its main payoff is a language for talking about the cost of change. With it, you can separate cleanup that makes the next task cheaper from aesthetic perfectionism, and say honestly when a small structural step pays off and when it is just wasted time.

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 and ship it as a dedicated MR: a mixed diff is harder to review and riskier to roll back.
  • Plan a sequence of small structural moves, but stop before tidying becomes its own goal and starts eating the time budget of the feature.
  • Batch size is a trade-off: a large one takes longer to review, a small one hits merge conflicts more often. Pick it on purpose.
  • A steady rhythm pays off: frequent small cleanup is cheaper than the occasional heroic cleanup you reach for once the code has overgrown.
  • If a change gets tangled, it is cheaper to roll it back and rebuild it in a clearer order than to rescue a tangled diff.

Part III: Economics and theory of change

Structure vs Behavior

Behavior creates value today. Structure decides what the next change will cost and how fast you can ship it without new breakage.

Time Value + Optionality

Earlier results usually beat later ones, so chasing perfect structure up front rarely pays. But good design leaves the team a stock of safe moves for the next step.

Coupling and Cohesion

The more tightly parts of the system depend on each other, the more expensive any broad change becomes and the wider an edit spreads. Strong cohesion keeps the touched surface area within clear limits.

Reversible vs Irreversible

A structural change can almost always be rolled back — that is its main advantage. A behavior change in production is often already irreversible, and the cost of a mistake lands on the user.

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