Appearance matters. I noticed that when I let myself go and don’t bother with tidying up, it has a snowball effect. What starts as a cup left on the coffee table soon becomes a messy home.
The same is true for code. If I don’t keep a high bar, soon enough the whole thing is a tangled mess.
There is a theory that explains this phenomenon. It’s called The Broken Windows Theory. It basically says that when appearances are neglected, things deteriorate quickly. Leave a broken window unfixed, and it shows apathy. Apathy is contagious.
It is much easier to deal with mess early on. There is little mess to begin with, so there isn’t much to do to keep things tidy. Tidiness, too, is contagious. Keep things clean and tidy, and others will respect the tidiness.
This is why I try to keep the bar pedantically high when it comes to code. It also works when it comes to keeping my home tidy. OK, I have to admit the latter is much easier thanks to my wife. Having a cleaner come in once a week helps, too.
So don’t leave that cup on the coffee table. Keep your sink empty. Don’t leave messy code behind. Enjoy the tidiness.