Why You Should Love QR Code, A Tale of Stickers, Bits & Freight Trains

by Ben on April 21, 2010

My barcodes bring all the…

Everyone knows about barcodes. Little stickers, white background, black vertical lines. They are information tattoos applied to nearly every product, and nearly every thing in our lives. Walk in to a store, you pick something up, the clerk passes the barcode over the scanner, bleep bloop there’s your total, pay up sucker. We peel them off, most times poorly, leaving a sticky mark behind. It’s quite a magical little thing we take for granted every day. What we’re dealing with is modern day symbology, no surprise there. But barcodes are so linear, physically and informational. We needed something better.

Patented Potables

A quick history lesson. Most people refer to them as UPC codes (redundant statement, ho!) or just barcodes. Since the 1930s people have been thinking hard about how to track merchandise. In 1932, Wallace Flint, a Harvard business student came up with a thesis paper on an automated grocery system. His system used punchcards, and flow racks which would automatically dispense the item (gigantic vending machine!). Resolved to continue his lust for punch cards, his master’s thesis was about a system in which a customer would choose punch hole cards where each card represented a product in the store. Sadly this didn’t catch on, but boy was he on the right track.

The modern day barcode dates back to 1949, and was developed by Norman Joseph Woodland, a graduate student and teacher at the Drexel Institute of Technology. A fellow student by the name of Bernard Silver mentioned to Woodland about how the university was conducting research in to an automated system to receive product information at the checkout. Woodland thought about Morse code, and how the two ideas were a perfect unison of dots and dashes to communicate information electronically. At first Woodland just took the dots and dashes and extended them downward as lines. The result was what we see today; a group of thin bars (dots) and thicker bars (dashes) representing some sort of serial number.

Given that most technological marvels have been invented through the combination of technologies, Silver and Woodland took the work of David Morse (telegraphy) and Le De Forest (movie soundtrack system). On October 20th, 1949, these two filed a patent for a “Classifying Apparatus and Method.” Their magic solution was a combining an oscilloscope (seriously these things have no end of coolness throughout science) to a very sensitive RCA tube. By moving the barcode side to side, images were created on the oscilloscope’s dial and behold we have the first machine capable of reading printed material. They did most of this research working for IBM, except IBM refused to fund the patent for proper research. Eventually RCA picked up the patent, but Woodland abandoned his efforts out of the fact his research didn’t exactly equate well to a real-world setup.

During the 1960s, the Sylvania Company had a problem with the ever increasing complexity of the railway system developing across the United States. Fortunately they had a chap named David J Collins on board. He knew he needed a method of labelling each freight car with a special code to identify it, and it needed to be able to be read electronically. Collins developed a modified version of the Woodland-Silver barcode, using a different set of colours of phosphorescent inks that could be read by a new light emitting system — the laser beam. One of the reasons he used the laser beam was due to its inherent error correcting feature. A laser would zip across the label hundreds of times per second, allowing it to sort out scratched or smudged codes. A true success, Collins realized he could apply this to the ever present grocery store scenario. They refused, and Collins quit.

The big idea here is that Collins found an actual real world case for the Woodland-Silver barcode, and in such a way that it was technologically smart (error correcting). Unfortunately for Collins, RCA still owned the patents of that idea, and so RCA began a research project in the early 1970s aimed at the grocery industry. The difference here is the engineers needed to work on a system capable of reading barcodes from various distances and angles. RCA eventually redesigned the straight-line system in to circles, and they named it the “bulls-eye code.” IBM by this stage got all frothy in the mouth at competition, and asked Woodland (who was still at RCA since the patent fiasco 20 years before) to research the straight-line system again. In the end, an IBM employee named George J. Laurer, completed the final work on this bar code system, and it comes as no major surprise as to who got their name on that patent.

On April 3rd, 1973, the IBM straight-line design was officially adopted by the grocery store industry. Later it was named the Universal Product Code, or UPC. The first UPC marked item ever scanned at a retail checkout (Marsh’s Supermarket in Troy, Ohio) was at 8:01am on June 26, 1974. It was a 10-pack of Wrigley’s Juicy Fruit chewing gum. The Smithsonian Museum now cares for that pack of gum.

