Click here to Skip to main content
15,891,375 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Obscure paths to serious bugs Pin
englebart10-Aug-21 14:10
professionalenglebart10-Aug-21 14:10 
GeneralRe: Obscure paths to serious bugs Pin
Ron Anders10-Aug-21 15:22
Ron Anders10-Aug-21 15:22 
GeneralRe: Obscure paths to serious bugs Pin
Duncan Edwards Jones10-Aug-21 22:31
professionalDuncan Edwards Jones10-Aug-21 22:31 
GeneralRe: Obscure paths to serious bugs Pin
Member 916705710-Aug-21 23:14
Member 916705710-Aug-21 23:14 
GeneralRe: Obscure paths to serious bugs Pin
Slow Eddie11-Aug-21 2:04
professionalSlow Eddie11-Aug-21 2:04 
GeneralRe: Obscure paths to serious bugs Pin
Ed Attfield11-Aug-21 3:06
Ed Attfield11-Aug-21 3:06 
GeneralRe: Obscure paths to serious bugs Pin
MarkTJohnson11-Aug-21 2:40
professionalMarkTJohnson11-Aug-21 2:40 
GeneralRe: Obscure paths to serious bugs Pin
Rich Shealer11-Aug-21 3:06
Rich Shealer11-Aug-21 3:06 
In 1983 I wrote a program for a local weekly magazine that tracked the number of issue sales by each sales location. It would calculate how many of that week's issue each store would get based on recent returns and other history.

The computer was a Canon AS-100 an 8088 that ran CP/M-86. No hard drive, just two 8" floppies. This was either before I knew of dBase II or it wasn't available on this non IBM compatible PC. I wrote the program in a decent dialect of BASIC.

My first issue was that the file copy program (PIP) had a problem copying a large files. It would corrupt the destination file by recopying an earlier section of the file instead of getting fresh data.

The working data file got damaged and it turned out that all their backups were corrupted by PIP.

The work around was to use CopyDisk for a full disk copy until it was patched.

I spent an entire weekend reentering their data so we didn't loose the customer.

The other problem was my own. I wrote database routines, without formal training, in BASIC, that had an obscure error. The customer index would get corrupted, but it took awhile for the corruption to become evident. Eventually a customer entry would not be found.

The fix was to re-index the file. But being a dumb rookie, it took about 12 hours each time. I wrote it with individual floppy disk accesses for each record. Probably using sieve sort. Still didn't find the corruption bug.

To shorten the time, I later split the job so I read from one disk and wrote to a second. This took the time down to about 10 hours. The index corruption bug was still hiding.

In our office we got a machine with a 10 MB hard drive. By this time the PIP issue was fixed and I would take a copy of the corrupted data, copy it to the hard disk and run the disk intensive re-index. Now it only took 2 hours. But I still hadn't found the bug.

Then I got the bright idea of loading all of the key index related fields into a large array in memory.
I rewrote the utility to reindex against every thing in RAM. So much faster, it only took about 20 minutes I think. Had I been more experienced, I would have done this method first rather than beating on the disk IO.

The magazine was sold to a larger publisher and eventually they were going to put the data onto their IBM S/36 or some such. I had to travel farther and no longer had an office key. I still remember sitting in their office on a Saturday morning going over my code one more time and finding the errant comparison that was rarely called. The index never crashed again, and they retired the system about 6 months later.

It was painful, but I learned an awful lot over those 2 years.
GeneralRe: Obscure paths to serious bugs Pin
davecasdf11-Aug-21 3:06
davecasdf11-Aug-21 3:06 
GeneralRe: Obscure paths to serious bugs Pin
obermd11-Aug-21 3:20
obermd11-Aug-21 3:20 
GeneralRe: Obscure paths to serious bugs Pin
MarkTJohnson11-Aug-21 4:37
professionalMarkTJohnson11-Aug-21 4:37 
GeneralRe: Obscure paths to serious bugs Pin
Matthew Dennis11-Aug-21 7:07
sysadminMatthew Dennis11-Aug-21 7:07 
GeneralThought of the Day Pin
OriginalGriff10-Aug-21 4:30
mveOriginalGriff10-Aug-21 4:30 
GeneralRe: Thought of the Day Pin
obermd10-Aug-21 4:33
obermd10-Aug-21 4:33 
GeneralRe: Thought of the Day Pin
AndyChisholm11-Aug-21 5:16
AndyChisholm11-Aug-21 5:16 
GeneralRe: Thought of the Day Pin
Mike Hankey10-Aug-21 4:40
mveMike Hankey10-Aug-21 4:40 
GeneralRe: Thought of the Day Pin
Cp-Coder10-Aug-21 6:12
Cp-Coder10-Aug-21 6:12 
GeneralRe: Thought of the Day Pin
Mike Hankey10-Aug-21 6:18
mveMike Hankey10-Aug-21 6:18 
GeneralRe: Thought of the Day Pin
W Balboos, GHB10-Aug-21 7:59
W Balboos, GHB10-Aug-21 7:59 
GeneralRe: Thought of the Day Pin
Cp-Coder10-Aug-21 13:53
Cp-Coder10-Aug-21 13:53 
GeneralRe: Thought of the Day Pin
W Balboos, GHB10-Aug-21 5:17
W Balboos, GHB10-Aug-21 5:17 
GeneralRe: Thought of the Day Pin
Richard Andrew x6410-Aug-21 10:20
professionalRichard Andrew x6410-Aug-21 10:20 
GeneralRe: Thought of the Day Pin
MKJCP11-Aug-21 1:37
MKJCP11-Aug-21 1:37 
GeneralRe: Thought of the Day Pin
Slow Eddie11-Aug-21 2:08
professionalSlow Eddie11-Aug-21 2:08 
GeneralDid you know... PinPopular
Mike Hankey10-Aug-21 3:08
mveMike Hankey10-Aug-21 3:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.