Jump to a section
The first screen arrives quickly. Then every fix touches three files you did not mean to open. That is not a personal failing. It is what happens when generated code is accepted without a requirement, a boundary, or a check.
Take this with you
Debt starts when you cannot explain a change. Stop there, recover one behavior, and keep only the diff you can defend.
01
Debt is unexplained coupling
A new banner is visual. A cart total is not. When a model “improves” both in one pass, you inherit helpers, copied prices, and a second source of truth. The cost appears the next time quantity changes.
02
The usual tell
You can no longer say which file owns the product price. Search, cart, and checkout each compute something slightly different. Adding a feature now means negotiating with yesterday’s generation.
Want to see this teaching style before buying?
The free sample turns a vague design request into a change you can check.
Read the free course lesson →03
How I cut it back
I pick one behavior, write the expected example, and ask the assistant to trace it without editing. Only then do I allow the smallest fix. Unrelated files go back to the last good commit.
A prompt to try in your project
The cart total is the only bug. For a $20 product at quantity 2 I expect $40. Trace the request. Do not change styling or add features. Name the files that should stay untouched.
04
Prevent the next pile-up
A short project note — framework, where prices live, what checkout does, last good commit — is cheaper than another wide prompt. The course treats that note as part of the work, not extra homework.
- One behavior in progress at a time.
- A check that failed before the fix.
- A commit you can return to.
- No extra files in the diff.
05
If the site is already live
Isolate experiments. If customers or payments are involved, get a review before you cannot undo the change. A free website audit is the right next step when the debt is in production, not a learning project.
Build Your First Real App
Learn the habit before the project is stuck.
Build Northstar in small slices so you see coupling appear — and practice the stop, check, and commit loop on a project that is allowed to break.
- Source control and save points · pp. 31–34
- Debugging workshop · pp. 70–95
- Maintenance after launch · later chapters
120-page PDF + visual kit · $29.99 · one-time purchase
Self-paced reading and building. The kit is a browser prototype; you build the Rails app. Checkout uses practice orders.
Questions you might have
Should I rewrite the app?
Not first. Recover one behavior and see whether the rest is still load-bearing. A rewrite is a decision after you understand the coupling.
Is generated code always debt?
No. Generated code you can explain, test, and revert is just code. The debt is the part you accepted without a check.