Skip to content

Commit

Permalink
Add boyscout rule
Browse files Browse the repository at this point in the history
  • Loading branch information
iluwatar committed Jan 24, 2016
1 parent d992cae commit 0289986
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The list was inspired by [The Principles of Good Programming](http://www.artima.
* [Keep Things DRY](#keep-things-dry)
* [Code For The Maintainer](#code-for-the-maintainer)
* [Avoid Premature Optimization](#avoid-premature-optimization)
* [Boyscout Rule](#boyscout-rule)

### Inter-Module/Class

Expand Down Expand Up @@ -352,3 +353,21 @@ How
Resources

* [Interface segregation principle](https://en.wikipedia.org/wiki/Interface_segregation_principle)

## Boyscout Rule

The boyscout rule states that we should always leave the code cleaner than we found it.

Why

* When making changes to an existing codebase the code quality tends to degrade accumulating technical debt. Following the boyscout rule, we should mind the quality with each commit. Technical debt is resisted by continuous refactoring, no matter how small.

How

* With each commit make sure it does not degrade the codebase quality
* Any time someone sees some code that isn't as clear as it should be, they should take the opportunity to fix it right there and then

Resources

* [Opportunistic Refactoring](http://martinfowler.com/bliki/OpportunisticRefactoring.html)
* [Clean Code: A Handbook of Agile Software Craftsmanship](http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)

0 comments on commit 0289986

Please sign in to comment.