Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

jplindstrom
  (email not shown publicly)

Journal of jplindstrom (594)

Thursday October 07, 2004
05:49 AM

Fowler on refactoring

[ #21232 ]

Nothing new, but I think this neatly captures what refactoring is all about:

The whole point of refactoring is that it improves the design of existing code. The value of well designed code is that it is easier to change. Hence you refactor code that you expect to change in the future.

This leads to the practice of refactor-as-you-go. The second most useful time to refactor *) is just before you change something, both to become familiar with the code and to make the implementation easier. This is also a great time to improve the test coverage, because you know what you're about to possibly break.

*) I'd say the most useful time to refactor is just after you wrote somehting that obviously needs cleaning up.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Refactoring can also clear a path for new development. What looks cleanly refactored after on development episode can look like a field littered with obstacles when a new set of development stories gets picked up.