News for hackers. Stuff that matters.
Re:Never trust a system that seems to be working by csours on Monday October 17, 2022 @11:24AM (#33234815)
If your code has side effects, it only ever seems to be working.

----

> the newbie says "aww, why isn't it working?"

> the intermediate says "yay, it's working!"

> the expert goes "hmm, why is it working?"

I've also seen this as

My thing isn't working and I change X and now I get error J instead of error K, so now I have to change X back because it's still not working.

Where K is a "better" error than J, such as K = failed to connect and J is Server 500 error. With J you are at least talking to a webserver.

Re:Never trust a system that seems to be working by bee_rider on Monday October 17, 2022 @12:05PM (#33235518)
Working with beginning programming students, "Yay, now we have an error message that makes sense" has become my catchphrase.
Re:Never trust a system that seems to be working by csours on Monday October 17, 2022 @12:07PM (#33235559)
"Read the error message, no wait don't close that go back" when helping people is a definite feeling.

Take a deep breath. Take off your headset. Go outside. Never look at a computer again. Start driving a bulldozer. Life is good.

Re:Never trust a system that seems to be working by macintux on Monday October 17, 2022 @12:46PM (#33236166)
I’ve lamented here before, but the number of technical people who absolutely freeze up at the sight of an error message is daunting. Being able to interpret errors correctly is a huge step up in this industry; to me it feels like table stakes, but clearly isn’t.
Re:Never trust a system that seems to be working by JoshTriplett on Monday October 17, 2022 @12:57PM (#33236374)
> I’ve lamented here before, but the number of technical people who absolutely freeze up at the sight of an error message is daunting.

"freeze" is still a much better reaction than "quickly dismiss without paying attention". I can understand "freeze"; it's possible to learn and train from there to "good, well done, now read everything and think". I do not understand "quickly dismiss without reading and paying attention".

(I know about the studies for "people dismiss something that isn't getting them their goal", but I still don't understand the mindset that can dismiss something like that even when theoretically trying to figure something out.)

Re:Never trust a system that seems to be working by atomicnumber3 on Monday October 17, 2022 @02:02PM (#33237420)
Part of the problem is that we've trained everyone, especially nontechnical people, to ignore and dismiss stuff.

You're using a program. A thingy pops up or unexpectedly shows up that interrupts you.

80% chance it's some stupid ad or newsletter thing. Dismiss with prejudice.

19% chance it's a "oopsie poopsie we did and whoopsie, the server monkeys are working VERY HARD to fix this, sowwy!!" and then the app still works apparently just fine, or if it doesn't you just force close and re-open the app.

1% of the time it's an ad again.

In the remaining floating point error's worth of %, it's an actual actionable thing a user could action to fix the issue.

I don't really blame people for just predicting that a pop up will be useless because it probably will be.

Re:Never trust a system that seems to be working by Akronymus on Tuesday October 18, 2022 @04:57AM (#33244683)
Usually error messages are somewhat nice, What I have problems with at work is "error 395" and such. Where the documentation for the error codes can't be found easily.

(I hate progress openedge)

Re:Never trust a system that seems to be working by alexchamberlain on Monday October 17, 2022 @03:20PM (#33238301)
It's amazing the number of junior engineers I've taught to simply read the error message properly.
Re:Never trust a system that seems to be working by antifa on Tuesday October 18, 2022 @08:39AM (#33246264)
Or a junior dev will see "Error 422: thing_id is required" and instead of updating the request they sent to include thing_id they'll report it as if it's a 500 Internal Server Error until you pick up the ticket and read the error message to them.

Of course, they didn't actually put the error message in the ticket, they'll write "backend crashed" and put a screenshot of the front-end crashing because they didn't do any error handling at all.

Re:Never trust a system that seems to be working by physicles on Tuesday October 18, 2022 @12:41AM (#33243051)
Or its close cousin: "Yay, now we have a different error message!" When something is totally broken and you have no idea why, this is a promising signpost.
Re:Never trust a system that seems to be working by SilasX on Monday October 17, 2022 @01:16PM (#33236697)
Similarly, the joke that the engineer’s second worst nightmare is, “it doesn’t work but it should”, while their worst nightmare is, “it works but it shouldn’t”.
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.
Re:Never trust a system that seems to be working by csours on Monday October 17, 2022 @03:31PM (#33238420)
I used to do industrial tech support and this gives me the raging anxieties.
Re:Never trust a system that seems to be working by beckingz on Monday October 17, 2022 @06:14PM (#33240201)
I have an exceptional ability to fix things: often I can fix things before determining why they are not working.

This is immensely frustrating because I like to understand mechanical and electrical devices and take pride in my craft, so if I fix something too easily I don't trust that the fix will hold without a mental model of the thing.

Re:Never trust a system that seems to be working by hinkley on Monday October 17, 2022 @03:21PM (#33238304)
No news is bad news.

I don’t like code that compiles cleanly or runs cleanly on the first try. The worst is when I know that code isn’t close to done yet. Without errors my list of actionable tasks is low. I know there are a certain number of problems, and if I can’t see any it’s because they’re invisible, not because I don’t have any.

Re:Never trust a system that seems to be working by Taywee on Monday October 17, 2022 @05:18PM (#33239621)
I came here to say this exactly. There's nothing more stressful to me than when a lot of freshly-written C++ compiles without error or warning on the first try, and then seems to run without issues. I get the distinct feeling that there is a problem that I'm just not seeing yet.
Re:Never trust a system that seems to be working by xani_ on Monday October 17, 2022 @05:18PM (#33239632)
Eh, that heavily depends on language. Some have better tooling to get most of the typical errors out before the compile.

That being said I'm always suspicious and start to fiddle with them if I see test + code pass on first time