jargon

Design patterns·The named ways it goes wrong

there is an interface with one implementation and a config flag that has never been anything but its default.

Premature abstraction

Also calledpremature generalisation, abstracting too early, wrong abstraction

Building a general mechanism before there is a second case to generalise from, so the abstraction encodes a guess about which axis will vary. It is worse than duplication because the wrong abstraction is harder to undo — every caller now depends on its shape, so removing it is a change to all of them. Sandi Metz's formulation is the one to remember: prefer duplication over the wrong abstraction.

Commonly confused with