News for hackers. Stuff that matters.
Re:Show HN: I transformed my library into a Node and 100% co... by openasocket on Monday March 07, 2016 @10:38AM (#11239426)
I'd mention one exception: when you're doing something very complicated in a single function. For instance, I recently had to write an algorithm that involved partitioning integers into intervals, and the solution was a very non-intuitive dynamic programming algorithm. I devoted several paragraphs of documentation to the how's and why's, along with additional comments every couple lines. I found it really useful, especially when I had to go back and fix an odd off-by-one error that only occurred in certain cases. In those situations, variable names can only help so much.

There are no comments on this comment yet.