|
|
|
|
|
by openasocket
3763 days ago
|
|
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. |
|