Notesfoundations🌱 seedling
Accidental Complexity
Also: Essential vs Accidental Complexity · Simplicity · Big Ball of Mud · Abstraction
Accidental complexity is complexity that isn't inherent in the problem users need solved but comes from our tools, structure and choices. Removing it, mainly with good abstractions, is how systems stay understandable.
Why it exists
Complexity slows every change, raises the cost of maintenance and hides bugs. A system mired in it (a big ball of mud) has tangled dependencies, inconsistent naming, performance hacks and special cases.
How it works
- Essential complexity is inherent in the problem as users see it. Accidental is everything else: complexity the team wouldn't face in an ideal world.
- One view holds that most remaining complexity is essential, so no single technique will give a 10× gain within a decade. The other holds that most is accidental, with mutable state as its largest source, then code volume and explicit control flow.
- Abstraction is the main tool: a clean interface hides an implementation (SQL hides storage, concurrency and recovery). Many users reuse one good implementation, and improvements reach all of them.
- Coupling sets the blast radius: if five modules read another's tables directly, one internal change breaks all five.
Trade-offs
| Gains | Costs |
|---|---|
| less for each engineer to hold in their head | good abstractions are hard to find; wrong ones are worse than none |
| changes stay local | indirection can hide performance costs |
In practice
- Databases and languages are the most successful abstractions in computing: each hides enormous complexity behind a small interface.
Pitfalls
- Confusing "simple" with "fewer features": simplicity is about understandability, not capability.
- Leaky abstractions that force users to learn what's underneath anyway.
Connections
- Part of
- Maintainability
- Related
- Evolvability
Recall
These cards are also in your review deck, scheduled with spaced repetition.