Often, I find myself commenting out chuncks of code. Either because I decide to go on a different route with the solution, or because the specs for the program change (do they change? YES). When revisiting the code after a while, I sometimes don’t seem to be able to come up with the why of these comments. I can do either one of two things: Keep or remove the commented code. I don’t really like to remove the commented code, because they show some intelligence on the program. Why a certain solution didn’t work, how the specs used to be, etc.
Mostly I date-stamp my comments. Now what would be a good time to remove these comments and does the program run slower with the comments in place?
I think removing the comments is only useful when the readabilty of the program improves by removing them. Note: They are not comments to explain the code. They are code that is turned off.
What do you think would be a good time to remove this code/these comments.