The Comment That Was Never Written: How Documentation Debt Bankrupts Teams Slowly
Photo: empty notebook pen desk software developer, via thumbs.dreamstime.com
Let's establish something upfront: no one has ever, in the history of software development, finished a feature and thought, "You know what this needs? More documentation." The code works. The tests pass. The PR is waiting. The documentation can happen later.
Later, as a concept, is doing a lot of heavy lifting in this industry.
What Documentation Debt Actually Costs
There's a framing problem with how we talk about technical debt in general, and documentation debt specifically. We call it "debt" because it implies something manageable — a balance sheet entry, a liability you can carry for a while and pay down strategically. This metaphor is too generous.
Documentation debt behaves less like a mortgage and more like a payday loan that you took out, forgot about, and then discovered had been quietly charging 400% APR for eighteen months. By the time you notice it, the principal is unrecognizable.
Here's the actual math of skipped documentation. Day one: a developer writes a function that does something non-obvious. It takes about fifteen minutes to understand why it works the way it does. Writing a comment explaining it would take three minutes. The developer ships without the comment because the sprint ends tomorrow.
Six months later, a different developer needs to modify that function. They spend forty-five minutes reverse-engineering the logic before they feel confident touching it. They still don't write the comment because now they're in a hurry too. The cycle continues.
A year later, the original developer has left the company. A new hire encounters the function during onboarding. They spend two hours on it, eventually asking a senior developer who sort of remembers writing something like that but isn't certain if this is the same function or a different one that does a similar thing. The senior developer spends thirty minutes helping. The new hire still isn't fully confident. They write a comment that says // handles edge case and moves on.
Three minutes of documentation. Compounding indefinitely. Against real human hours.
The Onboarding Horror Show
The place where documentation debt becomes most visible — and most expensive — is onboarding. This is when all the tribal knowledge that has been quietly substituting for written documentation gets stress-tested against a person who has none of it.
Every team has a version of this story. The new engineer arrives, gets handed a laptop and a repository, and is told they'll be productive in a couple of weeks. They open the README. The README says to run npm install and then npm start. They run npm install. It fails. There's no documentation explaining why. There's no documentation explaining the workaround that everyone else learned on their second day. There's a Slack message from 2021 where someone explained the fix, but finding it requires knowing to search for it, which requires knowing it exists.
They ask a teammate. The teammate knows the fix because they went through the same thing. They share it. The new engineer asks if they should add it to the README. "Yeah, totally," says the teammate, already moving on to the next thing.
The README remains unchanged. The next new hire will have the same conversation.
This is not a story about bad people. It's a story about a system where the cost of skipping documentation is invisible and diffuse, distributed across future people's time, while the benefit of skipping it is immediate and personal. The incentives are misaligned by design, and no amount of exhortation to "be better about docs" will fix a structural problem.
The False Economy of "We'll Document It Later"
"We'll document it later" is the "I'll start the diet on Monday" of software development. It is technically true in the sense that Monday does arrive and later does eventually occur. It is practically false in the sense that the conditions that made documentation inconvenient now will not meaningfully improve later.
Later, the feature has shipped and attention has moved on. Later, the developer who wrote it is deep in something else and has to context-switch back into a mental model they've already partially released. Later, there might be a documentation sprint — a dedicated effort to catch up — which will produce documentation that is less accurate than documentation written at the time would have been, because memory degrades and the "why" of implementation decisions fades faster than the "what."
The most valuable documentation isn't the kind that explains what code does. Any sufficiently patient developer can figure out what code does by reading it. The valuable documentation explains why the code does it that way — what constraint, what edge case, what business requirement, what failed experiment led to this particular solution. That information exists fully and clearly in exactly one moment: the moment the code is being written. After that, it starts to decay.
Breaking the Cycle Without Losing Your Mind
The good news is that documentation debt, unlike some other forms of technical debt, is actually reducible with relatively small behavioral changes if you address the incentive problem directly.
Make documentation part of the definition of done. Not a suggestion, not a nice-to-have. If it's not documented, it's not done. PRs that introduce undocumented non-obvious logic don't merge. This sounds draconian until you realize that the alternative is paying the compounding interest forever.
Document at the decision level, not the implementation level. You don't need a comment explaining what a for loop does. You need a comment explaining why you're iterating in reverse, or why this threshold is 47 instead of 50, or why this API call is made twice. Capture the decisions and the reasoning. The code itself handles the implementation.
Treat onboarding as a documentation audit. Every time a new team member gets stuck on something undocumented, that's a bug. Track it. Fix it. The new hire's confusion is a signal, not an inconvenience.
Accept that some documentation will be imperfect and ship it anyway. The perfect documentation that never gets written is worth less than the imperfect documentation that exists. A comment that says "this handles the timezone edge case for US customers, see ticket #4892 for context" is infinitely more valuable than no comment, even if it doesn't fully explain the implementation.
The Null Terminator of Knowledge
Here's the thing about documentation debt that makes it genuinely different from other technical problems: when it gets bad enough, it doesn't just slow you down. It terminates knowledge.
The codebase becomes a black box. Developers stop modifying systems they don't understand and start building around them instead. The undocumented core gets load-bearing walls added to it, systems that depend on its behavior without understanding it, and now you can't change it even if you wanted to. The debt has calcified into architecture.
Somewhere in that architecture is the original undocumented decision — three minutes of typing that never happened — now holding up a system that processes real transactions, serves real users, and costs real money to maintain.
Write the comment. You know exactly what it should say. You know this right now, in this moment, better than you ever will again.
Later is a lie. The cursor is blinking.