Re:On Comments in Code
by benrbray on Wednesday June 16, 2021 @04:24AM
(#27526176)
No. Comments are like a parity check. If the comments don't match the code, then you know that either:
1) The comments are correct, but the code is wrong. This is a bug.
2) The comments are wrong, but the code is correct. This is equally a bug. Whoever makes the change has an obligation to describe their changes with a comment.
Code with no comments? Could be right, could be wrong, who knows?
1) The comments are correct, but the code is wrong. This is a bug. 2) The comments are wrong, but the code is correct. This is equally a bug. Whoever makes the change has an obligation to describe their changes with a comment.
Code with no comments? Could be right, could be wrong, who knows?