The Boy Scout rule is "Always leave the campground cleaner than you found it".
From a programming perspective, "Always leave the code better than you find it".
If you're working on some code and see some commented-out lines or unused variables, once you've finished with your changes, remove them too.
If there's a variable that could have a more descriptive name, change it.
If there are any other refactors you can do, do them and leave the code better than before and easier for the next Developer (whether it's you or someone else) to work with.
- Oliver
Was this interesting?
About me
I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.