Cover of The Debt Layer

The Engineering Mind · Field Notes

The Debt Layer

Field notes on engineering judgment when the past is load-bearing

12 chapters · a two-evening read · ebook · 2026

Coming soon on Amazon

Direct purchase opens soon · by purchasing you agree to the Terms & Conditions

The book

The ledger you inherited

Your codebase is not a mess. It is a ledger — of shortcuts that funded the company, bets placed in markets that no longer exist, and speed borrowed from a future that is now you. Somebody has to manage that debt like the financial instrument it is. The engineers who wrote it are gone. That leaves you.

The Debt Layer is a field book on engineering judgment when the past is load-bearing — written from the far side of a real multi-year modernization that retired the majority of a large platform's upgrade-blocking debt while it kept shipping. Twelve chapters on seeing the debt that hides outside the code, making it visible enough to fund, running the program, and telling the rewrite that's right from the rewrite that's grief.

No clean-code sermons. No absolution. Field notes, real numbers, and the judgment to know what you owe — including the debts worth keeping forever, on purpose.

Why this one

What makes it worth two evenings

Interest, not sin

The rare debt book that refuses both reflexes — the engineer's shame and the manager's dismissal. Debt is leverage: speed borrowed from the future, sometimes brilliantly. The skill is knowing the price while you pay it.

A real program, with real numbers

Chapter 8 is an actual multi-year modernization that retired roughly three-quarters of a platform's upgrade-blocking debt — the standing-capacity structure, the keystone sequencing, and the three mistakes, told honestly.

The debt that hides outside the code

Dependency age, departed knowledge, missing tests, lying runbooks — the four invisible ledgers that turn two-week estimates into two-quarter marches, and the cheap readings that expose each one.

The rewrite chapter you'll actually use

Repair, replace-in-slices, or rewrite — with the two-lists test that separates the justified rewrite from the expensive grief, told through one of each from the same organization.

Every chapter ends with a move

The fear map, the repeat-condition rate, the dependency clock, the no-engineering-nouns funding sentence, the accepted-debt register — exercises to run on your own system the same week.

Inside

Four parts, twelve chapters

Part I — What you actually owe

Interest not sin, the four invisible ledgers, and how systems become untouchable.

Part II — Living with it

The two traps, incidents as interest payments, and the dependency clock.

Part III — Paying it down

Making the ledger visible, the program that retired 77% of blocking debt, and rewrite vs. repair.

Part IV — The judgment

Debt as a business conversation, not borrowing what you can't see, and the debts worth keeping.

Full chapter list
  1. Interest, not sin
  2. The debt you can't see from the code
  3. When the past becomes load-bearing
  4. The two traps
  5. Incidents are the interest payments
  6. The dependency clock
  7. Making the ledger visible
  8. The program — retiring debt at scale
  9. Rewrite, replace, or repair
  10. Debt is a business conversation
  11. Don't borrow what you can't see
  12. The debts worth keeping
Written for

Who it's for

  • Engineering leaders who inherited a system older than their tenure
  • Senior engineers and tech leads who own a legacy codebase and a roadmap that ignores it
  • CTOs at scale-ups where the code that got them here is now slowing them down
  • Anyone about to propose, fund, or refuse a rewrite

Written by Midhunraj R — twenty years building software and the teams that build it, currently leading an engineering organization of more than ninety engineers. The thinking continues in the essays.