The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
The stroke-count-based sort isn’t random, although it looks that way if you only see it in translation
During the NBC coverage of the opening ceremony of the Beijing Olympics, the announcers more than once said that the teams will not be entering in the normal order, but rather in a random order based on the number of strokes in the team's name as translated into Chinese. This is an odd use of the word random. You might say that at the Athens Olympics, the teams did not enter in the normal order, but rather in a random order based on the collation of the characters in the team's name as translated into Greek. Teams enter the stadium in the collation order customary for the host nation, with the exception that...
What possible use are those extra bits in kernel handles? Part 2: Overcoming limited expressiveness
Last time, we saw how those extra bits can be used to develop safe sentinel values. That is a special case of a more general problem: How do you pack 33 bits of information into a 32-bit value? Whereas last time, we weren't forced into the use of a sentinel value because we could develop a (cumbersome) helper class and switch people over to the helper class (or to pass two parameters to every function that used to take one), there are places where you are forced to try to squeeze 33 bits of information into a 32-bit value, and the helper class simply isn't going to work. (I'm going to assume 32-bit Wi...
What does each country claim for its own?, greatest hits
A little while back, I invited readers to describe what students are taught (or end up believing) are the greatest contributions of their country. Many people strayed from the "what students are taught" part of the exercise, but I didn't mind too much as long as you were funny. Here are some of my favorites: Representing Greece is Pi, who writes, In Greece I was also taught that Greeks invented democracy. Other than that Greeks are supposed to have laid the groundwork for the development of philosophy, mathematics, physics, biology and pretty much every other greek named thing as a science (except for ...
What possible use are those extra bits in kernel handles? Part 1: Sentinels
Kernel handles are always a multiple of four; the bottom two bits are available for applications to use. But why would an application need those bits anyway? The short answer is extending the handle namespace. The long answer will take a few days to play out. (This series was written in response to Igor Levicki being unable to imagine "how this can save anything (in terms of performance)". Then again, who said that it had anything to do with performance? Actually, I'm surprised that my dear readers weren't familiar with the techniques described in this series. Perhaps I shouldn't have written this series and...
DHS: The Television Series – the next chapter
Okay, so first there was the story about the planned DHS television series. And then there was the follow-up reporting that the whole thing was an investment scam and there was no such show after all. Following through on the story, it looks like the ringleader behind the scam has been sentenced to one year in prison and an accomplice to five years probation and $250 a month in restitution. The TV Squad article says retribution, which would be strange if true. But it's not. (Read the announcements of the accomplice's indictment and guilty plea.) At $250 a month, it's going to take a long time to repay the c...
Microspeak: Pencils down
I'm particularly fascinated by Microspeak terms which nobody actually knows the meaning of. You can defend jargon by saying that it's a shorthand way of talking in order to improve communication, but if nobody actually knows what it means, the in order to improve communication part is completely turned on its head. The Microspeak that allegedly allows people to communicate better ends up making them communicate worse. A colleague of mine introduced me to this new type of Microspeak. Our conversation takes place in an impromptu hallway meeting between the development manager and a few members of the team. Tea...
Wedding + two-year-old flower girl = wildcard
I was in San Francisco this weekend for a wedding. The flower girl was the bride's two-year-old niece, and when you add a two-year-old to the wedding party, you never know what's going to happen, because two-year-olds don't understand the world the same way adults do. During the unity candle ceremony, the two-year-old pushed her way to the table, joining the bride and groom, in order to get a front-row seat for the ritual. And then when the unity candle was lit, she tried to blow it out. Because when you're two years old, the only time you see people make a big deal about lighting a candle is when it's ato...
Why was the RAM drive removed from Windows 95?
Commenter Travis Owens asks, "Why was the RAM drive removed from Windows 95?" As with many of these types of accusatory questions, this comes with a false hidden assumption, in this case, that the RAM drive was in Windows 95 to begin with. Remember that Windows 95 introduced a new driver model, so any RAM drive would have had to be written from scratch. (Well, okay, you could use the old 16-bit RAM drive, but then you'd be going through the real-mode mapper, at which point your performance would go down the tubes.) As you admitted, it was a very niche feature that usually hurts but can sometimes h...
Keeping a visit a surprise after people have already guessed that you’re coming
Last year, a friend of mine who lives out of state—let's call her Lisa—wanted to pay her family in Seattle a surprise visit, and I was enlisted as an accomplice. (Specifically, my rôle was to pick her up from the airport and take her home.) Everything was going smoothly until she made the mistake of telling one of another out-of-state relative about her plans. That relative then told a family member in Seattle, "Don't tell anybody, because it's a secret, but Lisa is making a surprise visit next week." And that family member told two more family members, "Don't tell anybody, because it's a secr...