A Problematic Place
https://thedailywtf.com/articles/a-problematic-place [thedailywtf.com]
2018-05-10 16:24
This code does some processing on a list of directories. Apparently while coding this, the author found themself in a “problematic place”. We all have our ways of avoiding problematic places, but this programmer decided the best way was to introduce some randomness into the equation. By randomizing the order of the list, they seem to have completely mitigated… well, it’s not entirely clear what they’ve mitigated.
This actually seems like it may be a reasonable fix to a poorly identified problem. Too many processes opening files in the same order? Lock contention?