Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Refactoring

by Wally Hartshorn (Friar)
on Feb 28, 2003 at 15:41 UTC ( #239456=note: print w/replies, xml ) Need Help??


in reply to Bad Practice

I'm just now getting into it, but one of the practices of Extreme Programming (dorky name, but good ideas) is constant refactoring of code. (Must use more buzzwords!) Basically, when you see a bit of code that could be made clearer or that, if changed, would make it easier to add the new functionality on which you are working, you do so.

However, you should only do the refactoring if you have unit test cases that you can run to verify that your changes didn't break anything. In addition, you should do the refactoring of the old code separately from adding the new functionality, so that you can know whether any problems shown by the unit test cases are the result of the refactoring or are the result of the new functionality.

In short, improving code is a good thing, so long as you can verify that the improved code works as well as the old code.

Wally Hartshorn

(Plug: Visit JavaJunkies, PerlMonks for Java)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239456]
help
Chatterbox?
marioroy On a large dairy farm, almost went off the road with a 10 wheeler from exhaustion. On the farm, almost went off the silo with a big tractor. At the Fransiscan monastery, almost slipped off the dome while painting it.
[marioroy]: In Saudi Arabia caught fire but didn't burn. I think angels exist.
Lady_Aleena clean up after dinner finally.
[Discipulus]: uch! so we are twice lucky to have MCE..;=)
[marioroy]: Working a midnight graveyard shift, on the way home ran out of gas. just 2 minutes later somebody stops with a small tank of gas. It's wierd. There's always someone nearby for some reason.
[Lady_Aleena]: I was the one who stop[ed in the middle of a cold night to pick up a small family walking to a gas station. I got a few gallons of free gas for the round trip, and the grandmother said she'd pray for me.
[marioroy]: Folks do not know it, but MCE was ridiculously difficult. At Niagra Falls, heard a voice on enabling Grace while in the mist boat. That 10x performance is possible.
[marioroy]: Lady_Aleena Angels on earth are real people. That's awesome.
[Lady_Aleena]: marioroy, what does MCE stand for in this instance? There are 3 pages of abbreviations to go through.
[Lady_Aleena]: ^ or Discipulus...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-05-29 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?