Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://114423]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2018-05-23 10:00 GMT
Find Nodes?
    Voting Booth?