by CraigJPerry · 6y ago · 0 comments
So that leaves the “why”. To my mind, code comments are the worst place to record why a particular implementation exists. The why often needs collaboration with non-coders.
The worst is finding some snippet from stack overflow or GitHub without a reference to the issue to back up why this thing is here or perhaps a TODO: with an improvement
Commenting the purpose of the code and maybe a link to some documentation allows a future reader to see if the code still fulfills the requirements.