top | item 41841884

(no title)

CleverLikeAnOx | 1 year ago

An old timer I worked with during my first internship called these kinds of issues "the law of coincidental failures" and I took it to heart.

I try a lot of obvious things when debugging to ascertain the truth. Like, does undoing my entire change fix the bug?

discuss

order

EasyMark|1 year ago

When something absolutely doesn’t make sense to me I often go back to a point in time and do a checkout of when I was 100% sure “it worked” and if it doesn’t then I assume something external changed, hardware, backend service, the earth’s wobble. If it does work then I will bisect the timeline until I Iocate it. This works for me 99% of the time on tough bugs that just defy any logic. It’s kind of known quantity as opposed to going through endless logs, blames, file diffs, etc. I know in some cases it isn’t really possible but in code that you can have a fairly quick turn around on build/install/test, it works really well.

K0balt|1 year ago

Yeah, good times. I just recently had one that was a really strong misdirection, ended up being 2 simultaneous other, non related things that conspired to make it look convincingly like my code was not doing what it was supposed to. I even wrote tests to see if I had found a corner-case compiler bug or some broken library code. I was half way through opening an issue on the library when the real culprit became apparent. It was actually a subtle bug in the testing setup combined with me errantly defining a hardware interface on an ancient protocol as an HREG instead of an IREG, which just so happened to work fine until it created a callback loop inside the library through some kind of stack smashing or wayward pointer. I was really starting to doubt my sanity on this one.

foobarian|1 year ago

> corner-case compiler bug

They say never to blame the compiler, and indeed it's pretty much never the compiler. But DNS on the other hand... :-)

throwup238|1 year ago

The joys of modbus PLCs, I take it?

m463|1 year ago

I wonder if there is a law of coincidental succeeses too. (if you're an old timer, you might call this some sort of Mr. Magoo law, or maybe "it seems to work for me")

taneq|1 year ago

This is the root of 'pigeon religions'. Someone sees a string of events and infers a causal link between them and an outcome. Confirmation bias kicks in and they notice when this string of events occurs again, which is made more likely by the fact that the events in the string are largely the person's own actions which they believe the events will produce the desired outcome. They tell their friends and soon a whole group of people believe that doing those things is necessary to produce that outcome.

That's how you get things like equipment operators insisting that you have to adjust the seat before the boot will open.