Re:Stop lying to yourself – you “fix it later”
by wtetzner on Sunday November 20, 2022 @06:03PM
(#33686476)
Or it could be useful context for the next person to modify the code. Maybe it’s something that is only worth doing under certain conditions?
// TODO: This is fine for now, but if we start handling `bar`s, we’ll need an extra field for `quxx`.
Re:Stop lying to yourself – you “fix it later”
by UncleMeat on Monday November 21, 2022 @08:19AM
(#33692155)
This is a great way of introducing a bug. The TODO is only visible to somebody looking at the code. If somebody changes a caller to send over bars but doesn't check the comment then you've got a bug. If instead this was linked to the feature request to add support for bars then you've got the relevant context right there on the ticket and whoever is implementing support for bars is much less likely to miss it.
Re:Stop lying to yourself – you “fix it later”
by wtetzner on Wednesday November 23, 2022 @11:43PM
(#33727884)
And if the reason bars aren’t implemented yet is because nobody requested it, then there is no tracking ticket.
Re:Stop lying to yourself – you “fix it later”
by lmm on Sunday November 20, 2022 @06:38PM
(#33686764)
Nothing is important enough to be worth using JIRA for. When a company or team adopts JIRA it's the universe telling you that they've given up on doing anything valuable or useful. Trying to make such a codebase better is an exercise in futility; writing TODOs is as good a way to pass the time and collect a paycheck as any other, and any vestigial useful work to be done is more likely to be tracked in TODOs than in JIRA tickets.
That's the universe telling you the TODO is useless noise that points to a workitem that no one, not even you, find it relevant enough to track or work on.
When that happens, do everyone around you a favour and leave out the TODO comment.