What algorithm did Windows XP use to choose your initial user picture?
Points and comments are a snapshot, not live.
Windows XP used a one-pass random selection algorithm to choose user pictures, avoiding file system inefficiencies.
Raymond Chen details the algorithm behind Windows XP's initial user picture selection. It uses RtlRandomEx with GetTickCount() as seed and employs reservoir sampling (k=1) for one-pass random selection from the Default Pictures directory. This avoids two-pass counting, handles dynamic file counts, and caps sampling at 100 files to prevent pathological behavior.
What commenters are saying
Commenters discussed the limit of 100 files, with some feeling it was unnecessarily low, though others noted it exceeded default picture counts. Several recalled the Administrator account defaulting to a chess piece picture. A correction pointed out that the algorithm does not check for duplicate pictures across existing users. A meta-debate emerged between those who appreciated the efficiency and those noting Windows has other inefficiencies.