Archive for February, 2009
Discovering QR Codes
I recently discovered QR codes and how cool they are! Basically it’s a 2-D barcode and can store much more information than your standard bar code.
A QR code is a square of dots in a certain computer-readable pattern, for example there is one to the top-left of this post, encoded with the URL to this post.
Why bother though? Well, they are used mostly in Japan, where mobile phones are generally all Internet-enabled, so on an advert you might have a QR code for a URL where more info can be found. So you whip out your phone, point the in-built camera at the code, and bingo, it takes you to the website. Also you could have a film opening encoded in QR as a calendar event, so when you scan it it puts a reminder in your calendar. Useful no?
On a personal level though, when QR codes are not big in England, why should I care. Well, they are useful for transferring information I want to a phone. For example, I have a bookmarklet on my browser that converts the current page I’m looking at into a QR code (courtesy of the Google Chart API) and open the image in a new tab. Very useful if I find a page and think, “I’ll want to look at that later” I can make the QR scan it with my phone, and the page goes into it’s browser history for my later enjoyment.
For those of you interested the bookmarklet code is (should be all on one line, but for the page width’s sake…):
'http://chart.apis.google.com/chart?cht=qr&chs=400x400&chl='+
encodeURIComponent(window.location.href)
);})()
Try it! (will generate the QR code for this page, but a lot bigger than the one by the title)
You may have noticed that there are QR codes for the permalinks to these posts aswell, so you can easily bookmark them with a capable phone. Another useful function that my phone can do is to display the QR code for a Contact in my address book, so I can easily share that with another QR enabled phone without having to “pair” them with bluetooth, or use Infrared (if the phone still has it!) or text it or whatever. Much more convenient. I just need to find someone else with a QR enabled phone…
The T-Mobile Google G1
So I decided the time had come to get a smartphone. There’s only really two options the way I see it.
In the red corner, the slick-as-you-like, shiny, fashionable, Apple iPhone.
In the blue corner, the open-source, all-your-data-are-belong-to-us, Google G1.
I’ll save the theatrics as you know from the title that I went for the G1. But the pros-cons weighting was a difficult process with many factors. However me being me, the main one and the one that rules them all was price in the end. So lets make this all about the Google G1, and in order to falsely encourage you to thinks it’s great I’ll start with the cons.
Multiple Drag and Drop between two lists with jQuery
I wanted this functionality for a project a while ago. I google’d and found that lots of others did too, but no one had done it. Or at least not in a way that I could understand. In fact, I’m not sure I completely understand it anymore. It works very well, but also it could have some improvement. I would like to be able to drag the mouse to create a selection, but this in itself poses the difficultly of how to distinguish a “drag-to-move” from a “drag-to-select”.
Still I found it an interesting proof-of-concept and maybe you will too. The test can be found here: Select and Drag Demo.
DarkAuth for CakePHP
I thought I’d add a page to satisfy those of you who may have arrived here from the Cookbook, or anywhere else one of the DarkAuth pages was linked from.
I don’t really have much to do with this Component any more, although it still works great! I found that the built in Auth Component is plenty powerful enough, even if it doesn’t quite work work how I would have designed it.
Anyway, here’s the component (tested with CakePHP 1.2 RC3) DarkAuthComponent. Enjoy! It’s highly commented, so hopefully you’ll be able to work out what it does and how to use it…