My Most Hilarious Coding Failure
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error handling? What error handling?

matt
Active Contributor

Many many years ago, in the days of steam powered computing, when we had to beat zeros into ones on an anvil before we could start development - back when programmers were real programmers...

Well, maybe not that long ago. Early 1990s. 

I was a VM (mainframe) systems programmer. There was an application called System-W - essentially a multi-dimensional spreadsheet with associated analytics, used extensively by the Finance Department. All the data was held in a single very large file. One of my tasks was to optimise disk space, and to this end, every now and then, I'd use the provided utilities to compress the data.

Wouldn't it be a good idea if I wrote a script to automate this process? I thought to myself. I could then schedule it run, e.g. every Friday evening.

The script looked something like this:

COMPRESS data TO tmpdata
DELETE data
MOVE tmpdata TO data

I tested it in the test system. It worked nicely, so I moved it to production and scheduled the job. This was Friday. The following Monday I was scheduled to work on secondment on a project for 3 weeks in different office, some 200 miles away.

Good job really, since, Monday morning the Finance Department were very unhappy with me. Apparently, something had gone wrong and their data had completely disappeared! Of course, in retrospect (possibly you've already spotted it) it was obvious. The COMPRESS had failed. So no tmpdata file was created and the original data was deleted. It had to be recovered from the back up. At least I'd had the sense to schedule the job after the backups were complete.

My boss was very good about it, though I was good-naturedly teased for a few months. And a year later, after I'd learned the value of checking return codes, and I'd successfully handled the integration of System-W (now running on DEC) with the office system All-In-One, the Finance Department finally forgave me.

Comments
matt
Active Contributor

While we're in the confessional...

As a student, we were learning to write compilers in C (This was before C++. Yes. I am that old), on Sun workstations. They were networked together and we discovered that we could log on to another workstation without any further credential checks. Mostly, we were using command lines. We'd type something in, it would execute on the other computer, and the results would come to ours.

Then we discovered that any commands that produced graphical output turned up on the suborned workstation, not ours. This enabled jolly japes like flashing up a password screen on some unsuspecting student and thereby gain access to all their files.

We also discovered how to mirror text output, so anything the remote system typed appeared on both our screens, likewise anything we typed. I recall we had some poor sap (not SAP) convinced that he was playing a (text based) adventure game...

I had a little program that bounced a ball across the screen. I'd run it every now and then on someone else's workstation and watch them jump. Then I thought it would be fun to do it on every workstation on the network, to cries of "oh come on, we're trying to work here".

Then I though how about if every bounce spawns two balls that bounce. On every workstation.

Oops. And I'm not talking about a programming paradigm.

I was young and foolish and was never caught. I never did it again - even being old and foolish.