A colleague and I attended a 2 day Clean Code workshop last year with the man himself, Uncle Bob, and while I learned a lot about what constitutes 'clean code' I must say that the biggest takeaway item I got was this:
The Boy Scout Rule (for programmers): Check in your code a little cleaner than you checked it out
(Clean Code - Page 14)
The realisation that by doing this this every time we committed new work we are actively reversing the rot was no small
boost in confidence. Knowing you're driving your codebase to better things every day was, and still is, a huge motivator for the whole team.
So, my question to the readers is: Do you follow the boy scout rule?