Foundations — Technical debt — types, managing
This page builds every symbol and word the parent note Technical Debt uses, starting from nothing. If a term below feels obvious, read it anyway — the parent note assumes you already picture it, and here we draw the picture.
1. What is "code" and why can it be "messy"?
Before we can borrow, we need something to borrow against. In this topic that thing is source code: the human-written instructions that become a running program.
The whole topic hinges on this: debt is measured in changeability, never in whether the program is correct. (See the mistake in the parent: "debt = bug" is wrong for exactly this reason.)

2. The money words: Principal and Interest
The parent note borrows two words from banking. You must picture a real loan first.
Now map it onto code:
| Loan word | In code it means | The picture |
|---|---|---|
| Principal | Cost to properly fix the messy code (refactor it) | one big cleanup, done once |
| Interest | Extra effort each time you edit the messy code | a small tax, paid over and over |
Every one of these is a plain number. Let us earn each symbol before the formula uses it.
3. Earning — the "clean price" of a change
Picture a change as a job: "add a discount to the checkout." If the code were tidy, this job takes some number of days — call it . It is not zero (even clean code takes work); it is the fair price.
4. Earning — how "steep" the mess is
So one change through the mess costs:

5. Earning — how many times you'll pay interest
This is the single most important lever in the whole topic: the same mess is cheap in cold code and ruinous in hot code, purely because of .
6. Putting it together — the (summation) symbol
The parent writes:
A brand-new reader may not know the sign. Here it is, from zero.
Here the "thing on the right" is — the extra cost of one change. There are changes, and each adds the same extra :
7. The decision rule and the / notation
The parent boxes:

8. Two named-people / named-idea terms

9. Supporting vocabulary the parent leans on
- Refactor / Refactoring — change how code is written without changing what it does; this is how you "pay the principal."
- Code Smells — surface signs of mess (duplication, huge functions) that hint at debt.
- Coupling and Cohesion — coupling = how tangled pieces are; high coupling is classic design debt.
- Unit Testing / Test Driven Development — missing tests is test debt; tests are what let you refactor without fear.
- Continuous Integration — slow/manual builds are infrastructure debt.
- Software Maintainability — the overall "how easy to change" quality that debt erodes.
- Agile Sprint Planning — where you reserve a slice of time (e.g. 20%) to pay down debt.
- Debt ratio — remediation cost development cost; a single number to track how buried you are.
How the foundations feed the topic
Equipment checklist
Cover the right side and test yourself — you are ready for the parent note when each is instant.
- What does mean, in one phrase? ::: The cost (in days) of one change if the code were already clean — the baseline "clean price."
- What kind of number is , and what does say? ::: A fraction; means each change is 50% slower because of the mess.
- What does count? ::: The number of future changes that will touch this messy code.
- Translate into words. ::: "Add the extra cost once for each of the changes" — which equals .
- Why does the sum collapse to ? ::: Because every term is the same number , and adding the same number times is multiplying by .
- Read the rule aloud in plain English. ::: "Fix it when the one-time fix cost is smaller than all the future slowdown you'd avoid."
- What is the difference between (principal) and interest? ::: is a one-time cleanup cost; interest is the recurring extra effort paid on every change until you fix it.
- Is debt the same as a bug? ::: No — debt is working code that's hard to change; a bug is code that behaves wrong.
- Name Fowler's two axes. ::: Deliberate vs Inadvertent, and Reckless vs Prudent.
- What does "refactor" mean? ::: Change how code is written without changing what it does — the act of paying the principal.