j u n k h o t s m a r t a s s

anagrammatically correct

Jun 26

Refactoring Lesson Learned

When working on a project and the need for a big change comes up, refactor additively, meaning add the stuff you need before removing anything existing. And keep the tests running and passing. This may not be the most efficient way to do things. You may have some duplication while you’re refactoring, but getting aggressive with deleting files has two bad side-effects: it makes subversion unhappy (you’ll probably find yourself using —force) and it makes it harder to diagnose failing tests. When all the new code is in place and the tests are passing, remove the old code slowly. And keep the tests running!!

Page 1 of 1