The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Not beany enough
The other night, I was playing a friendly game of Scrabble®, and I managed to play BEANIER* (meaning "with a stronger flavor of beans") onto a triple-word score, crossing the B with an open Y, scoring over 100 points in the process. This sufficiently demoralized the other players that the game turned into "play anything that vaguely resembles a word, with creative spelling encouraged." It turns out that BEANIER* is not listed in the online versions of the SOWPODS or TWL Scrabble word lists, although I made the move in good faith. If the others had thought to challenge, they would've succeeded. My ...
SHCIDS_CANONICALONLY is the moral equivalent in the shell namespace of the Unicode ordinal comparison
One of the flags you can pass to the method is . This flag means that the method should determine whether the two pointers refer to the same underlying object, and if they do not, then it should determine which one should come first by whatever mechanism it wants. It doesn't matter which one is declared as coming before the other one, as long as it is consistent. I like to think of this as the moral equivalent of the Unicode ordinal comparison. In both cases, you use the comparison if you have two items that you wish to keep in sorted order, but you don't care what the ordering rules are, as long as they are...
The great thing about regular expression engines is that there are so many to choose from
Back in the days before perl ruled the earth, regular expressions were one of those weird niche features, one of those things that everybody reimplements when they need it. If you look at the old unix tools, you'll see that even then, there were three different regular expression engines with different syntax. You had , , and . Probably more. The regular expression language supported character classes, the dot wildcard, the asterisk operator, the start and end anchors, and grouping. No plus operator, no question mark, no alternation, no repetition counts. The program added support for plus, question mark, and ...
Searching for Evil: Spot the scam
Security researcher Ross Anderson gives a talk on how a search engine can be used to shed light on the various evils that lurk on the Web. It starts off slow, but picks up when he gets to the "Can you spot the scam?" game that he plays with each Web site. (If you're in a hurry, skip ahead to a little past the 20 minute mark.)
How do you drop on the background of an Explorer window when it is in details view?
When you set your Explorer to Details view, it can become tricky to drop an item onto the window background (in order to move it into the folder) because Details view sets full row select (starting in Windows Vista). This helps users of tablets and touch screens, because it increases the size of the target when dragging and dropping into a folder. On the other hand, when you have more items than fit on the screen, every pixel in the view corresponds to an item; there is no background any more. So how do you drop on the background? If you're using Windows 7, you can take advantage of a little gutter spa...
Programming means that sometimes you have to snap two blocks together
Part of the challenge of programming (and for some people, the reason why programming is fun in the first place) is looking at the building blocks provided to you and deciding how to assemble them to build something new. After all, if everything you wanted a program to do already existed ready-made, it wouldn't be called programming any more. It would be called shopping. Is there an API or a quick way to find out which window the mouse is in? I replied, "The LEGO Group does not make a piece for every possible object. Sometimes you just have to take two LEGO blocks and click them together. Here are some interes...
A burglar tells you the best place to hide your money
Jeffrey Strain chats with a former burglar and learns the best place to hide money. ("The bank," responds the former burglar. Oh, the best place to hide money in the house...) A month later, the follow-up article discussed the worst places to hide money (that sound like good ideas but aren't).
When giving a presentation with a diagram, pretend the diagram doesn't exist
::Wendy:: suggested enabling a means of displaying pictures on the blog without messing up the display of the whole post. Actually, I've simply given up on the pretty diagrams since everybody seems to hate them. You may have noticed that I've been using ASCII art instead. It's certainly easier for me to write, though it's also a bit uglier. One thing readers may not have noticed is that I try to make the article readable even without any diagrams or pictures at all. Sure, you can look at the diagrams if you want, but the article should still make sense if you don't. (And if the image is essential, I'll at lea...
How organizations inadvertently confirm facts when they try not to
On the Media in its story "Fact? Check!" forwarded the revelation (uncovered by the PBS program Frontline in the first part of their "News War" series) that the fact that the United States Justice Department launches a leak investigation implicitly confirms the leak! That's because one of the prerequisites for a leak investigation is that the leaked information actually be true. Lowell Bergman: The information has to be accurate? Dave Szady: Yes. Lowell Bergman: So when the government announces a leak investigation and it comes to your office, it's confirming that the report in the newspaper, for example...