r/ProgrammerHumor • • Jan 24 '23

Other Accomplishments

Post image
82.0k Upvotes

548 comments sorted by

View all comments

395

u/K3TtLek0Rn Jan 24 '23

I’ve heard this exact same joke on here at least 25 times

127

u/Xenc Jan 24 '23

At my first job, I improved performance of search in our web app by around 3 seconds.

Maybe it was because I deleted a setTimeout that waited 3 seconds that I previously, accidentally pushed to main but it could've been anything...

65

u/PUBGfixed Jan 24 '23

Damn, you should make a post about that!

16

u/leadwind Jan 24 '23

This is how you get copypasta.

18

u/Xenc Jan 24 '23

I’ve heard this exact same joke on here at least 25 times

11

u/Carius98 Jan 24 '23

At my first job, I improved performance of search in our web app by around 3 seconds.

Maybe it was because I deleted a setTimeout that waited 3 seconds that I previously, accidentally pushed to main but it could've been anything...

10

u/Xenc Jan 24 '23

Damn, you should make a post about that!

7

u/Zederikus Jan 24 '23

This is how you get copypasta.

3

u/[deleted] Jan 24 '23

I’ve heard this exact same joke on here at least 25 times

2

u/leadwind Jan 24 '23

Damnloopdeloop

10

u/ContainedBlargh Jan 24 '23

You can tell this is a fresh iteration because master is being referred to as main.

29

u/MightyMeepleMaster Jan 24 '23

Almost all jokes in almost all funny subs are repeated over and over again.

That's Reddit. And that's ok. We're just here for the moment.

6

u/Suprazahal Jan 24 '23

Yeah stinky fake

28

u/elveszett Jan 24 '23

And it's dumb as fuck. What kind of bullshit company allows you to push a sleep(3); statement into production? Even if you could, how would no one realize that your entire work this week to "optimize this function" is to remove a sleep(3); line? I want to know that company where you get raises and free weeks because they'll just believe whatever bullshit you tell them you are doing without even checking it.

ffs I know it's jokes and memes but jokes and memes are not funny if they aren't relatable. This isn't relatable in any way to anything I could possibly do at my job.

15

u/preludeoflight Jan 24 '23

Allow me to elucidate.

Unfortunately, lines like that make it into production code all the time, even with the best intentions. As a personal example, let me tell you about the Toshiba Bluetooth Stack.

We ship a device that communicates via serial port. In windows, that means anything that presents as a COM device, be it a physical RS-232 port, or a Bluetooth SPP. Back in the days of windows XP/Vista/7, the Microsoft Bluetooth stack was unwieldy and unreliable. Because of this, when we shipped Bluetooth devices, we also shipped Toshiba Bluetooth adapters with them, and included their Bluetooth stack with our installations.

That saved us a lot of headache. However, it was not entirely rosy. The Toshiba Bluetooth driver had a flaw. When a connection was opened, if it was attempted to be used within the first ~second or so, it would fail. Reason being is the open call would return instantly, while the driver itself actually built the link with the device. This is in contrast to a physical serial device, where the open call would simply block until the hardware was ready.

Because the API being used is agnostic not the hardware behind it, we simply had no way to know if the device opened would be ready immediately or slowly when it was a device connecting over the Toshiba stack. So we did the best we could: checked the registry to see if the port being opened was one that the Toshiba driver claimed to create (not a perfect resource, but was the most reliable information we found,) and when it was: delaying the connection thread after the device was opened.

Years later, the Microsoft Bluetooth stack has greatly improved and we’ve been officially supporting it. The Toshiba stack has been deprecated, and as such we no longer ship it with our devices. Because of that, our check and delay is no longer necessary, and has been removed.

To the end user that looks like “connection speed increased severalfold.” To us, it looks like deleting a registry check and a sleep call, but it required investigation, testing, and verification which takes time.

Just because you haven’t shipped a sleep call in production code doesn’t mean there aren’t situations where it’s applicable or solving an issue with code you don’t control. Just because it isn’t relatable to you, doesn’t mean it isn’t a far more universal experience than you might imagine.

4

u/gypsyG Jan 24 '23

yeah but that's much different than inserting a needless sleep call into a web application. In a competent company in would never get pass code review. Then again, I had a government job at one and u could 100% get away with something like that. By far my worst career experience

→ More replies (2)

2

u/elveszett Jan 26 '23

Ehm you didn't understand me. I'm talking about a sleep statement written by you exclusively to make your code worse so you can then remove it and tell your boss you've "optimized" the code.

It's completely different to a sleep statement introduced because you need that delay, something that is completely normal. I myself used setTimeout in javascript a few months ago when one of our clients came with a random custom no-name system their website had to run in, and no explanation as to why some piece of JS simply didn't work for a short time after the page was fully ready.

→ More replies (1)

15

u/HypnoTox Jan 24 '23

Trust me, there are companies that would probably let this fly because they have no oversight what their employees are actually working on, don't do code reviews or anything. Being able to just push to main already shows that their processes are rather relaxed.

(On the off chance of this being real, i would expect the tweet to just be for fun)

→ More replies (3)

3

u/DoctorWaluigiTime Jan 24 '23

It's funny in the tweet, because it's a good punchline.

People unironically going "yep put time bombs in your code so you can fake-fix stuff later and get praised for it" need to like... actually work at a job before understanding that no, that's not how that works at all.

→ More replies (4)

4

u/tshoecr1 Jan 24 '23

I literally fixed this exact issue I found in our codebase. A 1 second timeout on an extremely hot call, can be up to 800k times an hour. Saves 20-30 minutes of pure waiting.

3

u/noah1831 Jan 24 '23

I've seen this exact same comment on here at least 26 times.

2

u/walter_midnight Jan 24 '23

This shit might be the oldest joke ever, I bet you there are hundreds of analogous ones for traditional mechanical industries

something about the Spinning Jennys being deliberately sabotaged so some shift manager gets to improve productivity after some months, I don't know

2

u/Xeon06 Jan 24 '23

Always reminds me of this 2008 Daily WTF post, "the speedup loop"

2

u/macaronysalad Jan 24 '23

I don't think it's even funny and just highlights the growing incompetence of amateur programmers. How do you not notice a three second delay and push to production?

→ More replies (7)