http://www.perlmonks.org?node_id=11111294


in reply to Re^2: The worst excuse I have ever heard is:
in thread The worst excuse I have ever heard is:

what I thought was a single bug that was behaving differently depending on how close I was trying to observe it

This is known as a Heisenbug.

  • Comment on Re^3: The worst excuse I have ever heard is:

Replies are listed 'Best First'.
Re^4: The worst excuse I have ever heard is:
by Eily (Monsignor) on Jan 10, 2020 at 16:09 UTC

    That article says "Frustrated programmers may humorously blame a heisenbug on the phase of the moon" which goes back to the original bad excuse :P.

    The additional bug (the debugger bug, not the original one I was trying to analyze) was also an Heisenbug on its own because it would disappear when the instruction was moved (the compiler would add some padding in the data for every other position of the instruction). So as soon as I realized that I was dealing with two bugs instead of just one, and added a print statement to follow what was happening, the second bug disappeared :P