2026-07-28 · Pattern

Stop adding abstraction before the second use case

Duplicating three lines is cheaper than the wrong generalization: a field guide to knowing when to extract.

Introduction

Three stories of premature abstractions we unwound, plus a simple rule for when duplicated code has earned a shared home.

Why this keeps coming up

Every Pattern conversation eventually lands on the same tension: what is comfortable for the team today versus what the project will need in a year. Neither side wins by argument alone.

A way to think about it

  • Defaults outlive intentions — design them deliberately.
  • Decisions are cheap to make and expensive to communicate; budget for the second part.
  • Disagreement is data. Write down what would change your mind.

What I would do

Start smaller than feels useful, write the reasoning in the commit or the RFC, and revisit it on a calendar date rather than a feeling.

Closing thoughts

Taste in Pattern is mostly memory. Collect yours on purpose.