The Boy Scout Rule in Coding

Leave it better than you found it

Steven Curtis
3 min readJun 26, 2020
Photo by Gilles Trenson on Unsplash

Keeping your code maintainable and easy to read is an incredible challenge. Can you rise to that challenge, and even maintain the Boy scout rule?

The scout’s rule

Robert Baden-Powell is attributed with the following quote

Try and leave this world a little better than you found it, and when your turn comes to die, you can die happy in feeling that at any rate, you have not wasted your time but have done your best.

This has been interpreted when scouts camp with the following:

Always leave the campground cleaner than you found it

Which is nice isn’t it?

When the scouts camp somewhere, it doesn’t matter who dropped some litter on the floor — even if it was someone who isn’t in the scout troop.

The effect of a rule like this is manyfold, but one result of this is that the scouts get a good reputation wherever they go. They are seen as some sort of force for good, and have a rule that is simply to conform to.

--

--

No responses yet