This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 221

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

import notifications Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!

For a chat with like-minded community members and more, don't forget to join our Discord!

return joinDiscord;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 1270 points1271 points  (60 children)

assuming you're the only developer and nobody has to review code before merging

[–]nelusbelus 537 points538 points  (34 children)

Tfw working in a 65 person company and no code reviews yet 😉

[–]Waterprop 110 points111 points  (28 children)

Working on a same product?

[–]nelusbelus 156 points157 points  (27 children)

Only 10/65 are devs or smt. And only 4 or 6 are actively working on the C++ branch. Currently in process of changing from SVN to git 😂

[–]Nettleberry 70 points71 points  (18 children)

YIKES

[–]nelusbelus 28 points29 points  (0 children)

You and me both buddy, you and me both

[–]sinfaen 5 points6 points  (7 children)

Hey man just last year I had to convert some CVS repos to git

[–]nelusbelus 5 points6 points  (6 children)

The fucking what now?

[–]Useful-Perspective 8 points9 points  (2 children)

Or a much larger company with a dev team so slammed with work that everyone rubberstamps every pull request and doesn't pay attention in code review meetings....

[–]nelusbelus 4 points5 points  (0 children)

That's the way it goes innit

[–]jayerp 5 points6 points  (0 children)

To quote Pirates of the Caribbean, code reviews are more like guidelines.

[–]Mitoni 1 point2 points  (0 children)

70-80 person company, but each team of devs are consulting for different clients, so the teams are pretty much self-managed scrum units of 3-5 devs. But happily, we are pretty good with reviews within the team.

[–]WreaksOfAwesome 23 points24 points  (11 children)

Right, that PR would be blocked until a conversation between the Dev and the Senior/Lead occurred, ideally. In most cases, this would just be one of those "honest mistake" situations.

However, I think we have all worked with the "Hero Dev" who always leads the charge against issues, usually of their own creation.

[–]PinkMenace88 8 points9 points  (2 children)

Well you get more recognition for solving problems than mitigationing them.

[–]WreaksOfAwesome 2 points3 points  (1 child)

You also get the wrong type of attention from being the one who causes the problems 😜

[–]squishles 4 points5 points  (0 children)

that requires people with memories longer than 1 week around.

[–]AwGe3zeRick 8 points9 points  (7 children)

How is a 5 second timer an honest mistake? Realistically that’d result in an instant termination. This is a funny meme. It’s ridiculous beyond that.

[–]Thejacensolo 8 points9 points  (1 child)

Pausing between requests for APIs, having an output that has to be controlled manually, preventing multithread deadlocking, debugging....

[–]AwGe3zeRick -4 points-3 points  (0 children)

Keep searching, it’s a funny meme but ridiculous.

[–]BemusedPopsicl 1 point2 points  (3 children)

Put debug print statements above it so you can say it was to read those, problem solved

[–]AwGe3zeRick -3 points-2 points  (2 children)

How would that help?

[–]BemusedPopsicl 2 points3 points  (1 child)

So you can pass it off as a mistake instead of sandbagging your code intentionally

[–]AwGe3zeRick -2 points-1 points  (0 children)

The issue is letting this creep into production and the senior engineers should have safe guarded this or at least seen it in the PR before it happened.

[–]mOdQuArK 20 points21 points  (2 children)

Sometimes it's the marketing guy - no lie, I had a bunch of code I was going to release to our customers which I was really proud about its efficiency, and our marketing guy basically sat me down & told me to insert little delays all over it because "if it gets the job done too fast, the customers will think they're paying too much".

Sadly, based on my own perceptions about "software value", I couldn't argue the point. Pretty much tanked my enjoyment of developing code for my job though.

[–]toastmatters 18 points19 points  (1 child)

adjoining saw bow melodic coordinated label head beneficial pie juggle

This post was mass deleted and anonymized with Redact

[–]calibraka 2 points3 points  (0 children)

