Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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:

GOTO FATAL-OUT

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.


Comment on Re: The joys of bad code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2014-10-20 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (74 votes), past polls