The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

The day Tully's ran out of coffee
Aug 7, 2006
Post comments count 0
Post likes count 0

The day Tully's ran out of coffee

Raymond Chen
Raymond Chen

Today, Tully's coffee shops begin offering free Wi-Fi (in shops where Wi-Fi is available). Tully's isn't as widespread as Starbucks, but it's the best of the major chain coffee shops in the Seattle area, according to a highly unscientific poll of my friends. Seeing Tully's name back in the news reminded me of an incident that occurred to one of my colleagues, who went into the local Tully's one evening and asked for a cup of drip coffee. The Tully's employee went to the pot, then turned around and said, "Actually, we don't have any coffee." My colleague did get a profuse apology from the district manager, who ...

The implementation of anonymous methods in C# and its consequences (part 3)
Aug 4, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 3)

Raymond Chen
Raymond Chen

How local variables are captured.

News Flash: Big houses also cost more to cool
Aug 3, 2006
Post comments count 0
Post likes count 0

News Flash: Big houses also cost more to cool

Raymond Chen
Raymond Chen

Perhaps as a counterpart to the fact that big houses have bigger heating bills, NPR yesterday pointed out that bigger houses use more electricity for cooling. (NPR looks not at the "surprise" of big-house owners over the cost of energy, but rather the consequences of these big houses on the energy grid. But the headline was hard to pass up.)

The implementation of anonymous methods in C# and its consequences (part 2)
Aug 3, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 2)

Raymond Chen
Raymond Chen

When the anonymous class becomes visible.

The implementation of anonymous methods in C# and its consequences (part 1)
Aug 2, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 1)

Raymond Chen
Raymond Chen

First we'll look at how they're implemented.

C# nested classes are like C++ nested classes, not Java inner classes
Aug 1, 2006
Post comments count 0
Post likes count 0

C# nested classes are like C++ nested classes, not Java inner classes

Raymond Chen
Raymond Chen

When you declare a class inside another class, the inner class still acts like a regular class. The nesting controls access and visibility, but not behavior. In other words, all the rules you learned about regular classes also apply to nested classes. The keyword in an instance methods of a class (nested or not) can be used to access members of that class and only those members. It cannot be used to access members of other classes, at least not directly. (And the can be omitted when it would not result in ambiguity.) You create an instance of a class (nested or not) by saying where are the parameters to an...

Christmas gift idea for your favorite glasses-wearing geek
Jul 31, 2006
Post comments count 0
Post likes count 0

Christmas gift idea for your favorite glasses-wearing geek

Raymond Chen
Raymond Chen

Yes, I'm talking about Christmas gifts (or "winter solstice gifts" if you prefer) in July. I'm one of those people for whom buying Christmas gifts is a brain-wracking ordeal, and I'm always on the lookout all year round for the "perfect gift". Last Christmas, a friend of mine gave me a micro-fiber lens-cleaning cloth that comes in a pouch you can attach to a keychain. Example 1. Example 2. (I have no affiliation with those two sites; I just hunted around looking for a picture.) Best gift ever. I use it several times a day. My keychain has only four things on it: The aforementioned cleaning cloth, a ...

Just because I don't write about .NET doesn't mean that I don't like it
Jul 31, 2006
Post comments count 0
Post likes count 0

Just because I don't write about .NET doesn't mean that I don't like it

Raymond Chen
Raymond Chen

Some people have inferred that I don't write about .NET because I don't like it. That's not true. I use it myself. The reason I don't write about .NET is because I'm not an expert on it and there are plenty of other .NET blogs out there, written by people who are actual experts. (Such as Maoni Stephens, whose little finger contains more knowledge about garbage collection than most people have in their entire brain.) No point adding to it with my non-expert view. Indeed, when I hit upon an interesting .NET topic or puzzle, I usually just forward it off to Brad for him to put on his blog. Because people looking ...

The Seattle Monorail has two trains, and they collided
Jul 28, 2006
Post comments count 0
Post likes count 0

The Seattle Monorail has two trains, and they collided

Raymond Chen
Raymond Chen

Murphy's Law vindicated again. The Seattle Monorail has two trains, and last year they managed to collide. To get this to happen was particularly tricky, since the trains run on separate tracks, and there is only one spot on the entire line where a collision could occur—and they found it. You can read about it in this Associated Press article that describes the monorail as a "mile-high, 43-year-old elevated line". Wow, a mile high. Those must've been really long ladders to get people down. It was supposed to resume operation a few weeks ago, but the reopening was delayed due to a glitch in the emergency...