3 ms·
In a couple of work environments, people would initial the TODO -- I'm trying to remember if Joyent is one of those companies. I liked this, because it was extr
by lloydde 10y ago
In a couple of work environments, people would initial the TODO -- I'm trying to remember if Joyent is one of those companies. I liked this, because it was extra honesty about the craft and I could pick the person's brain if there were issues in that code. It would also seem to allow to get a TODO brain dump when someone is planning on leaving the company or assist in who to bring to the table for refactoring of a large component.
- veneratio 10y agoTagging TODOs is really useful. I can always look at source control, but that's more effort than seeing a name or bug number. At Google our linters are actually configured to create errors for any TODO/FIXME that isn't immediately followed by a user id or bug number: e.g. TODO(12345) or TODO(myname). I thought it was a little annoying at first, but over time I've realized how much faster it is to have that additional context.
- dmi 10y agoI think it's important to highlight that it's definitely about context rather than ownership when adding a name or bug number to a TODO comment. "// TODO(dmi): update after moving to Java8" doesn't necessarily mean that it's _me_ that has to fix it, but that someone can come to me and say "Tell me more about this". This took me a while to learn/remember, but it's very helpful. The hardest part for me to keep in mind was that someone else's name on a TODO shouldn't mean I ignore it.
- jwhitlark 10y agoI've found that a time stamp is super useful in TODOs, etc.
- WorldMaker 10y agoTimestamps and Users that added TODOs should be available from the praise/annotate/blame tools of your source control system.
- softawre 10y agoExactly. If people argue this is hard to look up, they need to get better at using their tools. For example, IntelliJ, just "shift+shift+a.n.n+enter", bam! VSCode has a nice plugin that will do it, same with sublime.
- WorldMaker 10y agoParticular shout out to the really great VSCode GitLens plugin that adds gray CodeLens "ghost annotate" to every editor window.