The Boy Scout Rule

August 22, 2022
Don't focus on lofty goals. Fcus on daily making the code a little bit better.

You’ve probably heard the rule before, or a variation of it:

Always leave the code better than you found it.

It’s an adaptation of an camping rule used made famous by the Boy Scouts of America:

Always leave the camp site cleaner than you found it.

I found myself explaining it today to my team, who was frustrated by the lack of progress they were making toward paying off some overwhelming technical debt.

My advice was: Don’t focus on the lofty goals, as good as they are. Instead, focus on daily making the code a little bit better. Soon, the technical debt won’t seem so overwhelming.

Share this

Related Content

Refactoring Revisited

Many people don't understand refactoring, and this leads to several anti-patterns.

The doorway effect

Write code as if every function is a doorway, and every reader of my code will always experience the doorway effect.

The affect of comments in unclear code

Roses are red, violets are blue. Honey is sweet, and clear code is, too.