This question already has an answer here:
- Is commented out code really always bad? 13 answers
I've found, what I personally believe to be a bad habit that a lot of developers seem to have adopted. Code in various places in the applications I have seen are commented out (lots of it) and checked into the mainline. Now, I don't have a problem with people doing this with their own branches, but is it a good idea to comment out 60 or so lines of code and check it into trunk? A colleague of mines has unearthed a lot of this and had spend half a day removing the commented out code just to tidy things up. Is there any benefit in checking in commented out code and leaving it for another developer to have to tidy up after you? After all, version control does have a history, so you can easy pull back any code that's been removed.