When you refactor during a change, you make the change bigger.

When you refactor before the change, you make the change smaller.

- in a talk by Jason Swett

@jessitron The difficult thing is to realize during the change, that a refactor would be beneficial and then to have the guts to throw the changes so far away and do the refactor beforehand.