Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://258815]
[Eily]: yup, he's part of a secret agent team or something like that
[Your Mother]: Haven't seen it, but let me guess. There is a woman and a minority agent and no Germans? Close? :P
[Eily]: you're good :P
[Eily]: except if you count their boss, which is both a woman and from a minority
[LanX]: na, they go easy on germans since they discovered the German TV market
[Your Mother]: Zeitgeist. :P
[LanX]: Talking about Peacemakers, I still need to watch 2 seasons of Farscape ...
[Your Mother]: I liked that show a lot.
[Your Mother]: Packed with minority women.
[LanX]: pitty they burned the actors in Stargate

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2018-03-19 14:41 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.