John F. Woods (who I actually knew IRL briefly - nicer guy than his online reputation suggests) said it best.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
I'll just add that the psychopath in question might be your own future self.