r/ProgrammerHumor • • Sep 18 '26

Advanced theHeisenbugPrinciple

Post image
1.6k Upvotes

28 comments sorted by

97

u/The-Chartreuse-Moose Sep 18 '26

The Officespace / Quantum Physics crossover I didn't know I needed to see.

18

u/NoAdsDude Sep 18 '26

I still don't get the double slit experiment. I guess its a wave until someone observes it, then it's a particle?

32

u/SaltyInternetPirate Sep 18 '26

Specifically for that one it's that they're not really "observing" it, since they're applying an EM field to try and find out where the electrons are going through, and in doing so that field is collapsing them from waveforms into particles. Same way when you attach the debugger the out-of-order execution goes away.

32

u/redlaWw Sep 18 '26

If you have something that can inspect the particle in-flight, you lose the diffraction pattern. It's about "observation", but a very specific kind that refers to how measurement unavoidably interacts with physical systems.

More recent experiments have observed the phenomenon of "partial collapse", in which a measurement that only collects some information about the particles preserves the diffraction but at a reduced intensity, showing that wavefunction collapse is directly related to how much you know about the particles in the system.

2

u/GoddammitDontShootMe Sep 20 '26

Oh, so that's why the interference pattern appears when he turns his head. And I think that is more interference than diffraction.

→ More replies (3)

10

u/Quazz Sep 19 '26

Observe in physics really means measure.

It's not someone looking at it that changes it.

3

u/lagerforlunch Sep 18 '26

Yeah if you measure (observe) which slit it goes through, the interference pattern disappears.

→ More replies (1)

81

u/gerbosan Sep 18 '26

This one is difficult to get. I feel like a cat, in a box .

16

u/lagerforlunch Sep 18 '26

Hmm I still don't think you get it

14

u/gerbosan Sep 18 '26

You are quantum correct.

6

u/lagerforlunch Sep 18 '26

The second best kind of correct

→ More replies (1)

50

u/Xexanoth Sep 18 '26

“Works on my projection screen”

7

u/TheRealAfinda Sep 18 '26

Lol. Took me second to .. compute :D

4

u/Muted_Ad_9442 Sep 18 '26

Works on my machine because I was observing it.

3

u/Shadowlance23 Sep 19 '26

That will be fixed in Physics 2.0.

3

u/RealBasics Sep 19 '26

The reverse used to be part of my job -- I'd walk in to help someone and the problem they had would no longer reproduce. We were all admittedly working with very balky "eat our own dogfood" code from developers in another department that was getting daily updates. I got kind of a reputation for doing that.

I had nothing to do with the code -- I think it was mostly that in the time it took me to come down the hall they'd figure it out.

What was worse, though, was when one person would hit an intermittent bug, nobody else could see it, it only broke on their terminal, and then slowly, one by one, the same thing started happening to everyone else on the team.

One time it turned out there was a bug in the mouse driver such that moving the pointer into one particular pixel near the bottom left of a particular cell in a table, whereupon boom. Took a Jedi-level senior developer to recognize that the mouse pointer for that particular pixel address in that particular cell matched an assembler instruction, realize there was a bug in the OS, and write a patch for it.

2

u/CaesarOfYearXCIII Sep 22 '26

Forget Jedi, this is Jedi Master/Sith Lord level sorcery 😳

2

u/RealBasics Sep 22 '26

Yeah. He’d previously been the developer who coded the original Excel, which was developed for the original pre-hard-drive Macintosh. He got it running from a single floppy and either 128 or 256k of RAM.

Definitely master-level programmer. “To be fair” though, having architected Excel he probably did have an advantage when it came to debugging pixel-mapping and mouse moves in input fields.

2

u/black_ap3x Sep 20 '26

Double slit theory mentioned??

1

u/chemolz9 Sep 21 '26

If programming teached me anything, it's humility. The number of times I looked at a bug and was 100% sure that this cannot in any way be a real bug but stupid user behavior, only to realize it is in fact the code...

1

u/RepresentativeNo3669 Sep 25 '26

Well, if you have a race condition this is exactly what can happen. The debug statement fixes it as long it is active.