News for hackers. Stuff that matters.
Re:Never trust a system that seems to be working by hinkley on Monday October 17, 2022 @03:22PM (#33238321)
That’s the surest way to nerd snipe some people. This code doesn’t work, and yet it does. After reading the commit history, it in fact never worked, and yet it has been up until yesterday. What in the actual fuck.
Re:Never trust a system that seems to be working by xani_ on Monday October 17, 2022 @05:28PM (#33239754)
The buggy behaviour of A caused buggy behaviour of B that caused buggy behaviour of C, just so happened to align enough to "look like it is working".

Double fuckup if the thing is backups and your data is gone. Reason why we check not only "does the backup job finished" but also "does the size looks right", because backup with 0 files still returns OK...

Re:Never trust a system that seems to be working by SilasX on Monday October 17, 2022 @05:42PM (#33239891)
Haha yeah, been there. I forget all the details, sadly, but there was some long-present bug with how the frontend architecture word in the dev environment that would keep the changes from being propagated. But every member of the team had set up a workaround so that, on their machine, it would load the correct assets some other, undocumented way, so they wouldn't notice the bug.
Re:Never trust a system that seems to be working by aidenn0 on Monday October 17, 2022 @07:38PM (#33241039)
My favorite was C code that was roughly (all functions and variables h:

  int bar;
  
  ...
  foo()
  {
    if(bar) {
      doX();
    else
      doY();
    }
  }
Note that uninitialized globals in C are implicitly zero-initialized.

doY() had been broken for years but nobody ever set bar to be true; doX() was nevertheless being called. Setting bar to zero caused the buggy doY() to happen. Setting bar to one seemed to work, but would occasionally segfault.

Then someone explicitly initialized bar and got a linker error. Turns out in ye olden days of C, before "extern" was a thing there was a feature where variables that were initialized in no more than one compilation unit would be all coalesced by the linker. Before doY was broken, someone defined a function named bar, which then caused bar to have a non-zero (i.e. true) value. Someone later added some broken feature to "doY" and it passed all the tests because changing doY() didn't have any effect.

Re:Never trust a system that seems to be working by blep_ on Monday October 17, 2022 @08:07PM (#33241313)
You're missing the } and { around your else, btw. I'm only mentioning that because I immediately saw it and got ready to read a horrifying story involving the text "#define else".
Re:Never trust a system that seems to be working by aidenn0 on Monday October 17, 2022 @11:58PM (#33242804)
oh gosh I am.
Re:Never trust a system that seems to be working by hinkley on Tuesday October 18, 2022 @12:43AM (#33243060)
I thought that was the bug on my first read. Naming collisions suck.