1 comment

[ 3.2 ms ] story [ 13.3 ms ] thread
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.