Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Maintenance vs. Programming styleby sundialsvc4 (Abbot) |
on Jan 29, 2008 at 17:42 UTC ( [id://664933]=note: print w/replies, xml ) | Need Help?? |
If your task is to enhance-or-debug, then by all means limit yourself to that. But obviously during the process of doing that you must also make “triage decisions.” That is, “is this corpse worth saving?” Many things that stink are not dead, however. (In fact, quite a few things that I have written over the years acquired quite an ex post facto “smell” even to me.) You don't need to rewrite all that. Doing so won't necessarily make it any better at all. All of us have worked in, or with, shops that had “famously bad code.” It was this-or-that module which was so constantly broken that people became adept at – even proud of – nursing it along. And you just gotta make that “dead-horse decision,” pull the trigger next to Old Dobbin's head and replace the damm thing with what it should have been all along. Sometimes you determine that this is simply what you have to do, but it should not be something that you simply do as a matter of course. The code may stink, but it's bought-and-paid-for.
In Section
Meditations
|
|