In conversation with a co-worker:
> [Refactoring] is like decorating a house. You sort out one place
> and give it a nice new coat of paint, and it shows up the next bit. And
> so on, until you decide to stop.
Yes, then you end up with our house. Nicely decorated, a few cracks, but
DO NOT GO INTO THE BATHROOM
what is refactoring (Score:1)
In my universe, refactoring simply means eliminate as much copy&paste as possible.
Usually that would result in actually rewriting a lot of 'broken' things. Of course, one may always put an API layer around some crappy component, but to me that is orthogonal to refactoring.
Or, more accurately - placing a nice API around some crappy componenet - that is not an essence of refactoring.
Eleminating copy & paste - that is an essence of refactoring.
http://www.xmlsuck.com/X/1037127117/index_html [xmlsuck.com]
Cut 'n' paste is only part ofit (Score:2)
This won't eliminate any cut and paste, but if you have a misnamed method (or variable, or whatever) then renaming it can certainly improve code readability.
Unfinished Business (Score:1)
The problems are in my opinion really:
- when to stop refactoring
- when is code finished
Postulating that code never is finished would imply refactoring can never be called complete and therefore refactoring is a tool to 'make the best of it for now'.
My kitchen table is not fastened to the element beneath it, I can still cook and do the dishes, but I would not recommend having sev