Wednesday, May 14, 2008

Scratch Refactoring

If you need to understand how dirty code works than you can try "scratch refactoring".

Idea of scratch refactoring is simple:

  1. Check out code from version control.
  2. Forget about writing tests. Refactor whatever way you want. Your goal is better understanding of system.
  3. DO NOT check in. Throw code away.

This way you have clean code and you cannot break anything.

See also Working Effectively with Legacy Code (Robert C. Martin Series)

0 comments: