Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Re: Refactoring Redux...

by Sifmole (Chaplain)
on Dec 17, 2002 at 12:37 UTC ( #220498=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Refactoring Redux...
in thread Refactoring Redux...

So what do we call refactoring with modification (improvements?)...

The wrong way to do it.

If you read about refactoring, especially Fowler's book, it specifically admonishes you to only refactor and not extend your code while refactoring. As someone else pointed out you are creating a lot more possibility for broken code.

You refactor, then you extend, then you refactor again -- etc.

Replies are listed 'Best First'.
Re: Re: Re: Re: Refactoring Redux...
by Molt (Chaplain) on Dec 17, 2002 at 13:11 UTC

    I agree wholeheartedly, and think this approach is one doomed to failure on any large-scale project. Add functionality as you build (Along with making sure you have an up to date and comprehensive suite of unit tests), and then refactor to make the code tidier without changing functionality (And also whilst making sure your test suite keeps working). Rinse and repeat.

    It does seem kind of ironic that the top-level thread started with the observation that people throw words like refactoring around with no real idea of what they are, and then proceeds to do exactly that.

    I think I'm slowly being indoctrinated by the Patterns/Refactoring Cult. It took some of them a considerable amount of time to crowbar some of the ideas into my skull, and a lot of patience to help keep me on the right track (For that methodology, anyway), but now I keep my unit tests fresh and am at least able to talk patternese whilst designed architecture, which helps when dealing with others who're more than able to do such.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://220498]
and the leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2018-06-24 11:40 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.