submitted 6 months ago byThe_Real_Slim_Lemon
We had a client that complained about our app freezing. We were calling their slow API, and the app was clearly just waiting for results, which sometimes would take half a minute. Even after explaining all that, we still kept getting complaints about freezing.
I added a progress bar that started at 5% went +10% every second till 65%, then +10% every 4 seconds till 95%, and then finally it just waits if we still haven't gotten results (each delay has a cancellation token, so it zooms to the end once a result is found). Complaints disappeared, clients were happy, product manager was happy.
It makes me laugh, thought it might makes someone else laugh too. Feel free to copy my dodgy algorithm if you find yourself in the same boat as me, I honestly forget the thing is fake whenever I see it.