By the 80s everyone was all over this stuff. Everyone finally clued in to the fact that a little bar code could help catalog and organize anything it was stuck to.

A Smidge of Geekification

UPC specifically encodes 12 decimal digits in to a bit pattern. A bit pattern is a fancy way of saying there’s a bunch of binary digits arranged in a sequence. The bit pattern for each numeral is designed to be as little like the others as possible, and to provide no more than four consecutive 1s or 0s in order (Laurer was a smart guy). This is done for reliability in scanning in combination with the fact lasers were becoming smaller (and cooler, like those crazy spinning mirrored ones at the grocery store). Eventually Europe had to get involved, and everyone agreed upon a new standard called EAN-13. The EAN-13 barcode (originally named the “European Article Number” it is now renamed as the ”International Article Number” even though the EAN abbreviation has been retained; one of those don’t ask situations I suppose) is a barcoding standard which is a superset of the original 12-digit UPC system. The real reason was this allowed for the 0th bit to be used as a country code identifier. This is what you see most often in retail stores these days. Keep in mind this has nothing to do with where the merchandise was made, but rather where it should be sold.

UPC-A with 11 digits (data: 12345678900)

EAN-13 with 12 digits (data: 123456789000), notice the grouping (left and right) consist of 6 digits, and not 5. Magical I know.

Because of how pervasive the UPC marking is, things like DVDs & CDs have suddenly started to be organized better because of software packages supporting the use of a camera to do the scanning (and cheap USB scanners like the famous CueCat) . From there the software takes over, figures out what the heck you’re scanning, and pulls down all sorts of information from covers to Amazon links. For OSX, there is a brilliant software package called Delicious Library. For Windows there is one called DVD Profiler. Both do the same thing. Type in the numbers (or scan the UPC bar), and the software runs off, grabs all sorts of information and puts it in to a local database. I can finally stop buying The Shawshank Redemption over and over again. Fantastic. Fun. Exciting! Even the US military bar coded everything in the early 80s. Asset tracking! What a novel idea.

The standing issue here is that barcodes are getting old. They won’t be disappearing any time soon, but boy are there some cooler alternatives out there.

2D Means 2Awesome (Ok, so that was a stretch)

During the 1990s we started to see a new type of code being developed. The Data Matrix. Sounds cool. And it is! The big idea is we can use a bunch of pixels, with the increasingly sophisticated cameras being developed, to make a 2D matrix of information.

Now that we have X and Y, we can make little squares of pixels. Two borders of the Data Matrix, made in to an L shape, allow us to locate and orient the symbol. Just like how the UPC laser needs to “cut across” the bars, the same principle of orientation needs to apply to these boxes. The stuff inside this shape is called the Timing Pattern, where Black is on (“1″) and White/empty is off (“0″). The Timing Pattern also lets us figure out how many rows and columns we have. As more data is encoded, the number of cells (rows & columns) would increase. Then there’s a bunch of error correction thrown in, and I’ll be up front in saying it’s really boring stuff as to how that works. Usual data size is from a few bytes up to 2 kilobytes (so 8×8 up to 144×144). What’s even cooler is it can encode up to 3,116 characters from the entire ASCII character set (with extensions)!

Data Matrix encoding the word “example”. Notice how the X & Y axis are “black lines”; that’s the orientation component.

The real power of the Data Matrix was quickly used for various commercial applications. You could make a little square as small as 300 micrometres, all the way up to 1-metre sized squares painted on the top of freight cars. The only limitation is how good (or how big) the scanning equipment is. Yet you’d still have all that data storage for anything you wanted to stored inside the symbol. Versatile & useful? Wow!

Unfortunately patents rear up again and all sorts of weirdness happened. The short story here is there’s a bunch of companies all squabbling over this, and in one case a company decided to demand licensing fees. Oops. It’s still being sorted out even thought it’s been nearly 20 years. Oh patents, will you ever stop being so fun!

What can MaxiCode do for you?

We haven’t even touched on barcodes used by post offices, and shipping companies, most of whom use their own variations, although based off of some standard out there. UPS uses MaxiCode, a densely packed 2d code with a bullseye. The bullseye in the middle, incidentally, allows for automatic symbol location regardless of orientation — incredibly important on high speed conveyer belt systems. 93 characters of information can be used, which back in 1992 when it was adopted by UPS, was a mega huge storage facility of information. Plus you can add 8 of these symbols together in a ‘string of glyphs’ so to speak.

