Click here to Skip to main content
15,508,644 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 15:10
professionalenglebart10-Aug-21 15:10 
GeneralRe: Obscure paths to serious bugs Pin
Ron Anders10-Aug-21 16:22
Ron Anders10-Aug-21 16:22 
GeneralRe: Obscure paths to serious bugs Pin
Duncan Edwards Jones10-Aug-21 23:31
professionalDuncan Edwards Jones10-Aug-21 23:31 
GeneralRe: Obscure paths to serious bugs Pin
Member 916705711-Aug-21 0:14
Member 916705711-Aug-21 0:14 
GeneralRe: Obscure paths to serious bugs Pin
Slow Eddie11-Aug-21 3:04
professionalSlow Eddie11-Aug-21 3:04 
GeneralRe: Obscure paths to serious bugs Pin
Ed Attfield11-Aug-21 4:06
Ed Attfield11-Aug-21 4:06 
GeneralRe: Obscure paths to serious bugs Pin
MarkTJohnson11-Aug-21 3:40
professionalMarkTJohnson11-Aug-21 3:40 
GeneralRe: Obscure paths to serious bugs Pin
Rich Shealer11-Aug-21 4:06
Rich Shealer11-Aug-21 4: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 4:06
davecasdf11-Aug-21 4:06 
GeneralRe: Obscure paths to serious bugs Pin
obermd11-Aug-21 4:20
obermd11-Aug-21 4:20 
GeneralRe: Obscure paths to serious bugs Pin
MarkTJohnson11-Aug-21 5:37
professionalMarkTJohnson11-Aug-21 5:37 
GeneralRe: Obscure paths to serious bugs Pin
Matthew Dennis11-Aug-21 8:07
sysadminMatthew Dennis11-Aug-21 8:07 
GeneralThought of the Day Pin
OriginalGriff10-Aug-21 5:30
mveOriginalGriff10-Aug-21 5:30 
GeneralRe: Thought of the Day Pin
obermd10-Aug-21 5:33
obermd10-Aug-21 5:33 
GeneralRe: Thought of the Day Pin
AndyChisholm11-Aug-21 6:16
AndyChisholm11-Aug-21 6:16 
GeneralRe: Thought of the Day Pin
Mike Hankey10-Aug-21 5:40
professionalMike Hankey10-Aug-21 5:40 
GeneralRe: Thought of the Day Pin
Cp-Coder10-Aug-21 7:12
Cp-Coder10-Aug-21 7:12 
GeneralRe: Thought of the Day Pin
Mike Hankey10-Aug-21 7:18
professionalMike Hankey10-Aug-21 7:18 
GeneralRe: Thought of the Day Pin
W Balboos, GHB10-Aug-21 8:59
mveW Balboos, GHB10-Aug-21 8:59 
GeneralRe: Thought of the Day Pin
Cp-Coder10-Aug-21 14:53
Cp-Coder10-Aug-21 14:53 
GeneralRe: Thought of the Day Pin
W Balboos, GHB10-Aug-21 6:17
mveW Balboos, GHB10-Aug-21 6:17 
GeneralRe: Thought of the Day Pin
Richard Andrew x6410-Aug-21 11:20
professionalRichard Andrew x6410-Aug-21 11:20 
GeneralRe: Thought of the Day Pin
MKJCP11-Aug-21 2:37
MKJCP11-Aug-21 2:37 
GeneralRe: Thought of the Day Pin
Slow Eddie11-Aug-21 3:08
professionalSlow Eddie11-Aug-21 3:08 
GeneralDid you know... Pin
Mike Hankey10-Aug-21 4:08
professionalMike Hankey10-Aug-21 4: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.


Straw Poll

An amazing AI programming tool is invented that can do one task perfectly. What would you choose?
  Results   141 votes