Lesson 4 of 9 · 21m
Recognizing Pattern Abuse Before It Fossilizes
The warning signs of over-abstraction: speculative extension points, interface proliferation, indirection without payoff, and architecture that resists the actual change.
Pattern abuse rarely arrives as bad intentions. It arrives as a sensible guess about future change, repeated until the present-day system is unreadable. The tell is simple: the abstraction predicts a future that never happens while taxing the work that happens every day.
Speculative generality
A service starts with one implementation. Someone extracts IUserService because "we may swap it later." Six years later there is still one implementation, but every navigation requires jumping through an interface, a factory, and a registration file.
interface UserService { getUser(id: string): Promise<User>; }
class DatabaseUserService implements UserService { /* the only implementation */ }
class UserServiceFactory { static create(): UserService { /* always database */ } }If substitution is genuinely needed for tests, a narrow seam can still be justified. If the only benefit is imaginary flexibility, collapse it.
Indirection without ownership
Healthy indirection has an owner and a reason. Unhealthy indirection has neither. Symptoms:
- classes whose names end in
Manager,Helper,Processor, orHandlerwith no cohesive responsibility - methods that only forward to another object
- constructors that accept ten dependencies and use two
- deep inheritance where behavior is overridden unpredictably
- configuration selecting implementations that no customer ever selects
A forwarding layer can be useful as an anti-corruption boundary. But if it adds no translation, validation, policy, or lifecycle control, it is just latency for the reader.
The interface count test
Count implementations and consumers before extracting an interface.
- One implementation, one consumer, no test seam: probably no interface.
- One implementation, many consumers, stable contract: maybe.
- Multiple real implementations today: yes, likely.
- Interface exists only so a mock can exist: perhaps use fakes or dependency injection at a smaller boundary.
This is not a law. It is a prompt to articulate the actual force.
The wrong change is hard
The most damning signal is when the abstraction was built for the wrong axis of change. The system can swap databases in an afternoon, but adding a required field takes eleven files. Real business pressure usually reveals which dimensions deserved flexibility. That is why experienced engineers optimize for deletion and local reasoning first.
Architecture theater
Diagrams full of boxes can hide a lack of decisions. A layer named Application Services means nothing if domain rules are scattered through controllers, SQL queries, and UI event handlers. Patterns do not create boundaries; ownership and dependency direction do.
Field notes
- Ask "what change does this abstraction make cheap?" If nobody can answer, mark it for removal.
- Excessive purity is still a defect if it prevents the team from understanding the system.
- Abstractions are easiest to delete before their names become part of team vocabulary. Review them early.
Was this lesson helpful?