| What algorithm did Windows XP use to choose your initial user picture?(devblogs.microsoft.com) | |
| 351 points by soheilpro 1 day ago | 175 comments | |
tl;dr: Windows XP picked your initial user picture using reservoir sampling (k=1) over the Default Pictures directory, seeded by GetTickCount() via RtlRandomEx. This one-pass approach avoids a second file-system enumeration and handles directory changes mid-iteration gracefully. A safety cap stops sampling after 100 files to prevent pathological slowdowns. | |
HN Discussion:
| |