Live data from Hacker News

Why You Shouldn't Comment (or Document) Code

visualstudiomagazine.com

1–2 of 2 posts

Re: Why You Shouldn't Comment (or Document) Code

#2
It may be the case that you're writing code that must, for one reason or another, interact with a bunch of other poorly-written code that itself has unclear gotchas, nasty edge cases, or hidden side effects. It may not be possible to improve that code - maybe it's a third-party library, or maybe it's very entrenched and fixing it would cost too much time or money.

In that case, I feel like it's extremely important to comment what your code is doing, as well as why it is doing it.