News for hackers. Stuff that matters.
Re:Google's Python style guide by qznc on Thursday April 19, 2012 @03:10AM (#3861786)
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.
Re:Google's Python style guide by anatoly on Thursday April 19, 2012 @03:29AM (#3861827)
This 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.
Re:Google's Python style guide by minimax on Thursday April 19, 2012 @04:42AM (#3861983)
Seems 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.
Re:Google's Python style guide by Aissen on Thursday April 19, 2012 @05:10PM (#3865163)
> 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.
Re:Google's Python style guide by AncientPC on Thursday April 19, 2012 @04:07AM (#3861903)
If you're working with a Git repository, there's always `git blame` (http://schacon.github.com/git/git-blame.html).
Re:Google's Python style guide by pavel_lishin on Thursday April 19, 2012 @12:33PM (#3863813)
I prefer something like

    #TODO #4001 needs more bananas
Where 4001 references something in our bug tracker (task, feature, issue, bug, etc.)
Re:Google's Python style guide by viraptor on Thursday April 19, 2012 @05:34AM (#3862117)
I 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)
Re:Google's Python style guide by sp332 on Thursday April 19, 2012 @07:45AM (#3862457)
I guess you could use "git blame" to find the name and email of the person who added that line?
Re:Google's Python style guide by tonfa on Thursday April 19, 2012 @05:52AM (#3862161)
And you don't have an easy to find out who he is? Or mail him based on his username?
Re:Google's Python style guide by viraptor on Thursday April 19, 2012 @07:28AM (#3862411)
If 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.

Re:Google's Python style guide by tonfa on Thursday April 19, 2012 @09:12AM (#3862774)
You can configure the linter to check for valid username.