Refactoring and Rewriting
Keith Ray points out that these are very different activities:
First, keep refactoring and rewriting (bug-fixing) separate. These two activities may be done only five minutes apart, but you're wearing a different "hat" during each activity. Refactoring is improving the design of the code, while preserving its behavior. Bug-fixing is changing the behavior.
There's a lot more as well, but the above needs to be pointed out to an awful lot of people who confuse the two topics....

