News for hackers. Stuff that matters.
Re:What does this code do? by jpablo on Wednesday July 21, 2010 @11:23AM (#1535429)
I think a comment specifying the name of the algorithm would be great if you want to dig deeper when the function isn't working.
Re:What does this code do? by mcantor on Wednesday July 21, 2010 @11:25AM (#1535434)
That's a good point. The author said, "... a comment explaining the problem the code is trying to solve [would have helped]," which is what threw me--that's what the function name is for!
Re:What does this code do? by fragmede on Wednesday July 21, 2010 @05:40PM (#1536631)
What am I doing rewriting pow?

Specifically, naming the algorithm would be good, but the comment should also say why. //This is called by the frobbinator module where preconditions A and B are met, which makes this more efficient.