Hacker News new | ask | show | jobs
by gundmc 2133 days ago
IMHO, comments should never describe what the code does. We're engineers, we can all read code and see what it does (or refer to the Javadoc). Comments should be used to describe WHY the author is doing something non-obvious in the code.
1 comments

Definitely agree with commenting deviations. Although I also advocate comments for each "operation". No problem if 5 lines of the same operation go uncommented, but if you have 5 lines of map().reduce().filter(), save your friends time and just pop in a

    // Find the top 3 posts by comment count
Suffering comments you already understand > running a VM in your head when you forgot