Re:Should You Comment Your Code?
by _lce0 on Wednesday January 14, 2015 @01:22PM
(#8888009)
Leaving aside code documentation (aka dockblocks), I can think of dozen of examples where you MUST comment you code..
- strict order of execution
- math formulas in the code (or its results)
- external systems requirements/hacks
- non-explicit side effects
- legacy or costly known issues
- intention of cryptic code
- design choices (and its tradeoff)
- ..
This obviously implies you actually care about who will maintain such best
Re:Should You Comment Your Code?
by simonblack on Wednesday January 14, 2015 @07:38PM
(#8890188)
Comments are an act of kindness towards the person who will be doing the maintenance on the code you have written. It's doubly kind when that code maintainer is yourself.
If you don't, I feel sorry for whoever has to maintain your code.