How Dirty is Your Kitchen?

"Does tech debt cause bugs?" I turned to my wife. With a quizzical look on my face, I pondered the question. "Uh..." I stammered. My brain tried to first figure out where this question came from and then to come up with a thoughtful answer. As with a lot of answers about software and tech, I replied: The Short Answer is Yes In a word, summarized for the non-technical folk, you can consider tech debt to cause bugs. The Long Answer is No Tech debt and bugs stem from the same source, but tech debt does not inherently cause bugs. Tech debt can lead to the accidental introduction of more bugs, but the debt, in and of itself, does not cause them. You can have tech debt, which when left untouched, functions exactly as expected, producing no bugs. For a contrived example, a convoluted or overly complicated function is tech debt: function findMaxValue(numbers: number[]): number | null { if (numbers && numbers.length > 0) { let maxValue = numbers[0]; for (let i = 0; i maxValue) { maxValue = numbers[i]; } } return maxValue; } else { return null; } } This function works. It can be used safely across a codebase. It is technical debt because there are much simpler implementations of this functionality which are easier to read and work with. The Kitchen Analogy My wife loves to cook and has a type-A personality. I told her that tech debt is like mess in the kitchen. A cup left out, maybe a dirty dish in the sink, a fork not removed from the table after breakfast - these are examples of tech debt. They don't prevent you from using the kitchen to cook meals. However, the mess can reach a point where you are no longer able to use the kitchen. There are circumstances where you'll need to clean in order to be able to continue. Sometimes, you may just need to clean a bowl so that you can use it to mix ingredients. Other times, you may need to clean the whole inside of the oven so that you don't start a fire when you want to broil your next dish. The mess can pile up so high that you get roach infestations, mold in the sink, and trash piled high in the corner. There are different levels of dirty kitchens, as there are different levels of tech debt. A bug in this case may be broken pots and pans, rusted out cups, etc. Things that would prevent you from cooking, or would probably want to deal with before you can cook unhindered. Dealing with Tech Debt Different companies and teams have different acceptable levels of tech debt. Companies may set some minimum standard, and then teams may opt to be more or less strict, depending on the culture and dynamics. Minimizing technical debt keeps the team moving and grooving. When patterns are established and held to, there are fewer questions about how to do things. When new patterns need to be introduced, there should be conversations at the team level to discuss why. The followup question of "Do we need to update all other similar instances to the new pattern?" needs to be asked. One of the worst outcomes is introducing a new pattern without updating existing instances where the pattern should apply. This leads to multiple ways to do the same thing and relies on tribal knowledge to pick the "right" way. Keeping a clean kitchen, not letting tech debt in, reduces the amount of cognitive overhead that we as developers need to work with. We already have a lot of cognitive overhead, why add more? This is the whole premise behind my idea of the notion that code should read like plain english. The more brain cells I need to use to figure out how code works, the less I like it. More than writing, software engineers read code. The less brainpower you spend understanding existing code, the more you can focus on ensuring your bugfix, update, or feature adheres to current patterns. You can use that brain power to come up with meaningful and effective tests so that things don't break down the line on accident. Having spent considerable time mulling over the broader dynamics of tech debt, here's how I approach it. My Personal Take IRL, I’m not messy per se, but I tend to accumulate clutter. My desk may have a snack bowl that I finished eating some of those peanut butter filled pretzels out of earlier, maybe an old couple of sticky notes with my revolving todo lists. I'll read a book for a while, and then set it on my desk and shuffle it around as it gets in my way and I need to do other things. However In my professional life, digitally speaking, my metaphorical kitchen is immaculate. When I run teams, I do not stand for tech debt. I will gatekeep the codebase. I strive to work in Michelin Star kitchens. If you've ever read that book "If You Give a Mouse a Cookie", recall that once you give a little bit, you're more apt to give a little more and a little more and a little more until nex

Jan 17, 2025 - 18:40
How Dirty is Your Kitchen?

"Does tech debt cause bugs?"

I turned to my wife. With a quizzical look on my face, I pondered the question.

"Uh..." I stammered. My brain tried to first figure out where this question came from and then to come up with a thoughtful answer.

As with a lot of answers about software and tech, I replied:

The Short Answer is Yes

