In Clean Code: A Handbook of Agile Software Craftsmanship I’ve read this very useful rule:
If we all checked-in our code a little cleaner than when we checked it out, the code
simply could not rot. The cleanup doesn’t have to be something big. Change one variable
name for the better, break up one function that’s a little too large, eliminate one small bit of
duplication, clean up one composite if statement.
Or delete some unused or commented-out code.
July 30, 2009 at 8:52 pm
The nice thing about source control systems is that you can delete that old, temporarily disabled code without worrying about needing it later.