Notes and Quotes from 5 Lines of Code

This book is about refactoring code – changing the code without changing what it does.

When to refactor? Refactoring is like taking a shower. – Kent Beck

Here are many possible reasons to refactor:

  • Making code faster (as in the previous example)
  • Making code smaller
  • Making code more general or reusable
  • Making code easier to read or maintain

The last reason is so important and central that we equate it with good code.

The code for the examples in this book is available for download.


Jul 28, 2022: Currently reading