in reply to Best way to fix a broken but functional program?

Well, The Elements of Programming Style by Kernighan and Plaugher says, "Don't patch bad code -- rewrite it". Pretty good advice. A month of patching vs rewriting may or may not be a simple choice, but it may be the one you have to make.

If you decide to attack it as it is, perhaps the best thing to do is to first break it into "chunks" whether these are functions, loops, blocks of declarations or whatver, so you can begin to tackle the program. Without seeing this disaster it's hard to discern the best method of chunking.

HTH, --traveler

  • Comment on Re: Best way to fix a broken but functional program?