Geek: unexpectedly difficult... Every once in a while I've come across a problem that turns out to be far more difficult than it first appears. Most recently this happened to me with the need to produce GUIDs. I accidentally observed a GUID collision (that is, identical GUIDs being generated multiple times) in the system I was working on (which shall remain unnamed). That's the sort of thing that just isn't supposed to happen, so it got my attention. I tracked down the source of the collision by examining the algorithm used. It turns out that collisions were happening when multiple processes with identical GUID generators were being run on the same server – as we were doing in our datacenter, with some servers having over a hundred such processes. Under those conditions, collisions were likely to happen several times a day – very bad indeed. Fixing that was challenging, especially fixing it in a performant way.
This morning I stumbled across a discussion about another such problem: uniformly distributing random floats in [0,1] given a source of random bits. I knew, vaguely, that it wasn't exactly trivial – but it's definitely more challenging than I'd have guessed!