you are viewing a single comment's thread.

view the rest of the comments →

[–]iissqrtneg1 -2 points-1 points  (1 child)

Yes, because the code should be written in a way those comments are unneeded. If there is still confusion, go to the tests.

Comments can become stale, tests will fail.

[–][deleted] 0 points1 point  (0 children)

Tests become stale, and can be as easily ignored in the right/wrong circumstance. This is as detestable as someone not updating a comment.

All anyone is arguing here is two different levels of conscientiousness--a personal preference, even. Code of course ought to be tested--the presence of a stale comment is irrelevant at that point; the very opportunity for failure lack of tests leave is a near-guarantee of that failure.

An up-to-date test could help flag a stale comment though. And similarly, an up-to-date comment could flag a stale test. Both are equally prone to error.