Tuesday, November 24, 2009

Bitter Refactoring


Kimberley Bitter
Originally uploaded by kamoda
After reading Martin Fowler's book on Refactoring I've been a big fan of the practice. We all know that adding in tests to insure the refactoring doesn't change the results is essential.
But this last week the real world crept into our world of programming paradigms. We refactored a complicated section of code to make it simpler, more readable, and faster - a big win; except that after the code was fielding, one of our customers reported a problem.
Their use of our product actually depended on a bug in the old version. Refactoring the code fixed the bug and caused our customers grief.
I'm still a big fan of refactoring and continue to do it, but now I'm a little wiser that refactoring carries more risk than I'd thought before.

No comments: