Reply to post: A little different...

Ooh, my machine is SO much faster than yours... Oh, wait, that might be a bit of a problem...

big_D Silver badge

A little different...

I came to work on a project, where the system was written in MS BASIC for CP/M (HP 125) and for MS-DOS (HP 150) and PC-DOS (IBM PC). The problem was, it was written by FORTRAN programmers and had been maintained for 5 years by COBOL programmers.

I think I was the first person on the project who even read the programmer's manual for MS BASIC. It didn't use For...Next loops or While...Wend, but only

10 A = 1

20 ...

30 A = A+1 : IF A < 20 THEN GO TO 10

Trawling though the several thousand lines of code, "repairing" that alone speeded up the system.

Then there was the updating, it read in CSV files, validated them and encoded the data into an output file and sent it to HQ (it was a data capture front-end for the financial reporting system). The program I worked on first used to take 4 hours to generate the output textfile, before sending to HQ.

Testing it was a pain, so I went through the code again. The name of every single data-set that was being updated (several thousand) was displayed on the screen. I put a simple check in there that just put out every 100th dataset name. It dropped the processing time from 4 hours to 20 minutes!

I got a 100% raise out of that little fix!

The real nightmare of the system was that it was full of commented out code, which made the system even more unreadable. I thought I'd be clever and delete the commented out code, only for the hole thing to collapse in a heap... It was using computed gotos and jumping into the middle of a block of commented out code! Oh well, you can't have everything.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019