We like to think that technical debt is an attribute of software.
Wikipedia provides a definition: A concept in software development that reflects the implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer.
I believe that technical debt is not derived from software, but is instead derived from our expectation of the software.
Or more specifically, technical debt is code that violates a coding style or architectural guideline.
If we accept this definition of technical debt, something interesting happens.
Technical debt becomes not an aspect of software, but an aspect of our desire for the software.
Moreover, it can change over time.
Consider a hypothetical project with code written in Python. There is a substantial code base, and there are no rules for code style. The development team is unaware of the generally accepted rules for Python code, nor do they use pycodestyle.
The code performs as expected with no defects. (I did say that this was a hypothetical project.)
Yet the code itself is a jumbled mess of classes and functions, with poor names for variables and lines that exceed Python's recommend 80 characters. The development team is okay with the state of the code. (After all the code does run and it does produce the correct results.)
The code in the project has no technical debt. There is nothing in the code that developers or managers want to change.
Now we change the scene: The team becomes aware of code style rules and the pycodestyle package. They discuss the idea of code standards and agree to use the pycodestyle package to review their code.
Now the code has technical debt.
We did not change the code. The code is exactly the same as before the introduction of code style rules.
Yet now it has technical debt.
Not because the code changed. Because the expectations of the developers changed. Simply changing the rules made technical debt appear.
Technical debt does not follow the rules of accounting. One does not use double-entry bookkeeping to track it. There is no "law of conservation of technical debt".
Technical debt is what we say it is. Or more precisely, technical debt is what we want the code to be that it is not. The key phrase is "what we want".
Technical debt is not an absolute attribute of the code. It depends on the expectation of the developers.
No comments:
Post a Comment