The best advice I’ve ever received has come from people telling me their horror stories. Many a time when stuck on a problem, I'd reflect on some similar problem I had been told about, and it would lead to a solution.
One time, just before I left for a customer's site across the country to install some software I had written, my manager told me of an instance when a hardware engineer had addressed all the interface cards to the same location.
When I got to the job site, my program was working, but every once in a while the system would mysteriously crash. I had to fix the software without the benefit of having a computer that ran the OS. Nor did I have access to the hardware itself. Since I only had the spec sheets, I wrote the program very conservatively, and since it was interrupt driven, I didn't know how long between receiving and processing the interrupt that the background process would get control to deal with the data. So I placed everything in ring buffers.
After the program crashed again, I checked the buffers and found status values that should not have been there. Remembering the problem my manager told me about, I chased down the hardware engineer and had him check the interface board addresses. They had several modems in addition to the serial interface I was talking to. It turned out that one of the modems had the same address. When I'd query the hardware, more often than not, a modem would respond instead of the serial interface.
That’s what was causing the crash. Eventually an interrupt would be missed and the system would hang while waiting for a return that would never come.
I doubt that it would have occurred to me to have the addresses checked if my manager hadn't just mentioned -- out of the blue -- a similar problem he had solved.
This entry was submitted by Curt Rostenbach and edited by Rob Spiegel.
Curt Rostenbach has been programming since he was in high school in the early 70s. His career spans games, databases, industrial controls, and financial programming. He wrote the Biorhythm cartridge for the Bally Home Arcade (Astrocade) in the 80s. His favorite job was programming computer-controlled conveyors in the late 80s.
Tell us your experience in solving a knotty engineering problem. Send stories to Rob Spiegel for Sherlock Ohms.