In a word, summarized for the non-technical folk, you can consider tech debt to cause bugs.

The Long Answer is No

Tech debt and bugs stem from the same source, but tech debt does not inherently cause bugs.
Tech debt can lead to the accidental introduction of more bugs, but the debt, in and of itself, does not cause them.

You can have tech debt, which when left untouched, functions exactly as expected, producing no bugs.

For a contrived example, a convoluted or overly complicated function is tech debt:

function findMaxValue(numbers: number[]): number | null {
    if (numbers && numbers.length > 0) {
        let maxValue = numbers[0];
        for (let i = 0; i < numbers.length; i++) {
            if (numbers[i] > maxValue) {
                maxValue = numbers[i];
            }
        }
        return maxValue;
    } else {
        return null;
    }
}

This function works. It can be used safely across a codebase. It is technical debt because there are much simpler implementations of this functionality which are easier to read and work with.

The Kitchen Analogy

My wife loves to cook and has a type-A personality.

I told her that tech debt is like mess in the kitchen.

A cup left out, maybe a dirty dish in the sink, a fork not removed from the table after breakfast - these are examples of tech debt.

They don't prevent you from using the kitchen to cook meals.

However, the mess can reach a point where you are no longer able to use the kitchen. There are circumstances where you'll need to clean in order to be able to continue.

Sometimes, you may just need to clean a bowl so that you can use it to mix ingredients.

Other times, you may need to clean the whole inside of the oven so that you don't start a fire when you want to broil your next dish.

The mess can pile up so high that you get roach infestations, mold in the sink, and trash piled high in the corner.

There are different levels of dirty kitchens, as there are different levels of tech debt.

A bug in this case may be broken pots and pans, rusted out cups, etc. Things that would prevent you from cooking, or would probably want to deal with before you can cook unhindered.

Dealing with Tech Debt

Different companies and teams have different acceptable levels of tech debt.

Companies may set some minimum standard, and then teams may opt to be more or less strict, depending on the culture and dynamics.

Minimizing technical debt keeps the team moving and grooving.
When patterns are established and held to, there are fewer questions about how to do things.

When new patterns need to be introduced, there should be conversations at the team level to discuss why. The followup question of "Do we need to update all other similar instances to the new pattern?" needs to be asked.

One of the worst outcomes is introducing a new pattern without updating existing instances where the pattern should apply. This leads to multiple ways to do the same thing and relies on tribal knowledge to pick the "right" way.

Keeping a clean kitchen, not letting tech debt in, reduces the amount of cognitive overhead that we as developers need to work with.

We already have a lot of cognitive overhead, why add more?

This is the whole premise behind my idea of the notion that code should read like plain english.

The more brain cells I need to use to figure out how code works, the less I like it.

More than writing, software engineers read code.

The less brainpower you spend understanding existing code, the more you can focus on ensuring your bugfix, update, or feature adheres to current patterns.

You can use that brain power to come up with meaningful and effective tests so that things don't break down the line on accident.

Having spent considerable time mulling over the broader dynamics of tech debt, here's how I approach it.

My Personal Take

IRL, I’m not messy per se, but I tend to accumulate clutter.

My desk may have a snack bowl that I finished eating some of those peanut butter filled pretzels out of earlier, maybe an old couple of sticky notes with my revolving todo lists. I'll read a book for a while, and then set it on my desk and shuffle it around as it gets in my way and I need to do other things.

However

In my professional life, digitally speaking, my metaphorical kitchen is immaculate.

When I run teams, I do not stand for tech debt.
I will gatekeep the codebase.
I strive to work in Michelin Star kitchens.

If you've ever read that book "If You Give a Mouse a Cookie", recall that once you give a little bit, you're more apt to give a little more and a little more and a little more until next thing you know you are letting things in that should have never entered the codebase in the first place.

There are times where I'll let a metaphorical cup stay out, maybe a single dish in the software sink, but they must be cleaned up promptly in the next couple of days / at the start of the next sprint.

TL;DR

Tech debt doesn't cause bugs, but they both stem from the same root - messy metaphorical kitchens.

Keep your workspace clean, keep your tech debt to a minimum, and do your future self a favor.

If you clean as you go, you won't need to spend significant time later deep cleaning.

Questions? Counterpoints?

Let them rip.