A short story about technical debt


Posted by Steven

Recently, I repeated learning that long-term technical debt is a bitch. Some time ago, I performed an extensive refactoring in one of my main projects. It was necessary to change some architectural decisions that were not able to support newer requirements. This significantly changed the architecture and affected a lot of the code. Despite the amount of modifications necessary, a coworker and me plowed through and finished the task. In doing so, we realized even more code rot, but nothing too serious. Fixing them now would have made the operation even more complex and error-prone, so we took notes about those issues to resolve them later. 

Sadly, that "later" never came. To keep the velocity of the team high, we decided to implement change requests instead of reducing our technical debt. This decision was kind of OK because none of the findings would really endanger further development. They were only inconveniences or technical imperfections. So we thought. 

Months later, I took the task of implementing a feature request. Everything worked fine until I noticed that one of the usecases could not be implemented because of one of the issues we realized back in the days of the refactoring. I could not finish my task until I solved at least some of the technical debt. In this situation, it was really inconvenient because this necessary refactoring was not planned into our commitment. But there was no other way, I had to at least implement some of the refactoring to get the change request going. So I did, until I faced another issue. And then another. Soon, I realized that every necessary change depended on another small refactoring, which then needed another minor change, which only needed some other thing. It quickly became a mess. 

Working on this bowl of spaghettis of dependent changes for over a week, I had to hit the emergency stop. We came up with (another) quick fix to roll out the feature request, without having to do much of the refactoring. However, the next weeks would be governed by solving our technical debt that somehow managed to gather all of its tiny problems together to form a giant refactoring-monster to haunt us. I knew before that keeping technical debt over a long period of time is not a good idea. However, I never witnessed such an unlucky combination of necessary changes. 

Lessons learned (again): Do not accept technical debt. Technical debt that you know of is just the tip of the iceberg, there is always a lot more that you do not realize yet!  

Share: