“The Broken Window Theory proposes the idea that if we do one bad thing in our code (i.e. break a window) then it becomes more likely that the next person who encounters that code will do something bad as well eventually leading to the degeneration of the code.
This is the same when commenting out code – if people see that there is code commented out then it becomes more acceptable for them to also comment out code and before you know it there are large chunks of code commented out and no one really knows why.”
From Mark Needham. As Mark notes, and a commenter amplifies, source control makes code comments obsolete. You have a backup of prior code in the code repository and you can revert to the prior code if your new code fails.
Leave A Commentposted in Programmers by Tim Slavin