How to Accidentally Destroy a Codebase (A Step-by-Step Guide)
summary
A small Angular to‑do app starts at ~120 lines and four files and gets wrecked step‑by‑step: a quick fix with magic "urgent" string hides priority, a premature abstraction via a generic CRUD base adds debt, a useless cache without invalidation and manual change‑detection slow things, a growing set of booleans creates impossible states, and onion layering multiplies files until the repo is ~300 lines across 14 files. Each change compiles and looks clean; practical alternatives: add a priority type, follow the rule of three, measure before optimizing, use discriminated unions, and avoid needless layers.
AI-written summary · about
