Live data from Hacker News

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

devblogs.microsoft.com

111–120 of 157 posts

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

#111

This is a fun example of the cognitive switch you have to employ when first starting to program a computer. It's extremely easy for a human to pick at random one thing from a pile of things: you reach out your hand and grab it, maybe swirling them around on the table first to shuffle the order. For a computer, there's no direct analogy to that. They just can't do it. And the human process is nothing even slightly lik…

I think this article highlights more the importance of understanding system limits in the 1990s versus today. No-one would care to much today if the code review for this feature had “files.count()” or whatever in it, but in the mid 90s that would have been a huge performance red flag because a user would literally hear their hard drive clicking away and see the blinkenlights.

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

#112

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)

I remember Apple products being the realm of graphics designers, videographers, and other art professionals back in the XP days. I thought they went mainstream later, as Windows Vista coincided with the iPhone release.

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

#113

Earlier quoted context omitted.

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.

The mac os x and iphone era dictated UI and UX for a while. I wasn't clear that I wasn't talking about market share.

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

#114
post #111

This is a fun example of the cognitive switch you have to employ when first starting to program a computer. It's extremely easy for a human to pick at random one thing from a pile of things: you reach out your hand and grab it, maybe swirling them around on the table first to shuffle the order. For a computer, there's no direct analogy to that. They just can't do it. And the human process is nothing even slightly lik…

I think this article highlights more the importance of understanding system limits in the 1990s versus today. No-one would care to much today if the code review for this feature had “files.count()” or whatever in it, but in the mid 90s that would have been a huge performance red flag because a user would literally hear their hard drive clicking away and see the blinkenlights.

The problem isn’t counting the files (the algorithm in the article also counts the files), but that if you determine that you want to use the ith file only after counting all files, you have to iterate over the whole directory again (or over expected half of it) to find that file.

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

#115
post #77
post #35

Earlier quoted context omitted.

Ehem... nothing beats the beauty and simplicity of Win 95 :)

Didn't that design appear first in 3.51?

Only if you install the Shell Technology Preview from Microsoft. NT 3.51 came with the classic Win 3.x look and feel as well as Program Manager.

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

#116

But the naive way of doing this also wouldn't really require two passes, right? It would just require more memory because you would first save all file names in an array (stopping at 100), then pick a random one in constant time.

How do you know how big your array has to be in a single pass? I don't think the WinXP source uses vectors or similarly ergonomic auto-growing arrays. You could preallocate an array big enough for 100 paths of length MAX_PATH, but that's a bit wasteful. And it doesn't sound like you'd actually end up with fewer lines of code (in that flavor of C++, in python it would be different)

Yes, you could allocate it on the stack. I think back then (still?) a filename could be at most 260 characters, each encoded with 16 bits, so about 52k of stack allocation.

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

#117
post #8

A couple of screenshots would've been useful for the post-millennial generations that never got to see the "beauty" (cough) of XP.

XP is Microsoft's prettiest OS by far.

That’s Vista. And there’s no contest whatsoever. They’ve never been able to again achieve the perfect balance of elegance and functionality that Vista’s UI had.

Its Vista. Like it or hate it. It’s Vista

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

#118
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.

It's been many years since I talked to him, but he's an extremely by-the-book guy, so I'm sure he has a process for clearing everything he writes. His reputation does probably provide him a lot of leeway, though. He also has a queue of oldnewthing articles about a mile long and we could probably get years' worth of articles after his death if they let them run.

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

#119

Earlier quoted context omitted.

How do you know how big your array has to be in a single pass? I don't think the WinXP source uses vectors or similarly ergonomic auto-growing arrays. You could preallocate an array big enough for 100 paths of length MAX_PATH, but that's a bit wasteful. And it doesn't sound like you'd actually end up with fewer lines of code (in that flavor of C++, in python it would be different)

Yes, you could allocate it on the stack. I think back then (still?) a filename could be at most 260 characters, each encoded with 16 bits, so about 52k of stack allocation.

52k on the stack is pretty significant, given Windows defaults to just 1MB stack size per thread

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

#120
post #114
post #111

Earlier quoted context omitted.

I think this article highlights more the importance of understanding system limits in the 1990s versus today. No-one would care to much today if the code review for this feature had “files.count()” or whatever in it, but in the mid 90s that would have been a huge performance red flag because a user would literally hear their hard drive clicking away and see the blinkenlights.

The problem isn’t counting the files (the algorithm in the article also counts the files), but that if you determine that you want to use the i th file only after counting all files, you have to iterate over the whole directory again (or over expected half of it) to find that file.

The mechanism is interesting, but I'm not fully understanding the importance. We say it was done this way because a user would appreciate the speedup. The difference is one traversal versus expected one and one-half traversals. How slow was this traversal at the time for this difference to be significant?
Post reply on HN