Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Understanding *IS* Better

by chromatic (Archbishop)
on Sep 25, 2001 at 00:45 UTC ( #114423=note: print w/ replies, xml ) Need Help??


in reply to Reusing code is good; reinvention might be better

People who don't understand existing code are doomed to reimplement it badly.

I find it hard to believe any *working* code is bad enough that it can't be refactored. (Maybe Netscape 4. Maybe.) If the code has been maintained at all, it's had bugfixes and tweaks. Any reinvention will need much luck to avoid making the same mistakes.

I certainly wouldn't throw out anything longer than a day's work (say, 100 lines of Perl). If it's not an optimal solution for the specific case, generalize it enough that you can provide the choice for next time. If the code's not good enough for reuse, fix it so it is.

Otherwise, you'll probably run into many of the same traps as the first time.

(I'm not discouraging people from learning. I'm not discouraging alternate solutions. I'm just saying, throwing out working code and starting over from scratch is the last option in my book.)


Comment on Understanding *IS* Better

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-09-17 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (100 votes), past polls