1. Write ugly tests 2. Write bad code 3. Refactor the bad code to make it good 4. Refactor the ugly tests to make them pretty 5. Goto 1