Guide

Software spends most of its life being changed by people who did not write it. The feature you ship this week will be edited next quarter by a teammate who has never opened the file, under a deadline, at 11pm, with half the original context gone. Maintainable code is not "pretty" code. It is code that keeps the cost of that next change low.

The enemy is complexity: anything that makes the system hard to understand or hard to modify. John Ousterhout's framing is useful because it separates three symptoms that feel different but share a root cause.

The big idea

Concept

Complexity (in Ousterhout's sense) shows up as change amplification (one logical change requires edits in many places), cognitive load (how much you must hold in your head to work safely), and unknown unknowns (you cannot tell what you need to know until something breaks).

Fighting complexity is the day job of craft. Clever one-liners, premature abstractions, and "clever" frameworks often increase it. Simple interfaces over rich behavior tend to decrease it.

Treat complexity like a budget you spend on purpose. A payment path can afford more structure than a one-off admin script. Ask on every non-trivial PR:

  1. Does this change increase the number of places a future edit must touch?
  2. Does a new reader need a map of five files to understand one user action?
  3. Did I introduce a name (Manager, Util, Helper) that attracts unrelated logic?

If yes, spend an extra hour now extracting or renaming. That hour is cheaper than the next incident's three hours of archaeology.

Beck's Tidy First? framing helps under deadline pressure: separate the structural commit that makes the change easy from the behavioral commit that delivers the feature. Reviewers can approve a rename with confidence; they can scrutinize the behavior diff without the noise of moves.

Walking through a smell table

SmellWhat goes wrongPrefer
God class / god fileEverything depends on it; merges conflict constantlySplit by responsibility along change boundaries
Anemic domain + fat controllersBusiness rules scattered in HTTP handlersDomain functions/modules with clear inputs/outputs
Premature frameworkTeam learns the framework instead of the problemBoring code until a second real use case appears
Clever one-linersCognitive load spikes; hard to debugStraightforward control flow
Shotgun surgeryOne feature edit sprays across the treeDeep module owning that feature's rules
Leaky abstractionsCallers still need low-level knowledgeHide retries, encoding, persistence details

"Clean code" checklists that obsess over line counts without looking at change amplification produce shallow modules. Measure success by how calmly the next person can ship a related change.

A weekly habit: leave one name or boundary clearer than you found it. When a bug takes more than an hour to understand, add a comment or test that encodes the invariant. Once a month, skim a module you own for shotgun-surgery hotspots. Prefer deleting dead code to decorating it.

Common mistakes

  • Optimizing for "pretty" instead of the next change.
  • Measuring success by line count. Shallow files can still amplify change.
  • Mixing tidy commits with behavior commits so reviewers cannot see either.

Check yourself

A one-line product change forces edits in eight files. Which complexity symptom is that?

Change amplification.

You cannot tell whether a refund path already handles duplicate webhooks until production double-pays. Which symptom?

Unknown unknowns — the invariant was not in the interface, a test, or a comment.

Key takeaways

  • Optimize for the next change by a stranger.
  • The three symptoms: change amplification, cognitive load, unknown unknowns.
  • Spend complexity budget on purpose. Separate tidy commits from behavior commits.
  • Line-count checklists that ignore change amplification produce shallow modules.

Further learning

Next, the main weapon against complexity: deep modules.

A Philosophy of Software Design | John Ousterhout | Talks at GoogleTalks at Google
A Philosophy of Software Design (Ousterhout)Software Design Bookweb.stanford.edu Tidy First? (Kent Beck)oreilly.com