J.M. Quan All articles
Craft & Process

The Last Commit: Writing Software for Whoever Comes After You

J.M. Quan
The Last Commit: Writing Software for Whoever Comes After You

There is a moment in every consulting engagement that never appears on the invoice: the handoff. The client has signed off, the launch retrospective has been held, and someone new — often hired after the architecture decisions were frozen — opens the repository for the first time. What they find in that moment is the true final deliverable.

Over the years, I have sat on both sides of that exchange. I have inherited systems whose authors had clearly thought about me, though we never spoke. And I have inherited systems that read like a diary left in a drawer: technically complete, humanly illegible. The difference between the two has almost nothing to do with technical sophistication. It has to do with whether the departing engineer believed the handoff was part of the job.

Code Is a Letter to a Stranger

The most useful mental model I know for maintainable software is this: every line you write is a letter to a stranger who will read it under pressure, possibly at two in the morning, with a production incident in progress. That stranger deserves courtesy.

Courtesy in code looks unremarkable. It looks like a function named retryWithBackoff instead of process. It looks like a comment that explains why a timeout is set to 47 seconds — because of a vendor's rate-limiting quirk discovered in March — rather than what the code obviously does. It looks like deleting the dead branch you kept meaning to remove, rather than leaving it as an archaeological puzzle for your successor.

None of this shows up in a demo. All of it shows up in a handoff.

The Repository as an Archive

Commit history is the most underused documentation a team owns. A well-tended history reads like a narrative: commits that do one thing, messages that say why, pull requests that reference the ticket and the conversation. A careless history reads like static — "fix," "update," "final fix," "final fix 2."

I once inherited a billing service from an engineer who had left a single document in the repo root, titled READ_THIS_FIRST.md. It was four paragraphs long. It explained that the reconciliation job had a deliberate ordering quirk, that the staging environment drifted from production in one specific way, and which parts of the codebase he was least confident in. That last section — an honest map of his own uncertainty — saved my predecessor and me weeks. It was the most generous artifact anyone has ever handed me.

The lesson was not that everyone should write a farewell document. It was that documentation is most valuable when it records judgment, not just mechanics. Anyone can regenerate API docs. Nobody can regenerate the reasoning behind a decision made two years ago by someone who has since moved to Denver.

Runbooks, or the Absence of Panic

A handoff is not complete when the code is transferred. It is complete when the successor can operate the system alone on a bad day. That requires runbooks: how to rotate the credentials, where the logs live, which alerts can be safely ignored and which mean drop everything.

The test I apply is simple. Suppose the successor gets paged at 3 a.m. on a holiday weekend. Can they find, within ten minutes, a document that tells them what to check first? If not, the handoff has failed — regardless of how elegant the code is. Operational clarity is not glamorous work, and it rarely earns praise in the sprint review. It is, however, the difference between an inheritance and a liability.

The Walkthrough

When circumstances allow, the highest-value hour in any transition is a live walkthrough. Not a slide deck. Not a recorded video that will be obsolete in a quarter. A conversation, ideally with the successor sharing their screen and asking the questions documentation cannot anticipate.

The best walkthroughs follow the shape of the system's actual life: how a request enters, where it is transformed, what can go wrong along the way, and who to contact when it does. The departing engineer should narrate the parts they are least proud of. Successors trust a map more when its maker admits where the marshes are.

A Question of Professional Identity

There is a cultural current in American software engineering — reinforced by job-hopping norms and résumé-driven development — that treats departure as an ending that is not one's problem. You ship, you update LinkedIn, you move on. The successor is someone else's story.

I would argue the opposite: how you leave is the most honest record of your craft. Anyone can look good at launch, surrounded by a team, with full context and fresh motivation. The handoff strips all of that away. What remains is a pure measure of whether you thought of the work as yours or as a relay leg — whether you understood that software is never finished, only entrusted.

The engineers I admire most share a quiet habit: they begin preparing the handoff on the first day of the project. They name things for readers who do not share their context. They write commit messages as if a future colleague is listening. They leave the campsite better than they found it, not as a slogan but as an operating procedure.

A project's true final deliverable is not the launch announcement. It is the moment, months later, when a stranger opens the repository, finds the map you left, and thinks: whoever built this was thinking of me. That thought is the last commit. Make it a good one.

All Articles

Related Articles

In Praise of the Caretakers: The Case for Engineers Who Fix Rather Than Replace

In Praise of the Caretakers: The Case for Engineers Who Fix Rather Than Replace

Drawing the Line: What a Consultant Bills For — and What Belongs to the Commons

Drawing the Line: What a Consultant Bills For — and What Belongs to the Commons

The Weekend Rule: How Throwaway Projects Became My Most Durable Work

The Weekend Rule: How Throwaway Projects Became My Most Durable Work