The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

How air conditioning revolutionized competitive bicycling
Jan 19, 2006
Post comments count 0
Post likes count 0

How air conditioning revolutionized competitive bicycling

Raymond Chen
Raymond Chen

I'm not really interested in sports. Teams, standings, scores, who got traded to what team, none of that is interesting to me. What I am interested in, however, is "meta-sports": The business of sports, the technology of sports, the evolution of techniques, changes in the rules, that sort of thing. That's one of the reasons I'm a fan of the radio program Only a Game. (The other, more important, reason can be summed up in two words: Charlie Pierce.) All that is a rather lengthy lead-in to Transition Game, Nick Schulz's look at the world behind sports. He covers what it is about sports that I like, with none of...

The cost of trying too hard: String searching
Jan 19, 2006
Post comments count 0
Post likes count 0

The cost of trying too hard: String searching

Raymond Chen
Raymond Chen

There are many algorithms for fast string searching, but the running of a string search is inherently O(n), where n is the length of the string being searched: If m is the length of the string being searched for (which I will call the "target string"), then any algorithm that accesses fewer than n/m elements of the string being searched will have a gap of m unaccessed elements, which is enough room to hide the target string. More advanced string searching algorithms can take advantage of characteristics of the target string, but in the general case, where the target string is of moderate size and ...

From Doom to Gloom: The story of a video game
Jan 18, 2006
Post comments count 0
Post likes count 0

From Doom to Gloom: The story of a video game

Raymond Chen
Raymond Chen

NPR's Morning Edition developed a series on the subject of flops, and one of their segments was devoted to the rise and fall of John Romero. You can read more about the phenomenon known as Daikatana in a huge series on Gamespot. Set aside at least an hour if you choose to read it. You can also read the Dallas Observer story that opened the floodgates.

The cost of trying too hard: Splay trees
Jan 18, 2006
Post comments count 0
Post likes count 0

The cost of trying too hard: Splay trees

Raymond Chen
Raymond Chen

Often, it doesn't pay off to be too clever. Back in the 1980's, I'm told the file system group was working out what in-memory data structures to use to represent the contents of a directory so that looking up a file by name was fast. One of the experiments they tried was the splay tree. Splay trees were developed in 1985 by Sleator and Tarjan as a form of self-rebalancing tree that provides O(log n) amortized cost for locating an item in the tree, where n is the number of items in the tree. (Amortized costing means roughly that the cost of M operations is O(M log n). The cost of an individual opera...

ReadProcessMemory is not a preferred IPC mechanism
Jan 17, 2006
Post comments count 0
Post likes count 0

ReadProcessMemory is not a preferred IPC mechanism

Raymond Chen
Raymond Chen

Many limitations, some with security implications.

At least there's a funny side to spam
Jan 16, 2006
Post comments count 0
Post likes count 0

At least there's a funny side to spam

Raymond Chen
Raymond Chen

Poorly-drawn cartoons inspired by actual spam subject lines! It's pretty much what the title says. Don't forget to read the fan mail. Sometimes it's even funny.

Understanding what things mean in context: Dispatch interfaces
Jan 16, 2006
Post comments count 0
Post likes count 0

Understanding what things mean in context: Dispatch interfaces

Raymond Chen
Raymond Chen

Remember that you have to understand what things mean in context. For example, the IActiveMovie3 interface has a method called get_MediaPlayer. If you come into this method without any context, you might expect it to return a pointer to an IMediaPlayer interface, yet the header file says that it returns a pointer to an IDispatch interface instead. If you look at the bigger picture, you'll see why this makes sense. IActiveMovie3 is an IDispatch interface. As you well know, the IDispatch interface's target audience is scripting languages, primarily classic Visual Basic (and to a lesser degree, JScript). Classic Vi...

France, she is, how you say, on sale!
Jan 13, 2006
Post comments count 0
Post likes count 0

France, she is, how you say, on sale!

Raymond Chen
Raymond Chen

Marketplace reports on the start of the winter sale season in France. By law, retailers are permitted sales only twice a year, so the onset of sale season generates quite a bit of shopping madness. There is also a proposal to allow more sale periods, but opponents argue that doing so would harm smaller businesses. Coming from the land of sale fatigue (we just emerged from the after-Christmas sale season and are entering the Winter White Sale season, after which comes the President's Day season...), I find a certain appeal to the idea of limiting how often things can "go on sale". Who can forget the oriental rug...

Why do words beginning with "home" get treated as URLs?
Jan 13, 2006
Post comments count 0
Post likes count 0

Why do words beginning with "home" get treated as URLs?

Raymond Chen
Raymond Chen

Vitaly from the Suggestion Box asked (with grammatical editing), Could you explain why Windows starts the web browser if the file name passed to ShellExecute starts with "home". First thing to note is that this URL-ization happens only after the function has tried all the other possible interpretations. If a file named "homestar" is found in the current directory or on the PATH or in the App Paths, then that file will be chosen, as you would expect. Only when the function is about to give up does it try to "do what you mean". What you're seeing is autocorrection kicking in yet again. If you go to , you ...