Go Down

Topic: Debugging - a dark art? (Read 2 times) previous topic - next topic

robtillaart

imho Debugging is the art - science? - of finding the errors in code (and/or hardware), the analysis of why the application is behaving other than expected / intended. The rest is fixing. Debugging and fixing is not always done by the same person. I see in complex cases you have pair/group debugging and single person fixing quite often.

I recognize the 5 stages billroy mentions, but there are more:
- stage 0: Unaware (ignorant?)  and
..
- stage 6: the ability to recognize and     // after coding
- stage 7: the ability to prevent and      // while coding
- stage 8: the ability to predict.          // before coding

example of 8: I know that I make mistakes with complex boolean expressions, so I can predict that there will be (big chance) bugs in it
maybe 7 and 8 should be swapped?

Probably there will be a few more (sub)stages but I'm no shrink ;)

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

cr0sh

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

GoForSmoke


Quote
if you come home and flip the light switch and nothing happens, you debug a bit before you call an electrician. Bulb Ok? Power out? fuse/breaker flipped?


You left the important part out, wildbill: flick the switch off and on a bunch of times in the hope that the result will differ one time and the light will start working. What a colleague of mine used to call POPO.... power off, power on.


Because there just might be an oxide buildup on the contacts....
I've actually done the same basic thing shoving connectors (sometimes on boards) in and out and gotten $#!+ to work.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

GoForSmoke

BTW, what's this Dark Art business? Is sacrificing components while chanting "Murphy, Murphy!" and "Go for smoke!" 'Dark'?

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Graynomad

#9
Apr 15, 2013, 05:48 pm Last Edit: Apr 15, 2013, 05:57 pm by Graynomad Reason: 1
"bugging"

So THAT's what I do, good to finally put a name to it. :)

I was in a truckstop the other day, there was a truck there that wouldn't start, I spoke to the driver and he was distraught because he needed to get into the city for whatever. It was clearly an electrical problem so I asked if he'd checked the fuses. No he hadn't and he was waiting for a $X00 callout from a mechanic who couldn't get there for a few hours.

WTF? 

"Learned helplessness" indeed.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up