Pay Now or Carry It¶
Run the Pay Now or Carry It MicroSim Fullscreen
About This MicroSim¶
Technical debt charges interest. Each time someone changes the code around a shortcut, the shortcut costs a little extra time. This MicroSim puts two lines on one chart. Pay now is flat: it is the hours the fix takes today. Carry it rises each week: it is the extra hours paid so far because the shortcut is still there. The week where the lines meet is the break-even week. After that, carrying the debt has cost more than fixing it would have.
The arithmetic is short. Interest per week is the extra hours each change times the changes per week. The break-even week is the hours to fix divided by the interest per week. All the numbers are illustrative, and the model counts hours only. It leaves out the risk that someone misses one of the copies.
How to Use¶
- Read scenario 1: its name and its three values. The chart is hidden.
- Pick a band for the break-even week: under 1 week, 1 to 26 weeks, or over 26 weeks. You get one try.
- The chart appears with the break-even week marked, and a short note explains why. Hover the lines to read the hours at any week.
- Press Next scenario and repeat for scenarios 2 and 3.
- Press Explore freely to unlock the sliders. Try doubling the changes per week and watch the break-even week halve.
Iframe Embed Code¶
You can add this MicroSim to any web page by adding this to your HTML:
<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/debt-interest-break-even/main.html"
height="734px"
width="100%"
scrolling="no"></iframe>
Lesson Plan¶
Grade Level¶
Adult professional (Good Enough Engineering)
Duration¶
10-15 minutes
Learning Objective¶
The learner will calculate the break-even week for carrying a piece of technical debt, given the hours to fix it, the extra hours per change and how often the code changes, and place it in the correct band.
Prerequisites¶
- Technical debt
- Debt interest
- Break-even: the week when the interest paid equals the cost of the fix
Activities¶
- Predict (5 min): Commit a band for each of the three scenarios before the chart appears. Note which answers surprised you.
- Explore (5 min): Unlock the sliders. Double the changes per week, then halve the extra hours per change. Say what each does to the break-even week.
- Apply (5 min): Pick one shortcut in your own app. Estimate the three numbers and find its break-even week.
Assessment¶
Mastery is 3 of 3 scenarios placed in the correct band on the first try. Moving the sliders afterward is exploration, not evidence.
References¶
- Chapter 15: Technical Debt — the chapter this MicroSim belongs to.
- Martin Fowler, Refactoring: Improving the Design of Existing Code (Addison-Wesley, 1999).