O'Reilly logo
  • Rafael Luque thinks this is interesting:

The first time you do something, you just do it. The second time you do something similar, you wince at the duplication, but you do the duplicate thing anyway. The third time you do something similar, you refactor.

From

Cover of Refactoring: Improving the Design of Existing Code

Note

rule of three