Fragility is the tendency of the software to break in many places every time is changed.
Rigidity is the tendency for software to be difficult to change even in simple way.
Every change causes a cascade of subsequent changes in dependent modules.
Both of the problems are a symptom of technical debt. Technical debt is a cost of prioritizing fast delivery over code quality for long period of time.
We have 2 choices when develop a software
- The easiest thing that we can do to implement a change or fix the bug.
- Fast
- Poor written code.
- Takes more time to understand the system, write a good unit test or to make our component loose coupled.
- Adds a bit of complexity.
- Maintainable code.
Technical debt is costly, lower technical debt have a lower cost. The cost must manageable.
Technical debt effect customer responsiveness, lower technical debt means we adapt quickly with user requirement.
The fact is:
- No matter how good the team is, technical debt will accumulate over time.
- If technical debt left uncontrolled, it will kill our project.
- Controlling technical debt is a must.
- Write code.
- Pay debt, refactoring. Applying SOLID, design pattern, decouple components, write more test (specially unit test).
- Write more code.
- Pay (new) debt, refactoring.
- Code is easy to understand and reason about.
- Changes are faster and have a minimal risk.
- Highly maintainable over long periods of time.
- Cost-effective.
- Constant refactoring.
- Implement design pattern.
- Implement TDD.