Home Scout Rule
Post
Cancel

Scout Rule

The “Scout Rule” is derived from the Boy Scouts’ motto: “Leave the campground cleaner than you found it.” In the context of software development, it emphasizes the idea of leaving the codebase better than it was before you worked on it.

“Always leave the campground cleaner than you found it”

(boyscout rule)

Scout rule

The same can be applied to many other fields, I will refer to software development here. Even if that is not related to your current task, you should watch out for possible improvements.

It can be translated as:

“Always leave the code cleaner than you found it”

Here are some suggestions:

  • If you notice mistakes in the surrounding code fix them right away
  • If the class/method is getting bloated, think about refactoring
  • If you come across outdated comments you should update, delete, or mark them as outdated
  • Clean up unused methods/variables/classes

Over time you can make this a habit, so it becomes easier.

This post is licensed under CC BY 4.0 by the author.

Echoing Variables in Linux with newlines

-