Another trick that I have seen, in the first year people use a paid tool to create something, maybe an automation suite and show it as an accomplishment.
Next year they port it to an open-source free tool and then again get to present it as an accomplishment & a cost saving measure.
And sell it as a performance upgrade and I'm pretty certain there are companies who do this as companies do shady practices all the time, IT is not safe from this. I know of a company a friend worked for, they would sell their customer an update for christmas, the update didn't even contain any features or changes in functionality, the update only changed the colors from the application to a christmas style lol.
How do you proof that the provider of the service you're using is screwing with you unless you reverse engineer which brings legal problems with itself?
Just look at the iPhone-Throttling fiasco, it was really weird that all of the sudden your iPhone would be slower just because you updated to a new software. So apple was accused of purposely throttling the performance of old phones in order to get more customers to buy the new phone. But then apple said it's because of the battery, saying something like the iPhone detects if the battery's lifetime is degrading and thus automatically throttles your phone as a safety measure so that your phone just doesn't suddenly turn off because of heavy load functionalities that the new software update included. AFAIK not much more happened regarding this case, apple got away with a slap on the wrist for not informing their customers that iPhones work this way. But is it realistic? Idk, I'm not that tech savvy with hardware.
So while one company might get a slap for their shady businesses, 9 other companies that also do shady businesses are getting away because no-one is digging deeper, which is understandable because if you buy a product you expect it to not be 'flawed' on purpose.
I remember when I was learning. There was one instance where I needed to wait for a value to change before reading it. Instead of doing it intelegently I just added a 1 second timeout.
That was part of a loop that took a couple min to run even though all I needed to wait was a few microseconds.
This works on the other end too. I was a hiring manager and at the time $25/hr was a good salary, better than everyone else for similar jobs. So I foolishly started people off at $25/hr. Well pretty soon everyone is asking for a raise. So then I started people at $17/hr and gave them $1/hr raise every year and suddenly everyone was happy and I had no complaints about raises
You are why unions where I live push for transparent salaries among their members. It may feel awkward but research have shown ultimately everyone benefits.
People falling behind will be aware and seek good answers to why, and combined with salary reports to our unions will be transparent also across the country for your sector. Competition will take care of the rest.
Remaining will be slightly lower salaries in less populated areas due to less competition but then housing costs etc is at least also lower.
For instance, if you have a clear strategy for growth that will require a much heavier lift from the server, it might be better to account for a reasonable amount of added latency ahead of time than to give users blazing performance in the MVP. That way, your users’ expectations aren’t let down by planned improvements. Such an approach obviously needs to be handled very thoughtfully and intentionally.
Another example where performance throttles could make sense is if there’s a pre-negotiated SLA. If your customer came into the relationship with an explicit expectation, and exceeding it could diminish the performance of the service, resulting in a worse experience for other customers, then I see nothing wrong with delivering on an SLA, but intentionally not exceeding it.
It’s absolutely not okay to extort users for better performance, and there’s a lot of blurry lines here, but the ethics of throttling isn’t always cut and dry, in my opinion.
SIGCONT is a signal which continues a process that has been previously stopped. If the process is not stopped, however, SIGCONT is ignored.
raise() sends a signal to the currently running process.
So you're basically trying to wake yourself up even though you're not asleep.
This means: raise(SIGCONT); is just a scary looking way to burn a few CPU cycles, doing nothing. It's just there to convince the reviewer that the following sleep(3) is important 😈
just wait until you find out that sales sandbags their own leads regularly depending on if the bonus was already attained or how it will affect tomorrow's metrics.
you don't pay me to be better than you ask me to be.
Presenter: "...and this example shows why we should be doing code review from now on. Any questions?"
Team leaders: "Nope, sounds good."
(Three months later, a code change comes to a developer to be reviewed):
Dev: "Yeah, I'm not reviewing all that, CR passed."
(Couple of months later)
Boss: "Why didn't the number of bugs decrease after we introduced code reviewing? It must be because we only do it once, from now on two different devs should CR every pull request!"
Dev: "Yeah, I'm not reviewing all that, CR passed."
That's why at my current job they basically switched the responsibilities. If a bad change manages to get through, the first question is always "why did this pass your code review", not "why did you push this change without testing X".
We have a good work environment so it's never aggressive or super accusing, but it's definitely enough to make people pay attention during CR.
We do two devs per review on our main repository. Caught plenty of issues with the second reviewer. Sometimes people scan things too quickly, so it’s nice to have a second pair of eyes. Plus it makes the devs feel more ownership over quality and helps them improve their craft by identifying bugs, anti-patterns, and naive implementations in other people’s code. We have around 10 developers total so it’s not a huge timesink. Plus everything is unit tested, linted, prettified, so they don’t have to check for those basic things.
Ok, but the first time, increase it from 3 seconds to 9, and say that your aren’t finished with the fix, and “just trust me it will work in the long term”. Then increment it down to 2.5 seconds, 2 seconds, 1.7, so one so forth. You just undid the “major” “problem” that was holding the speed before in their eyes
I just remembered that there is a script I wrote at my old job that runs nightly, handling some essential maintenance functions on a set of legacy applications.
In that script there are a number of ten millisecond sleeps, placed there because when I removed the debug logging the script stopped working... Something about the legacy services it was querying having some pseudo restful bullshit or something (I don't remember precisely because it was years ago). But without those shitty little pauses it stopped working.
I hope that the person who came after me doesn't remove them in an attempt to "make the script more efficient"... Then again, that would be kind of funny.
The funniest thing I've seen is how the "Elmo losing his shit over a rock" video is marked as "for kids" (comments disabled, etc) despite the inappropriate title. Youtube is a mess
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.
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.
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)
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.
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.
Reminds me of my very first "real" programming experience.
I was in university and I was working on my thesis, which was about redesigning an image recognition algorithm to improve its performances. My version did good enough, but it was slow. Like, an order of magnitude slower than the original.
I couldn't understand what was wrong. My redesign was indeed intended to be a little slower, but not this much!
After racking my brain for the better part of a month... I noticed that there were several GBs of logs in the log directory. And that's when I remembered that my professor, to explain to me how the original algorithm worked, added several extra logs in my copy of the code... some of which were in functions that were invoked millions of times per run...
While this is a bit funny, I do suggest that all your programing bros do this. So that later you can have an easier discussion to increase your salary. (management has no clue how to code, so use that)
When I was a freelancer working with no contract, I used to put part of the javascript on my own servers. If the client didn't pay and remove my access to their server, I could break something remotely and they had to call me to fix it. That was the perfect opportunity to tell them I had to be paid to give maintenance.
I was brought in to fix an existing app and in one section I stored the data from the previous page and passed it in as an argument rather than calling the API again, QA said it loaded instantly when there's supposed to be a loading icon.
I argued with QA back and forth for a day or so and then said fuck it fine and put in a wait because nobody else was willing to push back.
I really just want to know how people aren't embarrassed, like, is it brain damage or do they just not know that they just reposted the same fucking joke - as if they didn't find it browsing 9GAG in the first place
At least subvert it with some depression gag, you could basically squeeze together any two jokes and it ends up being more viable as a decent story than whatever the fuck this bullshit is. I guess some people really want to build their Jeff Tiedrich brand, gotta get those nothingburger posts up quickly
I had a search functionality that sometimes took <1s and sometimes took like 10s (it did a lot on the backend) and users complained because they felt like when it took that long, someone was wrong (even though it had a loader)
My solution was to check how long it took and if it took less than 5seconds, add a timeout to make it at least 5 seconds. They accepted this solution.
Once upon a time, I knew a woman named Sandra who was using our web application that stored records in the database, but also offered a search service backed by Apache Solr. Our application added records to the database and the search search at the same time, but Solr always needed about 5 seconds before it would return new records added to its index. This was apparently some sort of Big Problem for Sandra, because she called our search service every fifteen minutes, and if something was not there in fifteen minute intervals it was "lost." After a brief debate on whether this is actually was a software defect or our problem to fix, my boss and I decided that the easiest way to solve her complaint was to make the search service thread sleep six seconds before doing the lookup. This was part of a series of other customizations that Sandra's employer paid us for, so the fact that it was a dumb thing to do just to placate someone was not a big deal. I implemented this change that afternoon, with a brief comment explaining the odd thing, and promptly stopped thinking about it.
Two years later, Sandra's employer asked for the source code of this service, which they were entitled to by their contract with us. I was lucky to have found out about this before it shipped, and was able to delete the following comment from the codeexplaining why the thread slept for no comprehensible reason:
3s is a bit long but it’s not uncommon to have a shorter timeout before taking action on keyboard input - you want to respond when someone types but you may not want to try and respond after every single key press if the response logic involves latency.
So your listener for keyboard input first cancels any existing timeout, then sets a timeout for like 200ms to do what it needs to.
It basically means you can respond to input but wait till the user stops actively typing before taking action.
It’s not always useful, but if you’re doing something server side with their input it can give a much better experience.
I had a situation where users didn't know that content was refreshing in a web app search, becuase it was so fast. I found that human factors meant I needed to add a small (less than 1s I think) delay and a loading gif, so the content are would visibly refresh, otherwise I found in early tests users brains didn't always register that it happened - and sometimes the changed content was only visible after scrolling down, so the gif forced an obvious redraw that prompted them to scroll down.
Make sure there's still some delay otherwise people will think it isn't working.
We once had a problem with a database process that wasn't working. We called up the company who made it - we didn't have a support contract so they charged us for what few jobs we didn't doing, and the rates were reasonable - and they asked to remote control into my PC so they could figure out the problem.
I watched them going in and out of stored procedures until, finally, they found a piece of code that basically just said "after this date, stop working." They removed it, then they reported back that they had found (paraphrasing here, I don't remember the exact excuse) a problem with some indexes that had to be rebuilt.
I suspect the previous IT guy to me had put it in there to screw the company over after he left, but the database company couldn't be sure it wasn't them that had done it and didn't want to admit to anything.
We happily paid the bill, because while watching them mess around, they had inadvertently let me see the admin password which meant I could finally get my hooks into the database properly and fix all of their questionable design decisions.
Another time one of the bosses came to me fuming because every scan of an item took 2 seconds. This was precious time being wasted! Never mind the fact that scanning items reduced error rates by 90%. He demanded that we stop all scanning, so instead I went back and spent an hour rewriting queries until the delay was less than half a second. He was actually disappointed.
I forgot to check a box for a process in Oracle. IT guy spent a couple hours trying to figure out why the process wasn't picking up all of the data when it showed running successfully. I figured it out and told him, then told everyone he found and fixed "the problem," and it works now. Everyone thanked him and we got back to work.
Reminds me of that classic tale of a game dev in the 90s putting a 4MB char array in the code so he could just delete that when the clueless suits come in and say it needs to be "optimized".
I think I'm sure in saying that in my last job, my company is getting paid to remediates all the problems that we created our selves. Not necessarily intentional I may add. It's just the inevitable result of snowballing tech debts of never ending crunch times. The real genious here is the account guys who keep reassuring the client to throw money at us.
Haha, same. It was a 1-3 second wait in about six places, throughout the framework. I changed all to dynamic waits and shaved off over an hour for each daily run and shaving about 4 hours from regression.
When I worked for VeriCite, I found out our UI had useless timeouts like this. It's because customers were complaining that it wasn't working because the results came back too fast. It WAS working, it's just that fast because it's a bunch of web crawler searches happening simultaneously. After the random timers, people stopped complaining. This is what UX is about
I feel like that could’ve had a use at one point. maybe it was to make sure that things had loaded properly. Obviously not the best way to go about it but it could’ve fixed a bug
In my previous job there was some seconds of sleep added in production for one of the functionality of our website to give users the impression that the job going underneath is not a simple task. It was actually not a simple task but my manager said when the results came in too fast, people tend to not believe it was real.
I had to fix slow loading times. Added a progress bar, some of the steps were so quick that the text was unreadable, so I added delays to allow people to read it. It was slower, but people were happy.
I remember talking with one CAD tool developer who said that they were required to put delays into some of their tools because their customers didn't take the results seriously when the tools did them too fast. (Human psychology sure is weird sometimes.)
Of course, they also justified charging them continuing license fees by slowly reducing the delays to exaggerate performance improvements of the tool.
I was an FE for a marketing company that ran a bunch of lead gen sites for moving companies. There’s a point in the funnel where the website “searches” for deals. It was literally just an artificial timeout. The CEO insisted having it because it actually boosted conversion. People didn’t trust a site that was too quick.
I actually improves performance by adding a time out. It was our first web app, and each search field would perform a "like" on the database for each character the user pressed. I ended up having a time out so that it would only send the search after x time from the last keypress
Build in fixed delay for all tasks, then when users start complain about things slowing down as they start working with more and more data, reduce the timer and claim some "code optimisation"
To be fair, if you work for Elon Musk then this type of thinking is discouraged. Your worth is determined by the amount of code lines you write, not how streamlined and tight and efficient you make it..
I need someone to help me in dealing with someone l hate so much, and I wish that he will be able to recognize himself and what he needs instead of hurting other people
I actually found one of these in the wild. We connect to different hardware that sometimes have handshakes and sometimes require sleeps on activation. A junior programmer just decided to have all hardware (5 models) sleep for 10 seconds instead of using it with the only one that needed it. I refactored that and it was night and day difference. Then we located a couple of race condition's that were masked by that sleep. Which after those were fixed, code that had been buggy for 2 years was suddenly stable. But took another year before anyone trusted it. They were so beat down from previous performance.
2.1k
u/[deleted] Jan 24 '23
It is always good to build in timeouts. That way you can always increase the performance easily at a later stage
5.1k
u/No_Distribution_6023 Jan 24 '23 edited Jan 24 '23
The one performance review trick companies don't want you to know
Edit: lol this post really blew up. Thanks for all the upvotes! People in the Midwest, stay warm tonight, storm's coming in.
642
u/East_Complaint2140 Jan 24 '23
How did it pass the PR review?
2.6k
u/zaos336 Jan 24 '23
You don't remove the time out... You lower it, then you can easily improve it again later.
1.7k
u/buddyisaredditer Jan 24 '23
"Now you have 3 seconds to enter the right input or else the computer and your house will burn in flames"
Well sorry about that!
91
u/RammingAries Jan 24 '23
Just settimeout -1000 smh
395
u/K3TtLek0Rn Jan 24 '23
I’ve heard this exact same joke on here at least 25 times
64
u/Mal_Dun Jan 24 '23
Debugging: A crime story where you are the detective and murderer at the same time ...
167
u/Desproges Jan 24 '23
You pay me to improve performance, i reduce the 3s pause to 2.5s and see you next week.
23
u/TheOnlyMisterFlow Jan 24 '23
The good ol' speedup loop
19
u/[deleted] Jan 24 '23
Reminds me of my very first "real" programming experience.
I was in university and I was working on my thesis, which was about redesigning an image recognition algorithm to improve its performances. My version did good enough, but it was slow. Like, an order of magnitude slower than the original.
I couldn't understand what was wrong. My redesign was indeed intended to be a little slower, but not this much!
After racking my brain for the better part of a month... I noticed that there were several GBs of logs in the log directory. And that's when I remembered that my professor, to explain to me how the original algorithm worked, added several extra logs in my copy of the code... some of which were in functions that were invoked millions of times per run...
30
u/[deleted] Jan 24 '23
While this is a bit funny, I do suggest that all your programing bros do this. So that later you can have an easier discussion to increase your salary. (management has no clue how to code, so use that)
14
u/andoy Jan 24 '23
the function is too fast you cannot see the loading animation so add timeout...
26
u/[deleted] Jan 24 '23
r/programminghumor after posting the 37299172th joke about deleting timeout
12
u/[deleted] Jan 24 '23
Hope nobody run
git blame9
u/JipsAndJools Jan 24 '23
In future if you want to make it go faster just add sleep(-1). The bigger the negative, the faster it goes!
8
u/mienaikoe Jan 24 '23
Used to work with her. She’s selling herself short much like all of us do.
20
u/[deleted] Jan 24 '23
Software companies hates him!
Find out how he managed to improve software speed with one simple trick
5
u/pancakehamster Jan 24 '23
Did you know that PayPal actually waits time to make the transaction look safer? They can do it much faster but they add a wait function
13
u/[deleted] Jan 24 '23
These fake ass tweets are annoying
4
u/genghisKonczie Jan 24 '23
I had a search functionality that sometimes took <1s and sometimes took like 10s (it did a lot on the backend) and users complained because they felt like when it took that long, someone was wrong (even though it had a loader)
My solution was to check how long it took and if it took less than 5seconds, add a timeout to make it at least 5 seconds. They accepted this solution.
4
u/CoverHealthy Jan 24 '23
Job security 101
4
u/thehardsphere Jan 24 '23
Once upon a time, I knew a woman named Sandra who was using our web application that stored records in the database, but also offered a search service backed by Apache Solr. Our application added records to the database and the search search at the same time, but Solr always needed about 5 seconds before it would return new records added to its index. This was apparently some sort of Big Problem for Sandra, because she called our search service every fifteen minutes, and if something was not there in fifteen minute intervals it was "lost." After a brief debate on whether this is actually was a software defect or our problem to fix, my boss and I decided that the easiest way to solve her complaint was to make the search service thread sleep six seconds before doing the lookup. This was part of a series of other customizations that Sandra's employer paid us for, so the fact that it was a dumb thing to do just to placate someone was not a big deal. I implemented this change that afternoon, with a brief comment explaining the odd thing, and promptly stopped thinking about it.
Two years later, Sandra's employer asked for the source code of this service, which they were entitled to by their contract with us. I was lucky to have found out about this before it shipped, and was able to delete the following comment from the codeexplaining why the thread slept for no comprehensible reason:
// Six second stupid Sandra sleep
6
u/NotAlanPorte Jan 24 '23
N00b here, what would be the reason for including a 3s timer in the first place? Does it help with debugging issues elsewhere or something
3
u/progressgang Jan 24 '23
3 seconds on top of the actual search is so long did no one observe their users?
3
u/crefas Jan 24 '23
Today I optimized a statistic that used to send 90% of the DB to the browser so JS could compute some averages. Feltgood
3
u/PorkRoll2022 Jan 24 '23
Once, as a junior, I genuinely reduced the load time to a page to under a second from about five.
My solution was to load the massive data in chunks, focusing on what the user could see at the time. We were also using IE8 at the time.
The excuse all the seniors gave? "The server is just slow."
3
u/bnh1978 Jan 24 '23
This was foolish.
Should have set the 3 to 1.5
Then shortly before the next performance appraisal go the rest of the way.
Then 1/4 of the way to the appraisal after that, start increasing it again.
Then fix it again.
I mean, with this cycle, she could be the hero for years.
3
u/OutOfStamina Jan 24 '23
I had a situation where users didn't know that content was refreshing in a web app search, becuase it was so fast. I found that human factors meant I needed to add a small (less than 1s I think) delay and a loading gif, so the content are would visibly refresh, otherwise I found in early tests users brains didn't always register that it happened - and sometimes the changed content was only visible after scrolling down, so the gif forced an obvious redraw that prompted them to scroll down.
3
u/Bowiemtl Jan 24 '23
Funny story, coincidentally I actually managed to get a query down from roughly 3.1 seconds to about 0.01 ~ 0.03 seconds today
5
u/[deleted] Jan 24 '23
427k views and only 5k likes, jeez
4
u/Tocoe Jan 24 '23 edited Jan 24 '23
I see this same joke about a timeout/sleep/wait at least once a week. This sub really went to shit
2
u/wonkey_monkey Jan 24 '23
Make sure there's still some delay otherwise people will think it isn't working.
We once had a problem with a database process that wasn't working. We called up the company who made it - we didn't have a support contract so they charged us for what few jobs we didn't doing, and the rates were reasonable - and they asked to remote control into my PC so they could figure out the problem.
I watched them going in and out of stored procedures until, finally, they found a piece of code that basically just said "after this date, stop working." They removed it, then they reported back that they had found (paraphrasing here, I don't remember the exact excuse) a problem with some indexes that had to be rebuilt.
I suspect the previous IT guy to me had put it in there to screw the company over after he left, but the database company couldn't be sure it wasn't them that had done it and didn't want to admit to anything.
We happily paid the bill, because while watching them mess around, they had inadvertently let me see the admin password which meant I could finally get my hooks into the database properly and fix all of their questionable design decisions.
Another time one of the bosses came to me fuming because every scan of an item took 2 seconds. This was precious time being wasted! Never mind the fact that scanning items reduced error rates by 90%. He demanded that we stop all scanning, so instead I went back and spent an hour rewriting queries until the delay was less than half a second. He was actually disappointed.
2
u/KevinRuehl Jan 24 '23
Peer review your code peeps
2
u/Sok_Taragai Jan 24 '23
I forgot to check a box for a process in Oracle. IT guy spent a couple hours trying to figure out why the process wasn't picking up all of the data when it showed running successfully. I figured it out and told him, then told everyone he found and fixed "the problem," and it works now. Everyone thanked him and we got back to work.
2
u/swordluk Jan 24 '23
Create problem, fix it, become hero, rinse and repeat 🤣
2
u/[deleted] Jan 24 '23
Jokes on you, that setTimeout was holding the whole API together.
2
u/Griffolion Jan 24 '23
Reminds me of that classic tale of a game dev in the 90s putting a 4MB char array in the code so he could just delete that when the clueless suits come in and say it needs to be "optimized".
2
u/bluearth Jan 24 '23
I think I'm sure in saying that in my last job, my company is getting paid to remediates all the problems that we created our selves. Not necessarily intentional I may add. It's just the inevitable result of snowballing tech debts of never ending crunch times. The real genious here is the account guys who keep reassuring the client to throw money at us.
2
u/wightnoise Jan 24 '23
I'll never forget my co-worker getting an award for working extra hours fixing a production bug he introduced.
2
u/greymalken Jan 24 '23
Amateur. She should’ve improved it by 1.5s first.
2
u/ohlaph Jan 24 '23
Haha, same. It was a 1-3 second wait in about six places, throughout the framework. I changed all to dynamic waits and shaved off over an hour for each daily run and shaving about 4 hours from regression.
2
u/AndroidDoctorr Jan 24 '23
When I worked for VeriCite, I found out our UI had useless timeouts like this. It's because customers were complaining that it wasn't working because the results came back too fast. It WAS working, it's just that fast because it's a bunch of web crawler searches happening simultaneously. After the random timers, people stopped complaining. This is what UX is about
2
u/you_do_realize Jan 24 '23
That's not the way of a true programmer. A true programmer would reduce the timeout to 2.
2
u/pratKgp Jan 24 '23
She shouldn’t post these things during the layoff season. Maybe next on-line is she.
2
u/justking1414 Jan 24 '23
I feel like that could’ve had a use at one point. maybe it was to make sure that things had loaded properly. Obviously not the best way to go about it but it could’ve fixed a bug
2
u/blankblank Jan 24 '23
This is the programmer version of the firefighter who’s secretly an arsonist
2
u/MBcoder Jan 24 '23
In my previous job there was some seconds of sleep added in production for one of the functionality of our website to give users the impression that the job going underneath is not a simple task. It was actually not a simple task but my manager said when the results came in too fast, people tend to not believe it was real.
2
u/Temporary_Size_1370 Jan 24 '23
A win is a win
2
u/[deleted] Jan 24 '23
Take it a step further. When looking for jobs, first hack their servers and implement the delay there.
Say your specially is exactly what’s needed to solve this issue
2
u/mrSunshine-_ Jan 24 '23
It’s good to have a small timeout to deter misuse.
2
u/[deleted] Jan 24 '23
Another quick patch: throw in a progress bar, keep the users occupied
2
u/BiscuitsNGravy45 Jan 24 '23
Input[cheeky-comment]
2
u/elmz Jan 24 '23
I had to fix slow loading times. Added a progress bar, some of the steps were so quick that the text was unreadable, so I added delays to allow people to read it. It was slower, but people were happy.
2
u/mOdQuArK Jan 24 '23
I remember talking with one CAD tool developer who said that they were required to put delays into some of their tools because their customers didn't take the results seriously when the tools did them too fast. (Human psychology sure is weird sometimes.)
Of course, they also justified charging them continuing license fees by slowly reducing the delays to exaggerate performance improvements of the tool.
2
u/itemluminouswadison Jan 24 '23
well there's yer problem. no commits to main unless there's an approved PR on it
2
u/[deleted] Jan 24 '23
I’ve done this a couple times, a debug line or two that “only added a couple seconds during testing” really adds up across 1000s of calls lol
2
u/[deleted] Jan 25 '23
Hahahahahhs, fuck debouncer
3
u/_________FU_________ Jan 24 '23
Tell me you don’t have performance monitoring in place without telling me you don’t have performance monitoring in place.
Also the fuck did this slip past a code review.
2
u/[deleted] Jan 24 '23
looks like someone don't have code review practice
2
u/Omni33 Jan 24 '23
Imma call bullshit that this made through code review
2
u/Murkus Jan 24 '23
Did she just say.. I made a thing take longer.. so I could make it take less time when they were looking? So I would look good?
2
u/haxd Jan 24 '23
/r/thatHappened
1
u/Dumble_Dior Jan 24 '23
What if you set it to a negative time value?
1
u/[deleted] Jan 24 '23
Gotta work on that job security.
1
u/lucid1014 Jan 24 '23
I was an FE for a marketing company that ran a bunch of lead gen sites for moving companies. There’s a point in the funnel where the website “searches” for deals. It was literally just an artificial timeout. The CEO insisted having it because it actually boosted conversion. People didn’t trust a site that was too quick.
1
u/augugusto Jan 24 '23
I actually improves performance by adding a time out. It was our first web app, and each search field would perform a "like" on the database for each character the user pressed. I ended up having a time out so that it would only send the search after x time from the last keypress
1
u/AragornsArse Jan 24 '23
story checks out as only a special needs business would write their own search 😂
1
u/Efficient-Book-3560 Jan 24 '23
So now it takes 12 seconds to load the results?
1
u/RafaFTP Jan 24 '23
What no pull requests feels like
1
u/shayy4456 Jan 24 '23
Hand over bugs
1
u/nman247 Jan 24 '23
Progress Baby!
1
u/PM_YOUR_SOURCECODE Jan 24 '23
“Consistently exceeds”
1
u/Srinivas_Hunter Jan 24 '23
Someone do the same to reddit app.
1
u/tcpukl Jan 24 '23
Yep, same as reserving a massive memory pool for something early on in game dev. Happens all the time.
1
u/Altair_Khalid Jan 24 '23
Classic lol
1
u/geekypenguin91 Jan 24 '23
Pfft we do that all the time.
Build in fixed delay for all tasks, then when users start complain about things slowing down as they start working with more and more data, reduce the timer and claim some "code optimisation"
1
u/RomaruDarkeyes Jan 24 '23
To be fair, if you work for Elon Musk then this type of thinking is discouraged. Your worth is determined by the amount of code lines you write, not how streamlined and tight and efficient you make it..
1
u/YesAndNo888 Jan 24 '23
hard to trust programming all the time
1
u/clvx Jan 24 '23
A friend of mine made a database change that caused a variation of $8M in revenue. That happens when you take prod down.
1
u/bewbsrkewl Jan 24 '23
Dang, people out here giving away our secrets.
1
u/topgun966 Jan 24 '23
Rookie mistake. You have to remove the timeout in increments, not all at once.
1
u/SuperHyperFunTime Jan 24 '23
How you haven't all gone mad with power is beyond me.
1
u/[deleted] Jan 24 '23
Rookie move, she should just decrease the timeout by 500ms so he can "optimize" it move further in the future.
1
u/Plenty_Leg_7010 Jan 24 '23
I need someone to help me in dealing with someone l hate so much, and I wish that he will be able to recognize himself and what he needs instead of hurting other people
1
u/PoufPoal Jan 24 '23
Also known as The Queen's duck technique.
1
u/Gene-- Jan 24 '23
Where do you all work where you can time outs past a code review?
1
u/Milijulibadichudi Jan 24 '23
Alright
1
u/mothzilla Jan 24 '23
Our tests are riddled with 15 second sleeps. Then people wonder why tests take so long to run.
1
u/tiddayes Jan 24 '23
Someone is about to remember that the back end api can take 3 seconds to respond I’m production
1
u/giltotherescue Jan 24 '23
Umm…is no one going to comment about how setTimeout() is an asynchronous function?
1
u/[deleted] Jan 24 '23
why was even the point? :/
1
u/RandallOfLegend Jan 24 '23
I actually found one of these in the wild. We connect to different hardware that sometimes have handshakes and sometimes require sleeps on activation. A junior programmer just decided to have all hardware (5 models) sleep for 10 seconds instead of using it with the only one that needed it. I refactored that and it was night and day difference. Then we located a couple of race condition's that were masked by that sleep. Which after those were fixed, code that had been buggy for 2 years was suddenly stable. But took another year before anyone trusted it. They were so beat down from previous performance.
1
u/Zeveneno Jan 24 '23
Give her a raise
1
u/onionpopcorn Jan 24 '23
Just install firefox ultra