Hacker News new | past | comments | ask | show | jobs | submit login

Right now, I just use TODO along with a description. But the thing that has helped me and my teams most is adding a date and a name to each todo. For example, // TODO (03 May 2022 chap): This can be optimised.

The date really helps because many times the TODO was written for an earlier design, and the todos haven't been updated. Many times a lot of time has been saved when trying to figure out the context of a todo.

Same for author. Helps to know who made the note, in case any additional context is needed. Though often it is you who made the comment and you've obviously forgotten...




If you're using a decent version control system, the name and date can be skipped in favor of a quick blame when you actually need to know.


I guess that's another way to go about it. I don't know how git deals with reindenting, refactoring etc, and you might lose context, but you could probably find it again.

It's kinda nice having it right there in the code though.


I use an iterative blame tool (magit-blame in Emacs) and it generally does pretty well for me.

I prefer having the author out of the way and looking it up when I'm curious. I can see how others might prefer the opposite.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: