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”.

7

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 Active Accessibility…

23

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. try { AccessDatabase accessDb = new AccessDatabase(); accessDb.GenerateDatabase(); } catch (Exception e) { // Inspect caught exception } public void GenerateDatabase() { CreatePhysicalDatabase(); CreateTables();…

84

NFL cracks down on grandstanding

The National (US) Football League adopted a 15-yard penalty for pre-planned celebrations, such as last year’s “phone call from the end zone” or 2002’s “autographed football”. Apparently, the existing monetary fines weren’t having much of an effect on players with multi-million-dollar contracts. (Surprised?) So now the league is going to hit them where it hurts:…

11

Good-Bye, Lenin!

This weekend I saw Good-Bye, Lenin!, a German movie about a young man who must pretend that East Germany still exists, for the sake of his mother who was in a coma during the fall of the Berlin Wall and therefore remains unaware of the earth-shattering changes the took place while she was unconscious. There…

30

Why the compiler can’t autoconvert foreach to for

People have discovered that the “natural” C# loop construct ArrayList list = …; foreach (Object o in list) { … do something with o … } is fractionally slower than the corresponding manual loop: ArrayList list = …; for (int i = 0; i < list.Length; i++) { Object o = list[i]; … do something…

11

Beethoven as ambient music

Who knew that Beethoven wrote ambient music? The people at NOTAM took Beethoven’s 9th Symphony and slowed it down so that the entire performance takes 24 hours. It’s actually quite nice to listen to. (I like 2.1 myself.) [Rats, scooped by MetaFilter. Honest, it was in my queue! Nobody will believe me; they’ll think I…

7

Why can’t the system hibernate just one process?

Windows lets you hibernate the entire machine, but why can’t it hibernate just one process? Record the state of the process and then resume it later. Because there is state in the system that is not part of the process. For example, suppose your program has taken a mutex, and then it gets process-hibernated. Oops,…

48

WM_KILLFOCUS is the wrong time to do field validation

“I’ll do my field validation when I get a WM_KILLFOCUS message.” This is wrong for multiple reasons. First, you may not get your focus loss message until it’s too late. Consider a dialog box with an edit control and an OK button. The edit control validates its contents on receipt of the WM_KILLFOCUS message. Suppose…

31