4 ms·
There was some inscrutable code that had sleep 10 [seconds] in the middle. It took several hours to figure it out, but the sleep was there in case a file had n
by csours 3y ago
There was some inscrutable code that had sleep 10 [seconds] in the middle.
It took several hours to figure it out, but the sleep was there in case a file had not finished downloading
- eschneider 3y agoshudder
- scubbo 3y agoI see your "wait for a file to finish downloading", and raise you a "wait before responding because, for one of our clients, if the latency is below a certain threshold, it will assume that the response was a failure and will discard it". That was a fun codebase.
- PlunderBunny 3y agoBack in the 90s, we were trying to debug a crash on a customer’s site (using the then miraculous pcAnywhere). We couldn’t figure it out, and in desperation sent a developer that lived in the same country to observe ‘live’. As soon as he watched us reproduce it, he said “the modem was still disconnecting” - he could hear it, and we couldn’t. The solution, of course, was a sleep statement.