4 ms·
Why they made it that complex? A simple rand/mod based on first character of username should be sufficient?
by KellyCriterion 24d ago
Why they made it that complex?
A simple rand/mod based on first character of username should be sufficient?
- lentil_soup 24d agobecause you don't know the number of images before running the code so no number to do the mod part
- moffkalast 24d agoWhy wouldn't you know that? It's a set of preloaded stock photos, it's always gonna be the same number.
- consp 24d agoAt compile time of when the pr department decided to change it?
- herywort 24d ago> As a final safety check, the code stops after sampling 100 pictures. This avoids pathological behavior if somebody puts a million files in the Default Pictures directory
- bombcar 24d agoIt’s a directory. You could add pictures to it, and we did in our image layout (mainly for fun, but they wanted the logo as one).
- elgertam 24d agoOn initial install, sure. But user accounts can also be created at arbitrary times. The user may have changed the set of photos in the intervening time and might even be editing the directory during profile creation.
- throwaway219450 23d agoI thought the same thing, and then wondered if this must be an enterprise problem, because what home user adds loads of icons - so many that IO becomes a concern - and also wants them to be randomly assigned to other family members? But then it occurred to me that XP was of an era when you would absolutely spend an afternoon downloading some megapack of 10000 cool user icons.
- nkrisc 24d agoSo users Adam, Anne and Archie all have the same profile image?
- KellyCriterion 24d agoOK - then use the first two characters :-D
- sltkr 23d agoSo Adam, Adele, and Adrian all have the same profile image?
- KellyCriterion 23d agoThe the thing is:Most Adams/Adeles/Adrians wouldnt even notice
- stephenlf 24d agoHow is that simpler?
- KellyCriterion 24d agobecause its a built-in one-liner call then?