3 ms·
I’ve come across (possibly written) code that upon close examination seems to only work accidentally — that there are real failures which are somehow hidden by
by JackFr 2y ago
I’ve come across (possibly written) code that upon close examination seems to only work accidentally — that there are real failures which are somehow hidden by behavior of other systems.
The classic and oft heard “How did this ever work?”
- JohnMakin 2y agoI think this stuff is really funny when I find it and I have a whole list of funniest bugs like this I have found. Particularly when I get into dealing with proxies and reponse/error handling between backend systems and frontend clients - sometimes the middle layer has been silently handling errors forever, in a way no one understood, or the client code has adapted to them in a way where fixing it will break things badly - big systems naturally evolve in this way and can take a long time to ever come to a head. When it does, that’s when I try to provide consulting, lol.
- QuercusMax 2y agoIn at least a few cases I can think of, the answer was almost definitely "it actually never did work, we just didn't notice how it was broken in this case".
- macintux 2y agoMany years ago I was grading my students’ C programs when I found a program that worked without global variables or passing parameters. Instead, every function had the same variables declared in the same order.