Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-02-17 19:56 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (249 votes). Check out past polls.