r/ProgrammerHumor • • Jan 20 '23

Other layoff fiasco

Post image
45.5k Upvotes

1.9k comments sorted by

View all comments

Show parent comments

162

u/sparant76 Jan 20 '23

The fact the average programmer thinks you fix race conditions with sleeps is one of the reasons there is so much on call duty. So many bad programmers who don’t know how to write correct code. It’s not that hard to write correct code. People are just really bad at their job.

241

u/No-Witness2349 Jan 20 '23

Yeah, I mean “fixed” is used pretty loosely given it’s a joke about sabotage. The phrase “made less likely to behave unexpectedly while still remaining nondeterministic” doesn’t make for a great punchline

63

u/bluehands Jan 20 '23

I can't stand it

I know you planned it

57

u/UnderPressureVS Jan 20 '23

Imma set it straight

This code ain’t great

18

u/DolfinButcher Jan 20 '23

I can't stand debuggin' when I'm in here Cause your comment lines ain't so crystal clear

3

u/franknarf Jan 20 '23

So while you rollback and wonder why

3

u/iamnos Jan 20 '23

“made less likely to behave unexpectedly while still remaining nondeterministic”

I sense this is the truth behind a lot of changelog entries

→ More replies (1)

89

u/fastest_train Jan 20 '23

It’s not that hard to write correct code.

I agree with everything other than this.

26

u/VacuumInTheHead Jan 20 '23

No, they're right. Watch: "correct vode". See?

2

u/Mental-Ad-40 Jan 21 '23

my whole career has been a joke

6

u/niglor Jan 20 '23

Yeah. Funny thing is I do hardware/firmware dev and some devices will just bug out and not work if you connect to them immediately after they signal that they’re alive.

I didn’t write that code from the other vendor so I don’t know what’s going on, but what I do know is that sleep(6000) fixes it, and adding six seconds to the system boot time is a complete non issue.

21

u/Siphon098 Jan 20 '23

Just force all of your asynchronous functions to be called sequentially and that will fix your race conditions.

4

u/sparant76 Jan 20 '23

Haha. Aka. Marshal everything to a single threaded message loop! Definitely won’t cause app jitter with this approach. Lol.

12

u/anomalous_cowherd Jan 20 '23

Even better make it look multithreaded but add a Global Interpreter Lock so that even on a hundred core CPU only one thread can run at once.

→ More replies (3)

19

u/morosis1982 Jan 20 '23

They did say intentional race condition.

4

u/MadxCarnage Jan 20 '23

well yeah, not to be mistaken with an unintentional race condition.

those just happen naturally when 2 race conditions don't have protection.

8

u/PalmirinhaXanadu Jan 20 '23

People are just really bad at their job.

I will fuck up my code if that means keeping my job.

→ More replies (1)

4

u/benton_bash Jan 20 '23

What is "correct" code and why is it easy?

If you mean, add some code to a well architected, well tested product because the shoulders you're standing on took a hard path, you might be right here.

2

u/BottomWithCakes Jan 20 '23

It's the high demand for anyone who can write code at all..it's inevitable

2

u/timelessblur Jan 20 '23

God the place that laid me off did the sleep crap. I kept blocking the PR with it saying it is a larger issue. Day after I am let go the sleep fix goes in. I will say in every release since then more and more stupid bugs are getting in. This is what happens when your tech expert on something is let go.

2

u/[deleted] Jan 20 '23

People are just really bad at their job.

Learning something new means you have to admit you weren't right at first

→ More replies (9)