Slow down to speed up

August 12, 2024

Key takeaway: Judge pairing and TDD by a team’s results over a quarter, since the first week always feels slower.

Kent Beck’s Extreme Programming practices look slow because they move effort earlier, where mistakes are cheap, and that’s what makes teams faster.

Ask why a feature took three weeks and the answer is rarely “we were typing.” It was waiting two days for review, untangling a merge conflict from a long-lived branch, debugging a regression a test would have caught, rediscovering a module because the one person who knew it is on vacation, or rebuilding something after a stakeholder finally saw it.

XP goes after those costs directly:

  • Pairing skips the review queue. The review happens while the code is written, when changing direction costs a sentence. Rotate pairs and nobody owns a module alone, so the vacation problem goes away.
  • Test-first gives feedback in seconds instead of days, and the suite it leaves behind is the safety net for everything else.
  • Continuous integration means merging to main at least daily. Small merges make small conflicts.
  • Constant refactoring, backed by those tests, keeps debt paid down in installments so it never becomes a rewrite.
  • Sustainable pace, which the first edition of Beck’s book called the 40-hour week. Tired people write bugs, and bugs come back as interruptions.
  • Short iterations and regular demos, so a misunderstanding costs a few days instead of a release.

I also want observability next to the tests. Tests tell you the code does what you expected before it ships. Dashboards tell you what it does under real traffic, so you hear about a problem from a graph instead of a customer.

Quality is what makes speed last. XP is how I keep it day to day.

The first week of pairing and TDD will feel slower. Judge it over a quarter, and count the interruptions you avoided.