Wednesday, June 13, 2012

QR Codes

QR codes are a simple technology that does one thing well, and has a wide variety of applications. A QR code is a 2d barcode that can encode a small amount of information. The amount of information encoded depends on the size of the image but can store a significant more amount of information than a standard barcode (like a URL for example). Additionally they do not need special scanning or printing equipment to read. A regular printer and a smart phone with a camera can be used to read and decode them.

They are also very easy to generate as there are great libraries out there to use to plunk them down in your application, or you can use google charts without doing much of anything. For example the below link will generate a QR code from google charts. Change the last part of the URL to encode anything (well anything short) you want.

or embed it as an image if you want to generate them dynamically:
<img src="" />

With a result (go ahead and try and scan it right on the screen if you have QR reader on your phone.  I use QR Droid):

QR codes application really comes down to the ability to get data into a smart phone quickly and accurately. They are of course all over advertising, as a sample I opened a wired magazine from 8 months ago and a more recent one, there were 4 QR codes in the old one, and 30 in the new one. We are starting to see them used in other ways as well.

For example:
  • You want to take a verify that someone shows up somewhere generate a QR code with a unique code and make the user scan it and open up a web address to update your server.
  • You want to have some data entry done against a set of stocking levels.
  • Tracking "things".  This is how they started but they are starting to be used to track stuff outside of environments using specialized equipment.
  • You want to run a scavenger hunt with a bunch of clues all printed and hidden on QR codes. Ok not the best business case here but it could be fun.
The take away here is that they are easy to generate, easy to open a website and with a little more work can be embedded in a mobile app. They can be used in all kinds of ways, they are free of licensing costs, and they are not just for marketing.

Tuesday, March 13, 2012

Puppet extlookup

This is a follow up post to dealing with differences in different environments. Puppet has a function called extlookup although written awhile ago it was introduced as a core function in puppet 2.6.1. The function allows you to look up external values stored in a simple csv file and will search through a file based off a hierarchy you can define. The example that is given in the documentation worked perfectly for my particular setup as my physical networks each have their own domains; so for example I have a yum server and a DNS server that should be different based off where the servers are located and these differences can be determined by the domain.
I wish I had a nice howto to plop down here, but really it took no time to setup and was trivial to setup and the default install options were what I wanted. I just hope it gets added to the best practice section of the puppet wiki at least for smaller networks where an ENC is not in place.