Live data from Hacker News

What algorithm did Windows XP use to choose your initial user picture?

devblogs.microsoft.com

51–60 of 166 posts

Re: What algorithm did Windows XP use to choose your initial user picture?

#51

Earlier quoted context omitted.

because you don't know the number of images before running the code so no number to do the mod part

Why wouldn't you know that? It's a set of preloaded stock photos, it's always gonna be the same number.

It’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).

Re: What algorithm did Windows XP use to choose your initial user picture?

#54

Earlier quoted context omitted.

That's a matter of taste, but for many it was the Windows they used first and/or spend the most time on and there's a lot of love for that reason alone. I never used XP all that much, but I always changed the theme to the Windows 2000 look. I really didn't like the default, it looked unprofessional and clunky in my eyes. Upon release XP was also pretty universally mocked as a Fisher Price-like UI. To me Windows 95/NT…

win2k was peak for me. lean, functional, just a pinch of glitter here and there (short fade-ins). it was on par with the amazing stability brought by nt5 kernel. i kinda miss xp at a cultural level since it was a bit the end of that computing culture cycle (after that apple started to dominate and ubuiquitous computing influenced desktop ui)

"after that apple started to dominate"

When did Apple dominate? I'm not trying to hate on Apple here, but there's this weird belief that Apple have had a lead in personal computer OS market share at some point in the last few decades, and it isn't really true since about 1984.

You can argue that they should dominate, but that doesn't seem to have happened.

Re: What algorithm did Windows XP use to choose your initial user picture?

#55

Earlier quoted context omitted.

because you don't know the number of images before running the code so no number to do the mod part

Why wouldn't you know that? It's a set of preloaded stock photos, it's always gonna be the same number.

On 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.

Re: What algorithm did Windows XP use to choose your initial user picture?

#58
post #27

Man, every post from Raymond Chen regarding Windows internals is like a little Xmas. I wonder whether he has to ask someone for permission before publishing this knowledge, though.

I also wonder what his thoughts on “modern Windows” are

[dead]

Re: What algorithm did Windows XP use to choose your initial user picture?

#59
post #50

It's somewhat odd that filesystems don't have a call to tell you how many files are in a folder.

I feel like there would either be too many locks or too much contention on something like /var/log or /tmp if that API was ever exposed to userspace.

Re: What algorithm did Windows XP use to choose your initial user picture?

#60
post #50

It's somewhat odd that filesystems don't have a call to tell you how many files are in a folder.

Either that call would have to do the same (i.e., walking the files and counting), or you'd need some additional metadata in the directory entry to store how many files there are, requiring additional storage accesses for adding and removing files. Adding to that that both FAT32 and NTFS are quite old and had to run on older hardware. Cycles and disk accesses are not free.

On top of that, how often is it necessary to efficiently know the number of files in a directory while at the same time not caring about the files enough to list or display them? This algorithm is a special case where you could use the count of using a bit simpler code that ultimately would have the same file system API calls (since you cannot tell the FS to give you file #37 from that directory, so you'd have to use FindNextFile 37 times anyway, just like the sampling algorithm).

Post reply on HN