Skip to content

Premature Abstraction

Medium — good to knowArchitecture

ELI5 — The Vibe Check

Premature abstraction is creating a reusable, generic solution before you have enough examples to know what the abstraction should look like. You write a BaseAnimalFactory<T> when all you need is a Dog class. Three months later, the abstraction doesn't fit any real use case and everyone works around it. The opposite of DRY isn't WET — it's wrong.

Real Talk

Premature abstraction occurs when developers create abstractions (interfaces, base classes, generic utilities) before understanding the actual variation in requirements. Unlike premature optimization, which wastes performance effort, premature abstraction creates rigid structures that constrain future development. The Rule of Three suggests waiting for three concrete examples before abstracting.

When You'll Hear This

"We premature-abstracted the payment system and now none of the providers fit the interface." / "Duplicate code is better than the wrong abstraction."

Made with passive-aggressive love by manoga.digital. Powered by Claude.