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.
[ Parent
| on HN ]
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!
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.