Hacker News new | ask | show | jobs
by Terr_ 251 days ago
> Turns out sometimes the next guy who has to do maintenance is oneself.

Over the years I've been well-served by putting lots of comments into tickets like "here's the SQL query I used to check for X" or "an easy local repro of this bug is to disable Y", etc.

It may not always be useful to others... but Future Me tends to be glad of it when a similar issue pops up months later.

2 comments

On the same boat, I've learnt to leave breadcrumbs for the future quite a long time ago, and it's paid off many, many times.

After it becomes second-nature is really relaxing to know I have left all the context I could muster around, comments in tickets, comments in the code referencing a decision, well-written commit messages for anything a little non-trivial. I learnt that peppering all the "whys" around is just being a good citizen in the codebase, even if only for Future Me.

Agree completely, while "what" is completely redundant most of the time, a couple of "why"s can be of immense help later, to oneself and others.