Ayende @ Rahien

Unnatural acts on source code

Hasty notes on Big Refactoring

I am going to write a more full featured post about this, but I think that the jotted notes for that are also interesting.

Big rafactoring is what I call to a refactoring that touces large swaths of the code base, changing the implementation of a core service is one such example, or changing key archtictual patterns.

  • Must have tests at first.
  • Change is too big, will affect too much of the system to change in place.
  • Can't change the system and the test at the same time
  • Taking as granted that you have source control.
  • Ability to rollback at any time.
  • Tests are hindarance, not a help.
  • Stateful structure with tests.

Comments

Jeff Brown
11/06/2007 06:12 AM by
Jeff Brown

I did one of these recently on MbUnit v3 to extract Gallio as a separate platform component. That was erm... fun.

Julian said I should blog about it. Maybe I should...

"Tests are a hindrance, not a help."

Yup. The more tightly coupled they are, the worse. Tests tend to make the system more rigid than it needs to be. They don't "bend" -- they break outright -- and can take hours to fix because of all of the built-in superfluous assumptions.

Comments have been closed on this topic.