Skip to content

Instantly share code, notes, and snippets.

@lucasmezencio
Last active October 12, 2023 09:45
Show Gist options
  • Save lucasmezencio/be36ac2627e159898de8966de1bd06c5 to your computer and use it in GitHub Desktop.
Save lucasmezencio/be36ac2627e159898de8966de1bd06c5 to your computer and use it in GitHub Desktop.

The Boy/Girl Scout Rule

It’s not enough to write the code well. The code has to be kept clean over time. We’ve all seen code rot and degrade as time passes. So we must take an active role in preventing this degradation.

The Boy Scouts of America have a simple rule that we can apply to our profession.

Leave the campground cleaner than you found it.

If we all checked-in our code a little cleaner than when we checked it out, the code simply could not rot. The cleanup doesn’t have to be something big. Change one variable name for the better, break up one function that’s a little too large, eliminate one small bit of duplication, clean up one composite if statement.

Can you imagine working on a project where the code simply got better as time passed? Do you believe that any other option is professional? Indeed, isn’t continuous improvement an intrinsic part of professionalism?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment