martinfowler.com logo Home Blog Articles Books About Me Contact Me ThoughtWorks

RefactoringBoundary refactoring Reactions

There was some recent discussion on the refactoring mailing list about what is or isn't a refactoring. As with these discussions, there's always a danger of debating how many angels fit on a pin, but thinking about the boundaries does have some useful purpose.

The DefinitionOfRefactoring in my book was intentionally informal. The informality rests on a couple of phrases that are distinctly open to interpretation:

  • without changing its observable behavior: which begs the question what is observable behavior? Essentially it means that the software still does what it did before - but there's lots of ways you could interpret that.
  • to make it easier to understand and cheaper to modify: this gets at the purpose of refactoring. There are many changes we can make to our programs, but in my view refactoring is all about making it easier to understand and change. The same changes made with a different purpose aren't refactoring as I see it.

The essence of refactoring is that of the sequence of small behavior-preserving changes. Despite the fact that refactoring isn't something that can be formally defined, it's still a pretty precise terms - and I do want to avoid RefactoringMalapropism. But I think it's worth thinking about some of these cases, which I'm putting in different bliki entries: IsChangingInterfacesRefactoring, IsFixingAnUnknownBugRefactoring, IsOptimizationRefactoring, and IsDeclarationOrderingRefactoring.


Links
home
bliki
feed 
Translations
Japanese
Spanish
Korean
Chinese
Thai
Categories
agile
design
dsl
leisure
refactoring
ruby
thoughtWorks
tools
uml
writing
Blog Roll
ThoughtBlogs
TW Alumni
Nicholas Carr
Steve Cook
Brian Foote
Simon Harris
Gregor Hohpe
/\ndy Hunt
Ralph Johnson
Patrick Logan
David Ing
Brian Marick
Jeremy Miller
Jimmy Nilsson
Samuel Pepys
Keith Ray
Johanna Rothman
Kathy Sierra
Dave Thomas

martinfowler.com logo mingle logo thoughtworks logo

© Copyright Martin Fowler, all rights reserved