4 ms·
I like the idea to include a name with TODOs, like # TODO(qznc) check Unicode handling This never occured to me, but it provides a good pointer whom to ask
by qznc 15y ago
I like the idea to include a name with TODOs, like
# TODO(qznc) check Unicode handling
This never occured to me, but it provides a good pointer whom to ask for details. On the other hand git-blame should be able to provide the same info.
- anatoly 15y agoThis is also convenient for when you want to pay back technical debt and fix some of the old TODOs: you can search the codebase for those with your name on them.
- AncientPC 15y agoIf you're working with a Git repository, there's always `git blame` (http://schacon.github.com/git/git-blame.html http://schacon.github.com/git/git-blame.html).
- minimax 15y agoSeems to be a Google-ism. I haven't worked there, but all the ex-Googlers I've worked with do this. It also makes it easy to grep for all your TODOs in a tree, something you can't do with cvs/svn/git annotate.
- Aissen 15y ago> something you can't do with cvs/svn/git annotate. Challenge accepted: for i in $(git grep -l TODO); do git blame -f $i |grep TODO |grep "$NAME"; done Granted, it can be long on a big codebase, but does the trick.
- viraptor 15y agoI hate those. Unless you're familiar with the whole team you don't know who qznc is. Git/hg/svn blame will tell you that more precisely. Inserting your name in the comment is only slightly less annoying than people insisting to put "author"comments on top of the file (or even a function)
- tonfa 15y agoAnd you don't have an easy to find out who he is? Or mail him based on his username?
- viraptor 15y agoIf his username matches with his email, or if he uses the it consistently - maybe. But probably he wrote that note ages ago, someone else rewrote the function since then and left the comment because the content is still valid - ie. you're contacting the wrong person. In short: metadata which is not updated automatically is most likely not up to date, and may be not correct in general.
- tonfa 15y agoYou can configure the linter to check for valid username.
- sp332 15y agoI guess you could use "git blame" to find the name and email of the person who added that line?
- pavel_lishin 15y agoI prefer something like #TODO #4001 needs more bananas Where 4001 references something in our bug tracker (task, feature, issue, bug, etc.)