MaxiCode encoding the phrase “It’s MaxiCode”. This is a high DPI version.

The same information as above, only using a low DPI version. Terrible quality I know — BUT that’s where error correction is useful.

FedEx has been using Code 128 symbol for its FedEx Ground bar code strategy. The silly part is, even though it’s officially UCC/EAN Code 128 (with a variant in the shipping industry called GS1-128), it is referred to as the “96″ bar code because it always begins with a “96″. FedEx breaks down the full allotment of characters in to various groupings from package class, to the package number, and a bevy of other important information. It is decidedly less cool than having a bullseye like UPS.

GS1-128. FedEx was feeling left out :(

Semacode, Exclamation Point

Along came the web. Suddenly we needed a way to quickly convey URLs. It’s all about marketing, finding a quick route to get people to your site. You have a vast advertising opportunity called cities. The Semacode is a visual code that – based on the DataMatrix norm ISO/IEC 16022 – codes character strings.

So it’s really DataMatrix, just in disguise, with a focus on encoding internet URLs. The other big reason why it’s so cool is because it’s fully open source, and it’s all about non-commercial use. Plus it’s Canadian. Semacode is in all sorts of interesting places once you start looking. Multilingual museum exhibits have been exploring their use with mobile phone users to allow them to be directed to the correct language explanation of the piece they are admiring. Name tags at conferences use Semacode to embed URLs to a person’s contact vcard. Did I mention they are from Waterloo, Ontario, Canada?

Semacode with the URL of coresite.org!

Semacode with the phone number of (555)867-5309. The decoding software would allow you to either open up the web site URL, or call the number. Well that’s the idea anyway.

Some folks even took the time to make a Semacode in a wheat field in Germany. This was done in the sake of art & technology to have it show up on Google Earth when the satellite zipped overhead snapping pictures.

Semacode, Wheat field version.

The message? “Hello, World!” of course.

QR Code, the coolest of them all

Enter in QR Code. This is a curious little creature I’m sure you’ve seen. If you haven’t, you will soon. Mobile phone companies in Japan/Asia have been all over this for years. It’s slowly started to be adopted here. If you own a BlackBerry and you’ve ever used their BlackBerry Messenger, and specifically sent or received a contact, you actually saw & used a QR Code. Android has also followed suit, using it for many of their products and in their marketing campaigns.

QR Code is still a 2d data matrix. It’s still square, but it has been solely designed to have a Quick Response — or in layman’s terms, it’s intended to be decoded at high speed. High speed is good, because mobile phones aren’t all equal, especially when it comes to computing power. It’s easy to hold a phone camera up to a QR code, take the photo, and some little bit of software (either in the OS, or as a standalone application) quickly decodes the symbol. It has error correction in case you have a terrible phone camera, *BUT* the real winning aspect is the symbol can hold up to 4,296 characters. The more information you put in, the bigger the QR Code would get.

QR Code with the encoded phrase of “QR Code example”.

Combined with the speed decoding aspect, and wicked good error correction, QR Code has huge storage capacity. I think that’s why it will edge out Semacode.

2D Matrices as Art

A while back, some fellow made these little patches under the name of p8t.ch. You can buy them from the Maker’s Marketplace. The idea is to encode a little tidbit of information (a redirector that lives on p8t.ch’s site) that you can adjust over the coming years. Sew it on to your jacket, or backpack, and let people find you, or perhaps embed a URL to a little piece of art. Or get Rick Rolled! Each patch this fellow makes is unique as is the associated URL (he’s using a redirector system that he explains on his site). I also believe there are different features to the patch. Very cool, especially for the super geek warrior.

More curiously is QR Code’s integration with urban art. The largest ever Open Air QR Code Art Project has been opened for 2010 Landesgartenschau (State Garden Festival) in Hemer, North Germany. The artist behind this, Frank Haase, explains part of his integration of QR Codes in to his art:

In some cases the codes in the paintings contain text messages, in some cases there are links to websites which show graphics or animations. So the buyer gets a static painting for the wall and also a dynamic and digital part of the work of art for the cell phone. As owner of the linked websites I can modify the content from time to time so that the owner of the painting gets digital surprises.
(http://2d-code.co.uk/frank-haase-qr-code-paintings/#comment-873)

To me, QR Code has its own elegance of design and artistry that tastefully encodes information. This bridges a secondary texture to whatever work has the embedded QR Code. Through adjusting content on the static URLs (that can obviously be redirected) we’ll see artists exploring that boundary in, what I hope to be, beautiful ways.

ARGs, the reality games not the pirate sound

Tron Legacy, due out later this year, revives a classic Disney movie. If you poke around the internet about the movie, you’ll probably stumble across a campaign called Flynn Lives. This is a weird site, at least to the untrained eye, that expresses aspects of the upcoming movie — that Flynn himself is still alive. Welcome to the Tron Legacy Augmented Reality Game (ARG). I’ve been following this myself, and I managed to get involved up to a point where I was part of a secret infiltration group and I needed to make a security badge.

Well, I plugged in my photo, typed in my address, and a few weeks later my real security pass showed up! I still have no idea what I get to use it for, but it’s quite a cool novelty item and should provide me some future hours figuring out what I do need to use it for. The best part is? The badge contained QR Code to help me continue my ARG-ing.

Even Iron Man 2 has jumped on board with QR Code. Tony Stark never looked so good. The URL from the QR Code it shoots you to a mobile site that provides all sorts of information from ticket sales, to trailers. A marketing masterpiece!

I expect QR Code to show up in most of our environment simply to provide you with “more information URLs.” Even Warnings or Emergency Information could be stored. Instructions too. And the benefit is, a quick photo lets me record and remember that URL rather than blindly ignoring it. That’s the power of 2D symbology. It makes you want to photograph it.

OMG I <3 STICKERZ

One thing that I notice is the combination of Semacode and QR Code being used in weird combinations. I personally will stick with QR Code, primarily because of its rapid growth, but also because the 3-square corner makes it instantly recognizable.

Even Facebook is offering QR Code generation. Talk about creepy. That’s a whole other post waiting to happen.

There’s some concern with “QR Overload.” If they are everywhere, we’ll turn in to zombies holding up our cameras trying to find out what secrets these pixel blocks hold, and possibly landing to some rather distasteful URL. Advertising firms will need to get their staff checking these to ensure the URLs aren’t bad or rude. Same goes from the phone software — it shouldn’t automatically open up a URL once you take the photo. I know QuickMark (iPhone App I personally use) shows the parsed information first, giving me options to continue (whether it be opening up MobileSafari, or Mail). It also keeps a history, a rather nice touch and useful too. I shouldn’t need to stress this, but the decoding results in text, nothing more. QR Codes are harmless in that respect.

The second part to QR Overload is that we’ll train ourselves to ignore them. Just like the old UPC. The only benefit of QR Code is that it provides anyone with meaningful information. That’s where I hope it will succeed.

Whether it’s QR Code, Semacode, or some other 2d matrix code system, these boxes of pixels are a truly wonderful use of technology and basic computing principles. Expect to see them more and more, tucked away quietly in a corner or highlighted prominently on billboards, online ads, newspapers, or even spray painted on the pavement in front of you.

References, Resources

References:
http://en.wikipedia.org/wiki/Barcode ( parent topic )
http://en.wikipedia.org/wiki/QR_Code
http://en.wikipedia.org/wiki/Data_matrix_(computer)
http://en.wikipedia.org/wiki/European_Article_Number
http://www.moyak.com/papers/history-barcodes.html

Articles:
- TOR for Android, using QR Code for software installation URL
- A movement by American Mobile companies to use Semacode
- Lifehacker article on how to make your own personalized QR Code (includes lots of resources)
- Facebook Kicks Off Implementation Of QR Codes

General Information Sites/Blogs:
- 2d-code.co.uk – A very good site dedicated to QR news
- Mobile Barcodes – A general information site about how you can use QR Codes, a bit fluffy but provides some good background. Also has a generator.
- Tagging the World using Semacode to reference Wikipedia

Online Generators:
- Tec-It – This generator does all sorts of barcode standards
- http://qrcode.kaywa.com/ – Yet another generator

Previous post:

Next post: