Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: 6 scripts or one?

by BrowserUk (Pope)
on May 17, 2003 at 01:10 UTC ( #258815=note: print w/ replies, xml ) Need Help??


in reply to 6 scripts or one?

The only addition I'd make to what Abigail said is don't change anything until you have to. If, when a change is required, and it affect 2 or more of the scripts, then factor the peice(s) of common code that had to be changed anyway into a module and call it from there.

In other words, only factor stuff that needed changing anyway. If you do it before it needs to be done, a) you will have to modify it again when the needed change comes along; b) you will probably factor stuff that never changes and risk breaking working code; c) worst of all, you will factor stuff now based on the current state of play, that will later need to be changed, but you'll refactor it in such a way that it will complicate rather than simplifying the future requirements.

If it ain't broke don't fix it till it is. When it is broke, try to fix it in a way that makes it easier to fix next time it breaks.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Comment on Re: 6 scripts or one?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://258815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-08-30 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls