I am usually good about adding jitter on retry timers. I think this is necessary so we don’t run into a situation where if server fails due to concurrent clients at one time, we don’t coordinate retries at the same time to exacerbate the problem.
But hadn’t thought about it from the context of background threads and process startups. I have usually seen backgrounds threads doing everything from contacting the server to populate some cache, refresh some system token before expiry, cleaning up some cache etc....
I read hacker news and a fairly common upvoted topic is how software engineering interview is really bad. It doesn’t measure anything and everyone knows that performance on leetcode style interview is not an indicator of job performance. I got promoted recently and it is quite possible that in the near future I will be asked to interview candidates. So have been thinking about this.
Seems to me that people criticizing are in charge and are still asking the leetcode style questions?...
TLDR If you can avoid code where an if else flag variable differ by a single bit, do it.
Or at least make sure that your code is better at error handling. The following is a hypothetical situation that didn’t happen anywhere and caused no live sites.
Details The code was similar to
if (str[0] == '0') do_part1(str[1:]) else if (str[0] == '1'): do_part2(str[1:]) else: do_error_handling() If you think ‘0’ and ‘1’ are icky, replace it with an enum flag....