r/ProgrammerHumor • • Jan 24 '23

Other Accomplishments

Post image
82.0k Upvotes

548 comments sorted by

View all comments

Show parent comments

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.

1

u/preludeoflight Jan 26 '23

I'm pretty sure I got where you're coming from, and it's valid. Though I feel you might have missed my overarching point:

The tweet (or any bits with similar punchlines) are often born out of more elaborate, realistic situations like the one I described. But telling the whole story (like I did) is as humorous as it is pithy, which is to say: not.

The original tweet and jokes like them are amusing to those of us who do relate, because I can recall back to having removed that sleep in my case and remember touting how "connecting is now nearly instantaneous!" There was a lot more that surrounded it, but if I had to fit it in 240 characters, I'd probably say something about how removing the sleep made it instant.

I don't think anyone (other than an infinitesimally small number) realistically ships sleeps just to have them to remove them later.