In-code TODOs without tickets don't usually get done
Does this look familiar?
// TODO: xxx
Git blame: John Doe (6 years ago)
It does to me. That’s because I’ve almost never written (or seen) a TODO in code that actually gets done unless there is an associated ticket.
Why would an in-code TODO actually get done? The next time someone sees it, they’ll almost certainly be working on another task. If it was too challenging to take care of right now, it’ll probably also be too challenging to take care of in the midst of another task.
If this is actually a "to-do," put it in a ticket. Link the ticket from the TODO
comment. Something like this:
// TODO: xxx. See ticket #46723.
If it can be a clickable link to the ticketing system, even better.
Now someone on your team might get to the ticket during a "tech debt" sprint, or perhaps someone who sees this comment will grab the ticket in a sprint and get points for it. Either way, I think you've set yourself up for having a higher chance of getting the task done.
Otherwise, your TODO comment will end up just serving as documentation of tech debt. Not necessary a bad thing, but kind of a misnomer.
If you enjoyed this article, consider subscribing on Feedly or your favorite RSS consumer. If you'd like to chat, I'm most active on Bluesky.