Inevitable and avoidable rework
I’ve been seeing two types of technical debt. The first is the quick solution implemented with dirty code. I consider this to be irresponsible. Rarely is it the only option. When taken it’s important that people understand the future cost and the risks.
The second is a natural byproduct of emergent design and YAGNI (yet) decisions. It’s the debt that surfaces when a system outgrows implementations resulting from previous decisions, which were the right ones to make at the time based on the information available (because they did not compromise quality or the health of the code in any way). Irresponsible debt creates avoidable rework; it’s failure demand. It’s bad, it smells and it needs to be cleaned up because, if left to fester, it’s going to slow us down and divert capacity away from meeting the value demand.
The debt that surfaces because the system is maturing creates inevitable rework. It’s necessary to do this rework on a regular basis to keep the emergent design relevant, the code habitable, to prevent obsolescence, perhaps increase reuse, and reduce risks and medium to long-term costs. I think most people try to roll this debt into feature cards and that’s the right policy. We prefer to do that if we can. However, we’ve become too good at writing cards to be less than 2 days (which helps smooth the flow) and sometimes it’s not possible to absorb inevitable rework into a feature card and keep it under 2 days (the way we like it). And of course, sometimes, the rework just doesn’t relate to any features, e.g. upgrading to the latest Grails framework. So this gets written on a blue card. By definition this is failure demand too. But that’s harsh, don’t you think? I have a weird take on this because I insist that the system is recognized and treated as a stakeholder, and as such it values certain things and makes its own demands. One of the things it values is to be kept healthy. But I’m not hung up on this rework being classified as failure demand providing it’s being managed effectively.
Completing some inevitable rework on a regular basis (and assuming you’re not being irresponsible) helps reduce the remaining rework. We can see this in action in the chart below.
The blue and pink lines show the remaining technical debt and defects that are either work-in-process or queued inventory (i.e. completed but not released). The blue and pink bars show the technical debt that has been repaid and the defects that have been fixed. Think of these bars pulling the remaining rework down keeping it small and preferably fairly steady. And, assuming there’s throughput satisfying the value demand, then the team can be considered pretty effective.
It’s useful to track the remaining technical debt and defects in statistical process control charts. The natural process limits help to distinguish signs of system instability from normal variation. When the limits are breached investigate what’s happened to understand how the system may have changed. Watch for trending beyond the breach as it’s likely to reveal more information to help you. Use these events to identify improvements.