Ian Collins wrote, On 02/11/07 05:45:
Well, at least you have gone from a blanket scrap and rewrite to
"generally", i.e. not always.
Nonsense, refactoring does not change the behaviour of the code, which
includes its public interfaces. The term is abused all to often when
that is being done is a rewrite.
Also refactoring in at least some cases does not involve rewriting the
code being refactored. On one occasion when I was refactoring a project
I had to rename some functions, move a few bits about, and change under
1% of the code to go from what I considered to be a terrible structure
to a really nice structure.
Re-factoring can be as simple as pulling a block of code out of one
function in to a separate function and calling it from the first
function. Or it can involve a lot more change and major rewrites.
Finally, there are some problem domains where if you know the domain
well you can predict extremely accurately where requirements will change
over time and in general what sort of changes will occur and design your
SW specifically to allow those changes. Sometimes you will be wrong, and
sometimes it is simply not possible to guess what is likely, but in some
domains it is.