Where I start
I recently reopened a project that had been on hold for a while. Code I wrote six months ago feels almost like someone else’s now.
The parts I can’t read my own intent in
Here and there, I can’t tell why I wrote something the way I did.
- An awkward branch
- A function split into oddly tiny pieces
- A utility whose purpose I can’t figure out
- A constant with no comment
Past me surely had reasons for all of it, but none of that context survives for present me.
The urge to rewrite everything
The first thing that bubbles up is “I want to rewrite all of it.” But if I gave in to that every time, I’d never move forward.
If it works, read it without breaking it as much as you can.
These days I keep the area I touch limited to exactly what the task needs.
What I leave behind
I’ve started leaving at least a few notes, like letters to my future self.
- Why I chose this structure
- The options I tried and threw away
- Known bugs and the scope they affect
Even a few lines makes a real difference to how fast I can decide things six months later.
Closing thoughts
Old code may be rough around the edges, but it’s a record of the decisions I made at the time. The time I spend rereading it turns out to be pretty useful as a way to look back.