5 ms·
What's the word for this: * My code doesn't work and I can't find the bug even after over an hour * I add a few lines of <whatever code>. Now it works! * N
by khazhoux 2y ago
What's the word for this:
* My code doesn't work and I can't find the bug even after over an hour
* I add a few lines of <whatever code>. Now it works!
* Now, just for comparison, I remove all the code I just added (or, at least I think I reverted back to previous state). But now it still works.
???
- flerchin 2y agoChoose an editor with autosave to fix this one.
- recursive 2y agoNow you have two problems.
- woranl 2y agoI get that a lot, just have to restart that Docker desktop to push the saved changes to volume.
- deleted 2y ago[deleted]
- oneshtein 2y agoClock skew? Makefile (or a similar build system which uses timestamps) + a problem with wall clock -> stale files.
- nope1000 2y agoOnce I added a comment and my bug went away. That was when I went home for the day.
- maicro 2y agoThat could probably be called a Heisenbug[0]: A bug that disappears or alters its behavior when one attempts to probe or isolate it. Though it depends on the cause - as others in this comment chain said, if it's just that the file isn't actually being updated between tests, but adding a new line forces an update/recompile/etc., I'm not sure what you'd call it. [0] http://www.catb.org/~esr/jargon/html/H/heisenbug.html http://www.catb.org/~esr/jargon/html/H/heisenbug.html
- colkassad 2y agoDevOps
- marcosdumay 2y agoThere's the alternative: * The program works flawlessly * Somebody finds a bug on the code that is executed in a test * The relevant test now fails consistently Both are probably because you changed something on the environment when you looked at the code.
- omoikane 2y agoAnother common cause is that the code you were looking at wasn't actually the code you were running. Between "I added this line and then I removed this same line, and now it works", the executable might have been recompiled.
- bobthepanda 2y agohot reloading can cause weird behaviors like this in particular
- rozenmd 2y agocache?