When to use reinterpret_cast<> vs. static_cast<>

The boost developers mailing list recently discussed the differences between reinterpret_cast<> and static_cast<> C++ casting operators.

Windows XP Netbook Backup Options

After a recent problem with my master boot record on my netbook, I decided it was time to make sure I had a backup and recovery option.

Booting the Windows Recovery Console From a USB Drive

This process only worked with Windows XP at the time this article was written. Use these instructions at your own risk.

Mini Roundup of Inexpensive Bible Software

My Acer Aspire One is quickly becoming the only “book” that I carry. To be a complete replacement for books that I like to have around, it was necessary to find some Bible software for it, so here’s a quick wrap up of what I found. I had a few requirements:

How Do You Know If You Have a Hash Collision?

Suppose the following situation: You have two devices, one collecting data and one inserting that data into a database. The two devices are separated over a network connection with individual data messages kept short. Each unit of data that is collected must necessarily have a unique key to bind its pieces together. While it would be possible for the data collector to query the data inserter for a unique key, is it worth the additional complexity? The collector would have to request the key and wait for a time out. If the key is received it is good to go, if not then a retry must occur. The situation is also complicated from the standpoint of the database inserter because it needs to have some way to generate unique keys and deal with keys whose data is never populated. A less complex, and perhaps better, way is for the data collector to have a method of autogenerating its own unique key in a reproduceable way. A one-way hashing algorithm which is a hash of some unique piece of data would work nicely for this. We end up with a series of messages: ` `

When to use #include "" verses #include <>

Different compilers treat the two types of includes:

Soundex Algorithm

Last week I noticed that the MySQL “sounds like” operator uses the soundex algorithm to determine if two words sound alike. The algorithm is English centric and was designed around the time of the time of the 1880 census. It has been used in the US census since 1880 to account for miss or different spellings of family names.

Celeste - Cloud Detection for Hugin

I recently came across the new Celeste code for the Hugin panorama software.

Create a WMI Application - Refined

I recently had the need to be able to query the WMI via WQL (which are very fascinating and helpful technologies, actually) from C++. WQL essentially provides an SQL interface for querying system properties of a running computer.

Creating Bad Code That's Still Great

There are plenty of opinions out there about how to write great code ranging from styles and techniques to code formatting and programming languages. Inevitably when discussing great code someone will say, “But what if you need code right now, and you are willing to sacrifice quality in order to get work done faster?”