Scout rules still apply

Apart from thinking ahead and finding collaborators for coaching and facilitation sessions early next year, this week has been mostly hands on coding.

I realise I miss weeks like this. There is something really satisfying in adding small features or fixing bugs and taking the opportunity to clean things up as I go along. Cleaning up can mean:

  • Checking base image versions in docker files
  • Bumping the package management version (e.g. bundler for ruby world)
  • Curating dependency chains
  • Getting the project ready for dependabot or renovate to help with dependancies
  • Considering a rename or split for a method that does more than it used to
  • DRY-ing up code where we now repeat ourselves more than twice
  • Adding a couple of tests for edge cases

It’s important to think about a few things when you decide how much to do at once. It is possible to creep all the scope and get into an update that should be its own story.

  • Do you have an automated test suite? what about build and integration pipelines?
  • How far are dependancies behind? Will we cross into breaking changes territory?
  • Is the project in sunset i.e. deprecated and mostly replaced

Doing some clean up as “small changes and often” really helps stay up to date. The longer we leave it, the more it piles up and the harder it is to face, and to tackle.

I first heard about “Code Scout Rules” or “Boy Scout Rules” in a talk given back in 2015 by Matt Cockayne and it’s still just as important as ever to leave the codebase better than you found it.