Thomas said:
You said:
Redesign implies radical change where the
entire API changes.
Which is just plain wrong. You need to specify /what/ is being redesigned
in order to know if it is "radical change" or if "the entire API changes".
You seem to be ignoring Roedy's later post where he agreed with the idea that
'redesign' could be applied to different levels of detail of the design.
By "Radical" then we are not suggesting it always is in comparison to the whole
application, just that the connotation is that where you want to go is probably
not just a few steps away from where the code is now and need not have any
relation to the original code.
"I am going to redesign that entire routine" suggests that the body will not
be recognizable when done, thus Roedy and others, including I, might use
the term radical. If you're just going to change one loop into another style
of loop or factor out a separate routine just for readability many people
would NOT call it redesign. Meanwhile refactoring is a series of short steps;
the kind of things that can be supported or semi-automated by smart
language-aware editors. The kind off thing that is on the smaller end of
redesign but also very much simply cleaning up the code.
Those who promote re-factoring and really find it useful believe that a good
understanding of what makes a readable, short, re-usable etc. routine when
applied with some other rules of thumb can actually help them evolve very usable
and often very organized designs. As Roedy said, evolution not revolution.
But back to why there is this term refactoring. Yes, it includes a subset of
redesign, but one of the points of having a new term is to separate out those
simple known and well understood and named modifications that everyone should
consider simply doing when they see one to do. It is those which have been
given the name 'refactorings' and are in contrast to things of a more complex
nature, and maybe only slightly more complex nature, but still more complex.
Even those who criticize this optimistic view of the utility of re-factorings
need to correctly define and agree upon the term refactoring in order to discuss
how much of an architecture can really be emergent and evolved from the simplier
code. In order to discuss the potential for tirelessly apply such smallish
changes and to identify those changes which are automatable or semi-automatable
there is this new term to differiate them for the larger scope of all possible
redesign changes.
It's all coding, some of it is re-design, some of it is now called refactoring.
-Paul