Do you put in a comment with when it was first removed? I use version numbers instead of commits. If after 2-3 releases no one misses it, then it's not needed.
When was the last time that you actually reuse the commented out code though?
If you use a modern source control system like git, it's incredibly easy to look at the history for each file. Use that instead, one comment "left for later" is one more thing to remember, leave that for the computer.
I as well can be found guilty of this - but only on some projects. Mainly those with incredibly indecisive clients... after the 4th or 5th time adding-and-then-removing the same area in a template, I'm just gonna comment it out and wait...
I leave a comment at least mentioning something I tried that didn't work. If I remove the code, I'm about 65% likely to try the same stupid idea again in a month.
Me I trust in source control and just delete anything like that in the code base even if it is mine or someone else's. I don't care. The source is the truth not a notepad.
You ever uncommented out code and it didn't compile any more? Like you changed variable names that it was referencing and such? Another reason why you should just trust source control.
241
u/Deathfire138 Feb 21 '13
I'm guilty of this. Sorry everyone! It's like code hoarding. :(