Leave the campsite cleaner than you found it

By Lev

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.

One Response to “Leave the campsite cleaner than you found it”

  1. Michael Kopinsky Says:

    The nice thing about source control systems is that you can delete that old, temporarily disabled code without worrying about needing it later.

Leave a Reply