Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: The joys of bad code

by McMahon (Chaplain)
on Oct 26, 2004 at 14:54 UTC ( #402620=note: print w/ replies, xml ) Need Help??

in reply to The joys of bad code

At my last job, I was asked to build an automated test harness for a large COBOL system. They wanted me to begin with a particular part of the system.

So I cranked up the debugger with the intention of discovering and building tests for the error conditions the program was capable of generating.

In the code I discovered over 100 instances of this:


FATAL-OUT was a subroutine that shut down the process with no error messages, no stack dump, no evidence at all that the program had encountered a problem. Then the OS would restart the process automatically.

Apparently some years back this program had routinely overflowed log files and caused performance problems by the sheer number of errors it generated. So the developers simply stopped it from generating errors.

Problem solved!

I didn't work there very long. But I did succeed in building a very nice user-driven system-level automated test harness for a *different* part of the system.

Replies are listed 'Best First'.
Re^2: The joys of bad code
by Jaap (Curate) on Oct 26, 2004 at 15:55 UTC
    Ouch that sound familiar. My colleague used to write shell scripts to repeatedly invoke perl scripts that died frequently. When i debugged the perl script (strict and warnigs help ;-) and it would finish the job, he still would't run it directly because he just didn't trust it. *sigh*

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-07-24 08:45 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (221 votes). Check out past polls.