SPECIMEN No. 036 Β· Architectural reflex
Premature Abstraction
Making something generic before the second use case exists, so that the third one can arrive and not fit.
π± Perennial- π Habitat
- Codebases with exactly one payment provider
- π¦ Natural predator
- The third provider
- π€ Common symptom
- ProviderAgnosticCapabilityLayerFactory
π Abstract early
AlexThe ArchitectβTwo providers already show the shape; designing the interface now costs a diagram, retrofitting costs a quarter.β
GregThe HedgerβAn adapter in front of every vendor means the third one is a new class, not a rewrite.β
HugoThe PerfectionistβProper code has interfaces from day one; that is what every style guide he follows says.β
π Wait for the third case
JoThe CowboyβTwo adapters fit on one screen and ship this week; an abstraction from two examples guesses the wrong seams.β
RileyThe MinimalistβThe layer is a moving part with no second use case; extract it from working code, later.β
RuthThe MaintainerβEvery ProviderAgnosticCapabilityLayerFactory she inherited fit exactly the providers that never arrived.β
β GOOD FIT
- Two concrete providers already exist, with a third signed
- Vendor boundaries where switching cost is a real risk
- Public interfaces that will be painful to change later
π© TOO FAR
- ProviderAgnosticCapabilityLayerFactory with exactly one provider
- The third provider arrives and fits nothing
- A diagram of the abstraction, and no working code yet
π― SWEET SPOT
Super Reasonable
Write the second integration plainly next to the first, then extract the shared shape from working code. Put a thin adapter at vendor boundaries early, since that one is cheap, and wait for the third case before anything grander.
IN THE WILD Β· 1 STORY Β· 1 TAKE

