What Is Technical Debt?
The term “technical debt” comes from information technology (IT). Primarily in software and application development, it refers to the sources of defects that can creep into the development of software or applications from the very beginning. Removing these defects later is described metaphorically as a debt. As in finance, the effort involved can be regarded as interest and therefore also has to be calculated and paid.
Technical debt can take many forms. Under constant time and budget pressure, teams postpone automated regression or unit tests or skip them entirely. Sources of defects also frequently arise from disregarding code smells (source code of poor quality that is not actually faulty) and from repeated faulty code segments. Established coding standards are often ignored as well, and knowledge of well-known anti-patterns is not applied sufficiently. If the available measures were applied consistently from the start, the additional effort could pay off in the long run through lower maintenance effort for the software.
Identifying and Measuring Technical Debt
When identifying technical debt, you have to consider from the start the different areas in which problems can occur. In software and application development, technical debt is divided into four groups of defects, which are briefly introduced below.
- Design and architecture flaws
- Implementation and coding
- Documentation
- Application and functional tests
In the area of design and architecture flaws, improved requirements elicitation up front can uncover and eliminate a large share of the sources of defects. Putting together a development team with the right expertise is a prerequisite for this. In the implementation and coding of source code, continuously comparing the planned application architecture with the code structures already created can reveal major sources of defects right away.
Comprehensive documentation is essential for well-structured software that is easy to maintain at any later point. It begins with planning and continues in the structuring of the functional units. Every code block should be sufficiently documented and fully versioned. This supports maintenance down to the source code level, even after a long period of use. Finally, this also includes easy-to-understand application documentation for the users. Throughout the entire implementation phase, every completed functional block should be given an adequate functional test. To a certain degree, this can also be automated with dedicated tools.
Resolving Technical Debt
A wide range of measures can reduce this debt in good time, as early as the development phase. In addition to the requirements mentioned above, there are further important aspects. For example, continuously discussing and adjusting the defined architecture in group meetings can be an effective measure for avoiding defects. The ongoing training and development of the developers involved, in workshops, at trade shows, or at conferences, also supports the long-term product quality of the company.
During the technical realization of a project and the implementation of functional blocks, regularly testing the source code, the functions, and the complete application can uncover hidden defects early. In the case of larger problems, an architecture change and a refactoring should take place early. If a project has already been delivered to the customer as a release to manufacturing (RTM), newly discovered defects can be corrected afterward through quality updates.
In application development, the term “CRAP cycle” has become established as an example of technical debt. If many defects are introduced during application development (Create), this later leads to high maintenance effort (Repair). If this effort becomes too high, the maintenance phase has to be discontinued (Abandon), and an architecture or functional block has to be replaced completely (Replacement). This CRAP cycle causes considerable time and effort, which good planning can reduce in advance.
Tools and Test Suites
A wide range of tools is available for testing functions, small units of code, and a complete application. Tools exist for almost every programming language. More detailed code and application analysis calls for dedicated test suites. One example of such a tool is SonarQube, which enables static analysis of source code in various programming languages.
Another tool, JDepend, can automatically measure coding and design metrics and analyze complete Java classes and packages. The results show in detail the extensibility, reusability, and maintainability of the code blocks examined. Used early in the implementation phase, these results help achieve high application quality.
If you would like a detailed and independent assessment of your software quality, contact us.