The Old New Thing

The Radioactive Boy Scout is back in the news

The Radioactive Boy Scout appears to be back to his old tricks.¹ Nitpicker's Corner ¹Although this statement is written as if it were a fact, it is actually my interpretation of a newspaper article and is not an official position of Microsoft Corporation...

What are these strange cmp [ecx], ecx instructions doing in my C# code?

When you debug through some managed code at the assembly level, you'll find a whole lot of seemingly pointless instructions that perform a comparison but ignore the result. What's the point of comparing two values if you don't care what the result is? In C++, invoking an instance method on a pointer results in undefined behavior. In other ...

For $15, you can purchase incorrect information, and to prevent people from getting it, you have to renew every three months

Given what I know about Naveen Jain, I basically view everything he does with enormous skepticism.¹ I mean, I trust lawyers more than I trust that guy, that's how bad it is. After being booted from InfoSpace, Jain moved across the street and founded Intelius, a company that does basically the same thing: Selling directory information.&...

C# static constructors are called on demand, not at startup

One of the differences between C++ and C# is when static constructors run. In C++, static constructors are the first thing run in a module, even before the function runs.¹ In C#, however, static constructors don't run until you use the class for the first time. If your static constructor has side effects, you may find yourself ...

SIFF 2007 wrap-up: Grandhotel, The Boss of It All, Vacation

Sorry, SIFF fans, but this article got stuck in the queue. But now it's unstuck. (image) (image) (image) (image) (image) (image) (image) (image) (image) (image) Grandhotel : A sweet story about a shy, innocent, weather-obsessed hotel employee and the even stranger people who surround him. I wasn't quite sure what to expect, but I was quite ...

What is the order of evaluation in C#?

The C and C++ languages leave the order of evaluation generally unspecified aside from specific locations called sequence points. Side effects of operations performed prior to the sequence point are guaranteed visible to operations performed after it.¹ For example, the C comma operator introduces a sequence point. When you write f(), g...

Math is hard, let's go shopp—oops

(The title is another variation on Math is hard, let's go shopping!", which appears to be a popular catchphrase over in Michael Kaplan's neck of the woods. The history of the phrase was researched on Language Log.) Last spring, I was at a local crafts store and paid for a $2.15 item with a $5 bill and two dimes. The teenage salesclerk rang...

Why is the blog's subtitle "Not actually a .NET blog"?

Based on the feedback from my last CLR week, I think one CLR week a year is about right, Welcome to CLR Week 2007. I'll kick off the week with something not actually technical, but which might be puzzling to the newcomers: Why is the blog's subtitle "Not actually a .NET blog"? When I started, the blog hosting site for Microsoft technical ...

Things I've written that have amused other people, Episode 4

One of my colleagues pointed out that my web site is listed in the references section of this whitepaper. It scares me that I'm being used as formal documentation because that is explicitly what this web site isn't. I wrote back, I really need to put a disclaimer on my web site. FOR ENTERTAINMENT PURPOSES ONLY Remember, this is a blog. ...