One thing I'm also guilty of is fixing code that I'm not currently touching. I like consistency and having a project with code from old me (and old others) mixed in with code from new me (and new others) really bothers my OCDness. The problem is that changing working old code in lieu of fixing bugs or adding features is just another form of procrastination.
There is a time and place for code cleaning. If the code isn't something you are already working in, then leave it. If you are tasked to fix a problem or add something to existing code then cleaning it up is acceptable. Keep mind, I'm assuming there are tests written. Nothing pisses off your co-workers more than cleaning up working code and breaking inadvertently breaking something.
There is a time and place for code cleaning. If the code isn't something you are already working in, then leave it. If you are tasked to fix a problem or add something to existing code then cleaning it up is acceptable. Keep mind, I'm assuming there are tests written. Nothing pisses off your co-workers more than cleaning up working code and breaking inadvertently breaking something.