Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Suspending Disbelief While Debugging

by adrianh (Chancellor)
on Dec 09, 2002 at 16:41 UTC ( [id://218582]=note: print w/replies, xml ) Need Help??


in reply to Suspending Disbelief While Debugging

Many years ago a friend of mine was working on a mocked up ATM type system that ran over a serial line. This included some self-tests to make sure that the line was up and running okay.

When writing the self-test code he kept hitting this problem where the working test line was being diagnosed as failing. Spent most of a day going over the assembler code in question. We got to the stage where we were questioning the serial driver hardware in the machines and were looking around for spares.

Very late that day we finally thought to check that the test lead was actually working... You should have heard the howls when we realised we'd wasted most of a day on some dodgy wiring.

I still look back at that and wonder at our complete inability to accept that a few hundred bytes of obvious code was working properly. We knew that it must be a bug :-)

It proved a salutary lesson for me. Always try and disable your assumptions when debugging and look at what is actually happening.

Replies are listed 'Best First'.
Re: Re: Suspending Disbelief While Debugging
by pfaut (Priest) on Dec 09, 2002 at 17:01 UTC

    One of my biggest problems when it comes to debugging is not checking the simplest things first assuming they must be working. The problem must be in the code I just changed. I'll have something half torn apart before realizing an external switch is in the wrong position...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://218582]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found