# Technical Debt Quiz

## Question 1

What is "interest" in the technical debt metaphor?

A) The time it took to write the original code
B) The ongoing extra cost of every change that touches the debt
C) The cost of the initial quick-and-dirty solution
D) The number of bugs in the code

<!-- ANSWER: B -->
<!-- EXPLANATION: Interest is the recurring cost — each time you work in that area, you pay extra (slower changes, more bugs, harder debugging). Principal is the one-time cost to fix it. -->

## Question 2

In Fowler's quadrant, which type of debt is acceptable if you actually pay it?

A) Reckless inadvertent
B) Reckless deliberate
C) Prudent inadvertent
D) Prudent deliberate

<!-- ANSWER: D -->
<!-- EXPLANATION: Prudent deliberate means you knowingly took a shortcut with a plan to pay it back. The others either lack awareness (inadvertent) or lack intention to fix (reckless). -->

## Question 3

Which is a signal of technical debt rather than debt itself?

A) A decision to ship without tests to meet a deadline
B) A 300-line function with deep nesting
C) An intentional tradeoff documented in a ticket
D) A planned migration to a new framework

<!-- ANSWER: B -->
<!-- EXPLANATION: A long, complex function is a "code smell" — a signal that debt may exist. The actual debt is the decision (or lack of decision) that led to it. A, C, D describe decisions or plans. -->

## Question 4

When pitching tech debt paydown to a manager, what's most persuasive?

A) "Our cyclomatic complexity is high"
B) "This module causes 40% of our bugs and delays each release by 2 days"
C) "The code is messy"
D) "We need to refactor"

<!-- ANSWER: B -->
<!-- EXPLANATION: Stakeholders care about outcomes: bugs, time, risk. Quantifying impact (40% of bugs, 2-day delay) makes the case. Technical jargon (cyclomatic complexity, "messy") doesn't translate. -->

## Question 5

When should you prefer refactoring over a full rewrite?

A) Never — rewrites are always better
B) When the design is salvageable and the system isn't tiny
C) Only when you have infinite time
D) Rewrites are always cheaper

<!-- ANSWER: B -->
<!-- EXPLANATION: Refactoring (extract, rename, split) is cheaper and lower risk when the design can be improved in place. Rewrites are risky and expensive; use for fundamentally broken or very small systems. -->

## Question 6

What does the "Strangler Fig" strategy mean?

A) Rewrite the entire system at once
B) Gradually replace a legacy system by routing new behavior to new code and migrating over time
C) Ignore the debt until it crashes
D) Add more tests around the bad code

<!-- ANSWER: B -->
<!-- EXPLANATION: Strangler fig pattern: build new code around the old, route new features to the new system, migrate callers incrementally. Avoids big-bang rewrites and reduces risk. -->
