The Old New Thing

The F*deral Bur*au of Inv*stigations

According to the Chicago Division, Use of the NAME, INITIALS, or SEAL of the F*I is restricted by law and may be used only with written permission of the F*I. Asterisks inserted to avoid being arrested by the F*I for using their name and initials without written permission. (I hope they don't go after me for using their ...

Extending the Internet Explorer context menu

In a comment, Darrell Norton asked for a "View in Mozilla" option for Internet Explorer. You can already do this. Internet Explorer's context menu extension mechanism has been in MSDN for years. Let me show you how you can create this extension yourself. First, create the following registry key: Of course, you need to change C:\...

Callback, the safety newsletter for the aviation community

Yes the "S" in NASA stands for "Space", but don't forget that the "A" stands for "Aeronautics". One of the programs that I (amateur aviation wannabe) find fascinating is the Aviation Safety Reporting System, where pilots can submit anonymous reports of "stupid things I have done" in order to teach other pilots "Don't do what I did...

Do you know when your destructors run? Part 2.

Continuing from yesterday, here's another case where you have to watch your destructors. Yesterday's theme was destructors that run at the wrong time. Today, we're going to see destructors that don't run at all! Assume there's an ObjectLock class which takes a lock in its constructor and releases it in its destructor. Pretty standard ...

Do you know when your destructors run? Part 1.

Larry Osterman discussed the importance of knowing when your global destructors run, but this problem is not exclusive to global objects. You need to take care even with local objects. Consider: Easy as pie. And there's a bug here. When does the destructor for that smart-pointer run? Answer: When the object goes out of scope, which...

Letterboxing: Geocaching without the GPS

Geocaching is sort of like global hide-and-seek (with hints) for technology geeks. I stumbled upon a non-GPS version of this diversion, known as Letterboxing (not to be confused with letterboxed movies, another subject entirely). By the way, if geocaching isn't enough "fun with a GPS" for you, you can try The Degree Confluence ...

Beware the hash reset attack

There are a variety of message digest algorithms out there, MD5 being a particularly popular one. These generate a "message digest" (essentially, a hash) so you can detect whether somebody has tampered with a file, the theory being that it's hard to tamper with a file without changing its hash. But make sure you record the file size as well...