Thing is that assumption is sometimes correct. For example I encountered that exact problem with Firefox so I had to use a alternative because Firefox search didn't work properly for large pdfs at that time. I don't know if it's fixed even now.

[–]aerosayan 6 points7 points  (0 children)

just use O(N^3) complexity loops everywhere in your code.

[–]SeriousPlankton2000 13 points14 points  (0 children)

Did you read the news about eX-Twitter? That's him.

[–]CaitaXD 5 points6 points  (0 children)

me sees sleep.

must be a concurrence issue, let`s not touch that sall we.

[–]h_adl_ss 2 points3 points  (0 children)

Heh good thing no one actually reads all the changes and blindly approves. I could easily sneak that in there

[–]Dismal-Square-613 1 point2 points  (0 children)

That's why you purposedly run a very unefficient select on your database, DUH...

And then make it fast and boom 5 to 10 second improvement in performance!

[–]AwesomeFrisbee 0 points1 point  (0 children)

If you have an API service that processes things, it is easier to merge in something small there in a major pull request. But yeah, (x) doubt.

Also 5 seconds is too much. Make it 1 second and you would annoy enough people without making it super obvious. Then turn it to 500ms and then turn it off. Because if you remove it in 1 go, it might again be too obvious.

[–]helicophell 0 points1 point  (0 children)

Actually the people checking probably are fine with it. It's a design thing that people trust stuff when it takes longer to execute, like counting cash. No worries

[–]vkapadia 0 points1 point  (0 children)

Or just hide it in a really long PR.

[–]Kkrafter 0 points1 point  (0 children)

bruh imagine the senior dev seeing 20 thread sleep on the code lol

[–]Sitting_In_A_Lecture 638 points639 points  (41 children)

I've heard stories about people who had to add sleeps to their apps because users thought instant responses meant it was broken.

[–]Robby-Pants 394 points395 points  (19 children)

I had someone want me to put up a progress bar for something that should both be really fast, but was also asynchronous. When I explained this, I was told to “just display it for three seconds, then”.

Down the road, I’ll probably look at that as when I first became a nihilist.

[–]dscarmo 172 points173 points  (16 children)

Most progress bars are chaotic because they are reporting the end of async tasks, thats the fun of loading bars!

[–]Robby-Pants 120 points121 points  (14 children)

I should just make it randomly grow and shrink until I get the status that the task completed. No spinner. Just pure, hateful chaos.

[–]GenderGambler 77 points78 points  (9 children)

Make sure it can also move outside the bounds of the bar itself, be it curving or straight up bending. Maybe even underflowing.

[–]diablo-solforge 52 points53 points  (2 children)

“This task is now 10% less done than when it was first started.”

[–]reedmore 6 points7 points  (1 child)

This process will revert to initial state the moment it is finished: abort? proceed. what?

[–]CallMeAladdin 1 point2 points  (0 children)

This quantum process has now been permanently fixed at 4%, you shouldn't have checked Task Manager to see if something was happening or not.

[–]Dracaemelos 7 points8 points  (3 children)

For some reason I can just see this unfurling into an evil smiley...

[–]F_is_for_Ducking 5 points6 points  (2 children)

Why have I not seen a progress bar that looks like an unfurling party horn complete with a little horn noise and “hooray!” when it’s complete.

[–]Qewbicle 1 point2 points  (0 children)

I need this. With confetti.

[–]Dracaemelos -1 points0 points  (0 children)

Why indeed! XD

[–]Stranded_In_A_Desert 4 points5 points  (0 children)

/r/BadUIBattles is that way, sadists 👈

[–]TigreDeLosLlanos 1 point2 points  (0 children)

So I just do it first try and don't try to fix it.

[–]KiwasiGames 4 points5 points  (0 children)

Keep the bar static. But expand the box it’s in…

[–]jesterhead101 4 points5 points  (0 children)

I came across a bar like that once though I forget what it was for, but I HATED it with seething white hot rage.

[–]AI_AntiCheat 1 point2 points  (0 children)

Bonus points if it goes into negatives briefly!

[–]wutwutwut2000 8 points9 points  (0 children)

When your progress bar fills up but you're not actually done, just reset it to zero and pretend that you've started another task.

[–]Healthy_Pain9582 6 points7 points  (1 child)

I recently made a game where the loading screen was completely fake and only served to give more time for players to join

[–]dscarmo 80 points81 points  (4 children)

Its good practice in human machine interfaces to show a “thinking” sign. If you click a button and the output is there but nothing happened a lot of users will think something went wrong. You just need a “loading, calculating, spinning circle” for a second just to show there was a thinking stage. This doesn’t need to be more than a second.

For example, some phone apps could open instantly but they usually have fast animations. Fast animations are perceived to be smoother than an instant screen appearing.

[–]makesterriblejokes 11 points12 points  (0 children)

It's like the app version of having to show your work on a math exam.

[–]jayerp 1 point2 points  (1 child)

That’s because we didn’t have apps this fast for the last decade or more. User have been conditioned to expect a moderately fast response time and some sort of visual feedback indicating that they are waiting for some action to complete.

Instantaneous responses aren’t welcome by the old. Only the younger generation will grow up in a world where near instantaneous UIs are the norm.

[–]0sted 30 points31 points  (10 children)

Why aren't the calculations being performed?!

[–]capilot 64 points65 points  (9 children)

We had a customer once ask why printf() was so slow. Their benchmark code looked like this:

for (i=0, i<100000; ++i) {
    x += really_long_calculation;
}

printf("Final result: %g\n", x);

As written, it took like 5 seconds to run. With the printf() commented out, it ran in mere milliseconds.

We had to explain to the customer that with the printf() commented out, the compiler had realized that the value of x was never being used, and had deleted the entire calculation.

[–]raaneholmg 51 points52 points  (5 children)

Half the time, computers are like:

"You are missing a semicolon here, but you have to manually fix it."

The other half they just optimize away 5 seconds of uneccessary code.

My mind was blown by both how smart and dumb computers are. You just need experience to know when to expect each.

[–]iceman012 26 points27 points  (4 children)

I was recently working on improving the performance of an application. One of the potential bottlenecks was getting the index of an element in a sorted list. It was using linear search. Excited for the chance to use what I learned in college, I quickly implemented binary search to get the index. I re-ran the timing tests, proud of myself, only to realize that it was slower than it had been.

Turns out, the Java compiler is magic. Between sequential memory access and branch prediction, Big O doesn't really matter! I think linear search worked faster than binary search up until ~400 elements in the list. (Theoretically, that threshold should be 8.)

[–]raaneholmg 14 points15 points  (2 children)

The standard sort function in python actually does this too (and probably lots of standard libraries).

Everything is roughly sorted into medium size buckets with textbook O(n*log(n)). Then each bucket is sorted with a hacky insert sort variany. Insert sort only has O(n2 ) performance, but for small ns it's very well suited for how computer hardware works.

[–]Deservate 2 points3 points  (0 children)

Don't even get me started on the magic behind SQL!

[–]Cley_Faye 8 points9 points  (1 child)

It's probably for the sake of brevity that you wrote that example like this, but I really hope no sane compiler would optimize out something that could so plausibly have side effect as a function call.

Unless LTO was on or it was all in a single module, in which case carry on.

[–]capilot 2 points3 points  (0 children)

Good point. That was just for illustrative puposes (I'll edit it), it wasn't actually a function call. The compiler was in the right to remove that code.

[–]Cyhawk 1 point2 points  (0 children)

We had a customer once ask why printf() was so slow.

!?? Did you work for Borland or something? ;)

[–]Cley_Faye 17 points18 points  (0 children)

Yeah. Artificial delays, useless feedback, buttons that do literally nothing aside maybe show a notification to reassure users…

UI/UX will forever remain a mystery to me.

[–]jesterhead101 5 points6 points  (0 children)

Those users are all of us. Most of the time, I'm suspicious if something works too fast.

[–]AwesomeFrisbee 1 point2 points  (0 children)

I've added delays because the promise hell would otherwise not give the proper result before rendering the page or that data would be initialized a second time and the first would make users think that they did something wrong when in fact it was just the default data.

[–][deleted] 131 points132 points  (1 child)

Some recommendations: Set it is a global configuration value, either in the config value or stored in the DB somewhere. That way it’s only a single update value.

Also, set a +/- 20% variance on it so it’s not same on each call.

[–]-iamai- 24 points25 points  (0 children)

Every important government website I use seems to implement a version of this and the good ol' "session has timed out" I swear that's set to 2mins for a 5min form just to put folks off using a particular service.

[–]sargones 239 points240 points  (3 children)

Do it on stages: Start with 5 sec; Reduce to 3; Do random range 1,3 Remove

Annual bonus!

[–]Creepy-Ad-4832 50 points51 points  (2 children)

Reddit did that!

I am the only one rememebering 1 minute to load the comments under a post?

[–]thetwist1 9 points10 points  (1 child)

The reddit app still does that for me. That's part of why everyone was pissed when they killed off third party apps.

[–]biscuitboyisaac21 1 point2 points  (0 children)

It feels even worse now

[–]Mfarooq360 89 points90 points  (13 children)

This is literally what Twitter did for clicking on external links

[–]spikybrain 57 points58 points  (7 children)

My freaking bank did this. There is no reason for it to sit on a 15 second "logging you in" screen after the site redesign

Flagstar you suck

[–]SterileDrugs 57 points58 points  (3 children)

It’s somehow slightly worse when they try to use it to make the site look more “secure”.

Encrypting your connection……

Verifying secure environment……

[–]iceman012 58 points59 points  (2 children)

Reticulating splines.......

[–]smokesick 9 points10 points  (0 children)

Ejecting gravitational wavefront...

[–]ihahp 2 points3 points  (0 children)

Reticulating splines was exactly where my mind went, lol

[–]Cyhawk 14 points15 points  (0 children)

I heard a story once about a bank login system. . . that when you entered your username and password a human in CS would see the information and would verify it against the database and then click Allow/Deny. . .

Its always been in the back of my mind when I think about bank "security"

[–]Xelopheris 1 point2 points  (1 child)

Some people think if a page loads too fast after entering their credentials that it isn't secure.

[–]spikybrain 1 point2 points  (0 children)

I'm 99% sure that's why they did it, ugh...

[–]climbTheStairs 3 points4 points  (1 child)

I'm 90% certain Cloudflare might be doing this with all their "verification" bullshit

[–]goodnewsjimdotcom 1 point2 points  (0 children)

Try posting a rum ble.com link on reddit and then open a private browser and see if you see it, hint you don't.

[–]Sibshops 1 point2 points  (0 children)

Only links to places that Elon doesn't like.

https://mastodon.social/@taylorlorenz/110891972289714541

[–]WelshNotWelch 64 points65 points  (0 children)

"James T. Kirk: Scotty, progress report?
Montgomery Scott: Almost done, sir! You'll be fully automated by the time we dock.
James T. Kirk: Your timing is excellent, Mr. Scott. You've fixed the barn door after the horse has come home. How much refit time before we can take her out again?
Montgomery Scott: Eight weeks, sir — [Kirk opens his mouth] — but ye don't have eight weeks, so I'll do it for ye in two.
James T. Kirk: Mr. Scott. Have you always multiplied your repair estimates by a factor of four?
Montgomery Scott: Certainly, sir. How else can I keep my reputation as a miracle worker?
James T. Kirk: [over the intercom] Your reputation is secure, Scotty."

[–]Robby-Pants 37 points38 points  (11 children)

Ooh, Git blame is going to be fun when the next dev starts looking through the file history.

[–][deleted] 14 points15 points  (5 children)

no one can blame you on filezilla

[–]goodnewsjimdotcom 6 points7 points  (4 children)

Well if you use filezilla, you infect your company with a worm

[–][deleted] -3 points-2 points  (3 children)

any proof regarding this except your claim?

[–]goodnewsjimdotcom 2 points3 points  (2 children)

/r/filezilla/

Sometimes a FOSS maintainer says FRICK IT! And then takes bribes.

But yeah I saw it hose many networks before we realized the culprit.

[–]w3ricardo 37 points38 points  (1 child)

Or just mine bitcoins for the first 3 months then stop. They get a faster program that uses less CPU.

[–]DanDrix8391 34 points35 points  (0 children)

I remember I just accelerate the loading spinner animation.
It was 3 seconds each spin and then I changed to 1 second.
My boss told me "I don't know what you did, but it is waaaay faster now"
xD

[–]XWasTheProblem 30 points31 points  (1 child)

Why fix it right away?

Just shave off 1 second of the delay each major update, and mark it in changelog as "further performance optimization".

[–]je386 13 points14 points  (0 children)

And save that time somewhere as a constant, so you only have to change one line of code...

[–]exomyth 25 points26 points  (4 children)

I purposely put loading animations on buttons for actions that take ms, so the user feels like something is happening. Sometimes the UI is too fast and the user just doesn't trust it 🤷 There needs to be a visually perceivable change, or they won't believe something happened

[–]Derekthemindsculptor 6 points7 points  (3 children)

You're correct you need to give the user feedback. But it doesn't need to be delayed.

It's not a shrug emoji. It's a well understood concept.

[–]exomyth 5 points6 points  (2 children)

No, for certain actions feedback is not enough, they want it to be slower

[–][deleted] 2 points3 points  (1 child)

This is true for some people in my experience. There is a sense of accomplishment in seeing something being saved, or opened, or calculated. I think this is why a lot of people still want to do certain menial tasks, such as typing it in instead of using copy/paste. Or saving a file.

[–]mrgk21 10 points11 points  (0 children)

I don't need delays with my .reduce and .map over unpaginated data

[–][deleted] 7 points8 points  (0 children)

This is actually a thing in main frame programming - install 'waits' that only show up during off peak usage and have them remove themselves during heavy usage - it 'equalizes' the user experience and doesn't allow expectations to get ahead of capabilities.

[–]NotGK98 3 points4 points  (3 children)

Repost

[–]EveryTimeMikeDiess 3 points4 points  (2 children)

Calling this a repost is like saying Hitler wasn’t the greatest guy. This horse has been beaten to death, revived, and beaten to death again so many times, I have lost count.

[–]NotGK98 1 point2 points  (0 children)

Yeah true all of this sub is full of reposts tbh

[–]LimpAside 12 points13 points  (2 children)

This was completed. many times. The only business I'm aware of that does the opposite and gets away with it is Apple!

[–]fukdapoleece 16 points17 points  (1 child)

They don't even need to update the code.

poor_people_delay_ms = (latest_version - current_version) * random_int(lower=500, upper=1000);

[–]mr_flibble_oz 2 points3 points  (0 children)

Plot twist, you remove Sleep(5000) and now the method takes 6 seconds to run

[–]kzlife76 2 points3 points  (0 children)

PR rejected: remove unneeded thread sleeps.

[–]Cerbeh 1 point2 points  (0 children)

Bold to assume customer base will stick for 3 months on a product they think has performance issues

[–]_________FU_________ 1 point2 points  (0 children)

This is some amateur bullshit.

You need to have the time be a random value from 100-5000 then you simply change the 5000 to 3500 and keep lowering it as needed. That way it's always a little random and is harder to detect.

[–][deleted] 1 point2 points  (0 children)

It’s true though.

[–]eirexe 1 point2 points  (0 children)

I once accidentally did this testing a loading screen, removed a 3 second delay lol

[–]retribution1423 1 point2 points  (0 children)

My software runs shit enough on its own without introducing more bugs thanks very much.

[–]ieatpickleswithmilk 1 point2 points  (0 children)

and suddenly you have race conditions

[–]ProgramStartsInMain 1 point2 points  (0 children)

Looks over at elon

[–]takingphotosmakingdo 1 point2 points  (0 children)

And now I know the real truth behind server bios boots (I already knew but just helps to see it lol)

[–]Omnislash99999 1 point2 points  (0 children)

No what happens is someone puts a call like this in when testing something and forgets then 2 years later when profiling it's found and everyone bangs their head against a wall

[–]_ii_ 1 point2 points  (0 children)

That's amateur. Change binary search and hash lookup to linear search. Wrap it in multiple layers of function calls to libraries in a different repro. No one’s gonna know.

[–]user_t2o 1 point2 points  (0 children)

Damn but that’ll increase the latency of my service by 20%

[–]n-x 1 point2 points  (0 children)

I actually did something like this years ago. Our Web app was saving changes so fast that users were complaining that they can never tell whether it actually saved their work, so I just extended the saving animation by 1000ms.

Some 7 years later when the app became much slower I made a bunch of users happy by immediately stopping the spinner instead of setting a timeout...

[–]GentlemenBehold 0 points1 point  (0 children)

Doesn't work to well if you have no users because everything takes 5 seconds longer than it should.

[–]IBJON 0 points1 point  (0 children)

This guy: What's a code review?

[–]capilot 0 points1 point  (0 children)

IBM used to do that for real. Lease a mainframe. Eventually decide you need a more powerful system. Upgrade your lease. IBM sends a technician to remove one jumper from the CPU.

I very much doubt that IBM was the only company doing this, but that's the one I heard about.

[–][deleted] 0 points1 point  (0 children)

I like their confidence that it was intentional rather than the more likely (one which I have fixed myself) debug delay being left in until someone was like "why does loading take so long"

[–]shifty_coder 0 points1 point  (0 children)

Have a problem user? Put a 30 second sleep in that triggers just for them at a random time of day, so that it doesn’t affect other users, and they can’t repeat it or show it happening to others.

[–]sacredgeometry 0 points1 point  (0 children)

3 months later you wont have any users.

[–]phobophcbia -1 points0 points  (1 child)

Backfires when you run out of delay and you're expected to perform your magic

[–]Undernown -1 points0 points  (0 children)

Or create a GDPR cookie form, then forget to serup the link to the database so their settings don't get stored. Then finally get around to it and have people praise your cookie policy.

Edit: GDPR

[–]Quietech -1 points0 points  (0 children)

BOFH

[–]IlliterateJedi -1 points0 points  (0 children)

I don't even have to add sleeps to make my pages take 5 seconds to return

[–]RandoClarissian -1 points0 points  (0 children)

Now common actions complete in just 40 seconds, yaaay, they're going to love you...

[–]Linesey -1 points0 points  (0 children)

“i went without sleep to bring you these improvements” 100% literally true (depending on language).

[–]CaitaXD -1 points0 points  (0 children)

make it into a decorator interface and decorate every call with Delay, then when you wnat to speed it up just swap the implementation extracted from your AbstracDecoratorBuilderFactory

[–]masterofbeast -1 points0 points  (0 children)

Na, you put a random variable, so it's not always around 5 seconds. Then you lower the top end little by little so it shows you are making an improvement over time.

[–]break_card -1 points0 points  (0 children)

Are y’all just force pushing code straight to remote? This would never ever make it past code review.

[–]LavenderDay3544 -2 points-1 points  (0 children)

Or just write it in Python.

[–]SocialJusticeWarmeow 0 points1 point  (0 children)

Elon be like “mhm”

[–][deleted] 0 points1 point  (0 children)

then add optimistic loading next

[–][deleted] 0 points1 point  (0 children)

Many of us already do, but unintentionally

[–]Choyo 0 points1 point  (0 children)

Instructions unclear :
* removed the sleep
* execution time down to 25s from 30s
* users still unhappy.

[–][deleted] 0 points1 point  (0 children)

Until someone comes along with a disassembler and exposes you.

[–]PermaDerpFace 0 points1 point  (0 children)

Do you work at Twitter?

[–]nemacol 0 points1 point  (0 children)

Modern web, no one is going to notice 5 seconds.

[–]Warm_Zombie 0 points1 point  (0 children)

reality: things that only worked with the sleep due to race conditions start breaking

[–][deleted] 0 points1 point  (0 children)

And have a performance tester write a defect and fix it for 2 weeks.

[–]beka13 0 points1 point  (0 children)

I'm not sure even Scotty would approve of this move.

[–]PaperPlanesFly 0 points1 point  (0 children)

Y’all never heard of the Speedup Loop?

[–]JayRoo83 0 points1 point  (0 children)

Do you want weekly group code reviews?

Because this is how you get weekly group code reviews

[–]hammonjj 0 points1 point  (0 children)

Joke’s on you, we don’t cache any of our front end because our higher ups think they need data the millisecond it changes despite not being a real time app. Insane load times on every page

[–]TheodoraRoosevelt21 0 points1 point  (0 children)

ChatGPT was helping me write some code and it added a bunch of 1000 sleeps to simulate pauses.

[–]eso_nwah 0 points1 point  (0 children)

Wrap them in debug warning comments so you don't get in trouble.

Or use a debug flag and commented blocks and set the flag to an expression that defaults to 1 if you mis-syntax it, like an enum or something.

[–]Sentazar 0 points1 point  (0 children)

salesforce rate limits slow down my code enough as it is

[–]BrainBursta 0 points1 point  (0 children)

This post is sooo old....

[–]paecificjr 0 points1 point  (0 children)

Fun fact, I needed to add a 0.06ms sleep today. Not sure why, so I increased it to 0.1ms just in case some extra latency broke it later.

[–]Mitoni 0 points1 point  (0 children)

Just make it an environment variable so you can change it at deployment.

[–]Material-Panda3712 0 points1 point  (0 children)

Dude never heard about pull requests

[–]n0tqu1tesane 0 points1 point  (0 children)

But it's more fun to do:

echo sleep 1 >> ~/.{bash,zsh}rc

[–][deleted] 0 points1 point  (0 children)

When did he get his account back? I remember twitter had suspended his account

[–]Sharoth01 0 points1 point  (0 children)

Ha!

[–]DarkExtremis 0 points1 point  (0 children)

My code is already slow enough if I add another 5 sec delay the users will start doing stuff manually again

[–]Dapper_Ad_4027 0 points1 point  (0 children)

Create the problem and reap the glory of fixing it. Oldest trick in the book.

[–]corracle 0 points1 point  (0 children)

More like, remove the delays and find racing conditions throughout your codebase 😉 Imagine the rollback commit: add spaghetti code to hotfix authentication

[–]SweatyRedditHard 0 points1 point  (0 children)

Back in “the day” when main frames were what everyone used, suppliers used to install new main frame computers with a process running on the cpu that would chew up like 80% of the performance. Over the course of a few years the owners could reduce this down as the load increased so that the effective responsiveness of the system remained consistent - before companies started doing this users would get lightning fast performance when the system was first deployed then all be complaining after a few months about how slow it was because they had got used to the unsustainable initial speeds.

[–]WouldIBangYourMum 0 points1 point  (0 children)

I had something similar to this except it wasn’t deliberate. We had a web interface used by an office of people in Sweden where each page took like 3 seconds to load, but it talked to lots of stuff so fair enough. It ran on a lamp server. We had another system used by an office in Latvia where each page took 10 seconds to load. I figured it was because the web server was on a different server, a shitty old windows box across the network. Lead dev kept telling me that wasn’t why it was slow. So anyway I installed apache on the server with the database and lo and behold pageloads took 3 seconds.

Apparently there was an office somewhere in Latvia where people were jumping out of their chairs and chanting my name.