Coding Horror

programming and human factors

Barcodes and QR Codes

I recently purchased a USB CueCat from eBay to play around with UPC barcodes, which I found out about from comments posted in a Scott Hanselman blog entry. It's fun to run around the house scanning in UPCs from household items, although the low-powered LED reader in the CueCat definitely pales in comparison to the industrial laser readers you'll find at your local supermarket. Still, you can't beat it for $15, and the PS2 version can be had for even less. If you're wondering why exactly you would want to do this, check out Delicious Library (review). Like so many things Apple, it's self-consciously cute where it should be practical, but the concept is sound.

I saw a reference in Ned Batchelder's blog to UPCs on steroids: something called QRCode. QRCode is designed to be "scanned" via cell phone cameras, and it's the most information-dense 2d bar code format currently available:

  • 7,089 numeric characters
  • 4,296 alphanumeric characters
  • 2,953 bytes
  • 1,817 Kanji
You can generate your own QRCode using a web-based tool, but it doesn't appear to work for the larger texts that I tried. There's a small windows app which is unfortunately entirely in Japanese, but it's superior to the web-based tool. Here's a small animated movie* of it in action. It's interesting to watch the data shift around and resize itself as more and more is added. Note the fixed reference points in the data as well, for camera orientation.

Movie of QRCode generation

It's a shame American cell phones and American advertisers haven't adopted QRCode. However, it may be a preview of things to come as cameras become a standard feature of cell phones.

* If you have Windows Media Player 9 or higher, you can view the WMP9 movie version of this app capture, which uses the screen capture codec introduced in WMP9: it's 50% smaller than the animated GIF and offers higher quality too!

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: https://infosec.exchange/@codinghorror