SOLID describes five structural properties intended to make code easier to change. In legacy work, use the principles to guide structural changes where they reduce friction on paths the team actually changes. section 7.3.2
Judge a proposed design change by its effect on real work:
- Consider splitting a class when frequent changes and developer collisions make the file a coordination bottleneck. section 7.3.2
- Avoid adding files and indirection when a class changes rarely and the split would not reduce meaningful friction. section 7.3.2
- Use extension rather than modification when preserving production-tested logic is valuable; avoid awkward extension points where code needs changing anyway. section 7.3.2
Table 7.3 SOLID from a waste point of view
|
Principle
|
What it says?
|
Waste it reduces in legacy code
|
When it costs more than it saves
|
|
Single Responsibility (SRP)
|
Each class has one reason to change
|
Coordination waste. Changes stay
isolated. Developers stop colliding in the same file. Reviews stay fast;
blast radius stays contained.
|
Applied to a file touched twice a year, SRP creates
inventory, more files, more indirection, more surface area—without reducing
any real friction.
|
|
Open/Closed
|
Extend through new code, not modification
|
Rework and defect risk.
Battle-tested logic stays untouched. Code that survived five years of
production carries embedded knowledge, edge cases handled, and race
conditions avoided. Extending preserves what production has already
validated.
|
Applied where the existing code needs to change anyway,
Open/Closed forces awkward extension points that add indirection without
protecting anything.
|
|
Liskov Substitution
|
Subtypes must behave like the types they replace
|
Rework waste. When interfaces lie
about behavior, developers build on false assumptions. Every false assumption
discovered late costs investigation, a bug fix, a re-review, and a
redeployment.
|
Rarely costs more than it saves, but enforcing it on types
nobody substitutes is effort spent on a constraint that never fires.
|
|
Interface Segregation
|
Clients should not depend on interfaces they do not use
|
Waiting waste. Large interfaces
create coupling that makes changes ripple further than necessary. A module
depending on twenty methods cannot ship independently, even if it uses two.
|
Splitting a stable interface nobody complains about
creates more files and more contracts to maintain for no measurable flow
gain.
|
|
Dependency Inversion
|
Depend on abstractions, not concrete implementations
|
Waiting waste and slow feedback.
Business logic tested without infrastructure runs in milliseconds. Teams
develop in parallel without shared environments.
|
Applied to a module with no tests and no plan for tests,
the abstraction sits unused, an inventory with zero return.
|
Compare how selected SOLID principles reduce legacy-code waste and when their added structure may cost more than it saves. section 7.3.2




