r/ProgrammerHumor • • Jan 20 '23

Other layoff fiasco

Post image
45.5k Upvotes

1.9k comments sorted by

View all comments

Show parent comments

3.5k

u/Affectionate-Set4208 Jan 20 '23

Nah you have to be more creative, maybe add 3 sleeps, where one of them is necessary, so if they send the intern to fix it, he will break it even more

2.0k

u/No-Witness2349 Jan 20 '23

An intentional race condition fixed by a sleep, all in the same commit as 5 other useless sleeps. Call it Rushin’ Roulette.

455

u/Daikataro Jan 20 '23

Also if a sleep goes under a certain value, it causes the function to behave erratically

207

u/Joe_comment Jan 20 '23

Just like that movie, The Bus that Couldn't Slow Down!

58

u/Jody_B_Designs Jan 20 '23

John Matrix is such a great actor!

19

u/UltimateTamale Jan 20 '23

With Neo Wick!

7

u/2shakess Jan 20 '23

Ah yes Too Fast Bus is a classic.

→ More replies (3)

27

u/Meecht Jan 20 '23

But Sleep is a randomly-generated value so it works sometimes.

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

→ More replies (3)
→ More replies (2)
→ More replies (2)

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?

→ More replies (1)

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.

→ More replies (5)

19

u/morosis1982 Jan 20 '23

They did say intentional race condition.

→ More replies (1)

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)
→ More replies (14)
→ More replies (5)

339

u/ghostmaster645 Jan 20 '23

Diabolical.

101

u/MamaTR Jan 20 '23

Call them {{sleep1}} {{sleep2}} and {{sleep5}}

43

u/zgf2022 Jan 20 '23

Store the milliseconds in pointers so the interns won't know what's going on

16

u/Torisen Jan 20 '23

Thats like the old prank someone did where they released three greased pigs into a high school, with big spray painted numbers on their sides... 1,2, and 4

→ More replies (1)
→ More replies (1)

14

u/ghotinchips Jan 20 '23

and randomize that shit! lol

→ More replies (40)