Code Smell 16 — Ripple Effect
Small changes yield unexpected problems.

Problems
- Coupling
Solutions
- Decouple.
- Cover with tests.
- Refactor and isolate what is changing.
- Depend on a interfaces.
Examples
- Legacy Systems
Sample Code
Wrong
Right
Detection
- It is not easy to detect problems before they happen. Mutation Testing and root cause analysis of single points of failures may help.
Tags
- Legacy
Conclusion
There are multiple strategies to deal with Legacy and coupled systems. We should deal with this problem before it explodes under our eyes.
Relations
More info
Architecture is the tension between coupling and cohesion.
Neal Ford
This article is part of the CodeSmell Series.