Hacker News new | ask | show | jobs
by snorberhuis 1861 days ago
I always suggest TODO's to be replaced during a Code Review by: 1. A ticket number that will be picked up shortly if should still be part of a larger change. In a healthy team, this is done within two weeks and you know where to perform changes when you pick it up. 2. You do not add a TODO, but explain your current understanding of what is wrong and what should be done. This way you can refresh the knowledge if it ever again is touched. With a simple TODO, this knowledge is usually not writtend down.
3 comments

I don't think I can agree with this, since some TODOs have a different target audience.

The kind of TODO you're talking about is splitting a ticket into parts so you can hit an artificial deadline (ie, it's no longer 'done done', it's just 'done'). If the artificial deadline is your boss, then we're in a bad place. If it's another team needing a feature, that's pipelining and that's often okay.

For the TODOs that make it to PR without human error, I write most of them for the next person who adds functionality to an area, to either encourage them to do so or at least not make things worse. But sometimes it's for the person who hits the Rule of 3.

Those TODO's should be addressed in six months, not two weeks, and having someone call me on them in a PR is not particularly helpful. No, I'm not going to quadruple the scope of this story because you don't like the word TODO.

Or do both. Might as well add TODO: to make it stand out as a thing that can be improved while also making it greppable.
Might also be cool to automatically create these tickets (when commited to master?). Then you don't forget, and even if they end up not that detailed, you at least get a nice list of all of them.
TODO: Automatically create tickets based on TODO comments.

We'll get to it. Someday.

https://en.wiktionary.org/wiki/round_tuit

There used to be an ASCII art version occasionally slapped on Usenet posts: "here's a round tuit, you can go ahead."

Caption: "An artist's impression of a round tuit."
That is really cool! Thanks for mentioning.
If you want a cli tool for this I have one here https://github.com/Schell/todo_finder

You can output to markdown or to GitHub issues with a token.

I used to operate a service that did this for you.

I like this idea, but I would add that my preference for scenario 2 is to add HACK (or FIXME) along with the explanation instead. This way it is still searchable, but you make it a bit more clear that there is no obvious fix at the moment.