4 ms·
"Properly commenting code is so often overlooked when developing software and it is a damn shame". I'd change that to, "commenting code that is self-explanator
by ktzar 9y ago
"Properly commenting code is so often overlooked when developing software and it is a damn shame".
I'd change that to, "commenting code that is self-explanatory is so often overused when developing software and it is a damn shame"
In the very same article, there's a function with the following JavaDoc description "A simple add implementation that performs addition on two integer values". Nothing I can't get from actually "knowing how to read code".
- Retra 9y agoExcept by reading that comment, you can tell if the function was implemented correctly or not.
- ben-schaaf 9y agoUntil your requirements change and someone forgets to update the comment. Now you don't know whether you have a bug and/or bad documentation.
- Retra 9y agoThat should be an easy checkbox for any code reviews you do. If you changed the function, why didn't you change the comment?
- adamors 9y agoThat's what unit tests are for.