Hacker News new | ask | show | jobs
by cheshireoctopus 3068 days ago
I find the Boy Scout Rule to be helpful:

> The Boy Scouts have a rule: "Always leave the campground cleaner than you found it." If you find a mess on the ground, you clean it up regardless of who might have made the mess. You intentionally improve the environment for the next group of campers. Actually the original form of that rule, written by Robert Stephenson Smyth Baden-Powell, the father of scouting, was "Try and leave this world a little better than you found it."

> What if we followed a similar rule in our code: "Always check a module in cleaner than when you checked it out." No matter who the original author was, what if we always made some effort, no matter how small, to improve the module. What would be the result?

http://programmer.97things.oreilly.com/wiki/index.php/The_Bo...

Apply it as you go. Piece by piece. Perhaps encourage your fellow developers to adopt the practice.

2 comments

> No matter who the original author was, what if we always made some effort, no matter how small, to improve the module. What would be the result?

People would stop being willing to review his PRs, because they'd always contain off-topic changes?

Being a good source steward seems to always be 'on-topic'. The only time I've seen gentle improvements rejected is during hotfix releases.
I think about this every time I look at a piece of code that does nothing. I mean after I think of smashing my screen in.