The Old New Thing

$501 for 510g of peanut butter

You can buy 510 grams of peanut butter for only $501. Of course, this is special peanut butter. It must be kept at -20°C. And it is not intended for human consumption. This is peanut butter from the National Institute of Standards and Technology intended for use by food analysis laboratories to calibrate their equipment. For ...

What, going to Sweden *again*?

It appears that I will have an opportunity to visit Sweden during the first week of June. I'll have three days in Uppsala and three days in Lund, with a travel day in between. Now, I've already spent a week and a half in Uppsala, so perhaps I could spend the Uppsala days taking a ferry to Helsinki and back. (And I could visit Denmark ...

What is __purecall?

Both C++ and C# have the concept of virtual functions. These are functions which always invoke the most heavily derived implementation, even if called from a pointer to the base class. However, the two languages differ on the semantics of virtual functions during object construction and destruction. C# objects exist as their final type ...

Why doesn't C# have "const"?

I was going to write about why C# doesn't have "const", but Stan Lippman already discussed this in A Question of Const, so now I don't have to. (And another example of synchronicity: After I wrote up this item and tossed it into the queue, Eric Gunnerson took up the topic as well...

Nobody said it was a democracy

It's proxy season, which means I've been reading through proxy statement after proxy statement. The proxy voting rules for Allstate aren't very democratic. Scroll down to "How votes are counted and discretionary voting authority": The thirteen nominees who receive the most votes will be elected to the open directorships even if they...

Musings on formal and informal address

My entry about Good-Bye, Lenin! appears to have turned into a discussion of formal and informal terms of address in various languages and cultures. Sweden effectively abolished the "du"/"ni" distinction in the 1970's during the so-called "du-reform", getting rid of the formal "ni" and having everybody address each other as "du" - even...

How to retrieve text under the cursor (mouse pointer)

Microsoft Active Accessibilty is the technology that exposes information about objects on the screen to accessibility aids such as screen readers. But that doesn't mean that only screen readers can use it. Here's a program that illustrates the use of Active Accessibility at the most rudimentary level: Reading text. There's much more to ...

News flash: People are fooled by the Onion

Fact-checking? What's fact-checking? I found it on the Internet! Wired News has a story on various people and news agencies being fooled by Onion articles. This used to be news, but now it's so common it may end up relegated to just a counter. "Number of people fooled by Onion articles: n+1...

Cleaner, more elegant, and wrong

Just because you can't see the error path doesn't mean it doesn't exist. Here's a snippet from a book on C# programming, taken from the chapter on how great exceptions are. Notice how much cleaner and more elegant [this] solution is. Cleaner, more elegant, and wrong. Suppose an exception is thrown during CreateIndexes(). The ...