Technical Debt
2019, Oct 16
Tech Debt
The basic definition of the tech debt could be as simple as doing something quickly then properly.
Types:
We can categorized tech debt in below categories:
- Code Debt
- Architectural Debt
- Knowledge Debt
- Test Debt
- Technological Debt
Code Debt
Signs to identify Code debt:
- Complicated Code
- large classes
- long methods
- logic with complicated expression
- several level of identation
- cryptic names
- no comments or worthless comments
- Solution:
- Wrtting code for developers not for computer.
- WRITE clean code.
- CUT and PASTE coding
- code smell
- Tight coupling between components
- hard to change relationships
Warning Sign:
large time to get the code which need to change, tight coupling.
1 hr of written code is 10 hrs of reading code.
Architectural Debt
Signs to identify architectural debt:
- Lack of the design
- Requirements are going to change over the time
- Not possible to anticipate the future features
- Solution
- Initial architecture not going to be perfect, it should be flexible.
- Missing Layer: Do not combine layers. eg : presentation + bussiness in the same layer.
- Missing extensibility Points: to allow new feature to plug in easily. OPEN and CLOSE principle.
- Overlooked Concerns: security, scalability, performance.
Warning Sign:
saying can’t be done
hacking new feature-in doing it anyway assuming the customer wont notice.
Knowledge Debt
Signs to identify knowledge debt:
- Its tech Debt of Skill in simple words.
- lack of skill set in the tech stack used in the team, however the team is still delivering features.
- more copy-paste from intenet; without understanding
- Solution:
- Keep on finding gaps between the skillset in the team and tech stack used
- use well tested constructs
Test Debt
Signs to identify test debts:
- not thorough test cases.
- missing code quality checks and tools
- not well written unit tests, missing coverage
- Solution:
- Follow TDD approach
- Write failing unit test case first
- Write enough code that make the test pass
Technological Debt
Todo
Improving is a never-ending journey. Perfection is a state that cannot be achieved – we will always strive for it. The important thing is not to stay behind.
Stay tuned for the updates!!