We should all be familiar with QR codes, those blocky printed patterns containing encoded text, URLs, or other data. A few years ago they were subject to their own cloud of hype, but now they have settled down in their niche of providing a handy route for a smartphone owner to reach a website without having to type an address.
Have you ever wondered how they work? There are plenty of dry technical guides out there, but if they’re not your thing you might find [Nayuki]’s step-by-step guide to be of interest. It explains the encoding and error checking bit generation process before starting on the familiar three-squares pattern and timing bars of the QR code itself. The really interesting part comes with its explanation of overlays, a set of repeating patterns that are added to the final data segment, and how the pattern used is chosen to minimise penalties due to large blocks of the same colour in the final piece. The chances are most of us will never have to create a QR code from scratch, but it is this type of fascinating technical general knowledge that makes guides like this such an interesting read.
QR codes have appeared in quite a few projects here over the years, but the one we find particularly amusing is this project to hack them by changing one QR into another.
Via Hacker News.
I think when scanning QR codes for URLs, it’s important that the user be shown the key features (such as the FQDN – in Roman characters if there’s a chance of unicode/RTL/alternate trickery) front and centre before they go to the link.
That said, no doubt it’ll go to a URL redirection service, to either legitimately track redirects and shorten the length of the URL and therefore size of the QR code … or to conceal a dubious final destination… What really really shits me is redirectors that require javascript to reveal their destination, that deliberately aim to defeat programmatic decoding by non-browser apps.
THANK YOU for that statement.
It makes me writing basically the same things unnecessary.
URL shortening is how the Web will die.
This is sooo beautiful! Poses a severe procrastination danger.
“We should all be familiar with QR codes, those blocky printed patterns containing encoded text, URLs, or other data.”
Printed onto electronic devices.
xkcd 1237
http://xkcd.com/1237/scan/
how big qr is?
for example i have small mp3 with one song. How big is qr-code ?
QR encodes a few characters – or a few words. Your best bet would be to host the .mp3 online somewhere, and put the link in your QR code :)
beter idea is writing few number or chars directly. Why I woul use 2d code if i can use string?
Nice visualization of the QR code concept. If any of you is interested in the Reed-Solomon (ECC) part, which is missing in the above linked source, have a look at this tutorial: https://www.thonky.com/qr-code-tutorial/introduction
Also helpful when dealing with QR codes – kaarposoft’s QR debugger: http://qrlogo.kaarposoft.dk/qrdecode.html
Much like that the little toe is an evolutionary adaption to locate the corners of furniture, the QR codes main purpose in life is to indicate the former location of drivers, apps, or other software necessary to the operation of the clearance Chinesium gadget you just bought.
B^)
I think that QR codes have a place, for parts, items, and such, but to use them for URL’s/URI’s is subversive to the human-readable nature of what web pages are supposed to be.
I remember when I was young and programming in hex sequences and address locations instead of any actual sort of language… I found the wiki article on QR codes and went, “It’s basically just standard ASCI? I’ve memorized this!”
I then proceeded to, from scratch, compute and draw QR codes on whiteboards. It was a fun practice and in time I discovered post-it notes are also excellent places to sketch them :)
Incidentally if the center of each bit is marked, the actual square isn’t that important, so as ‘unfinished’ as this one looks, it actually is very quickly readable.
https://i.imgur.com/1qB4FoAh.jpg (Made it a few months ago for a very wonderfully nerdy s.o.)
My browser (company PC) says “cannot be displayed […] because it contains errors”
What web browser software are you using? Is it an old version of Internet Explorer?
I designed my page with a fair amount of compatibility in mind. I tested it to work in IE 11, Edge 42, Firefox 63, and Chrome 70. Your error message suggests that maybe it refuses the XHTML media type. Aside from that, if your browser is old it might not support SVG properly.
Doesn’t work for me either. Chrome on Android
Well, they (my company) are a bit on paranoid side, when it comes to Internet access…
Firefox 60.3.0esr
i-nigma app gets it.
I am so glad you guys shared this. I have wanted to understand QR in this sort of way for a long time now.
Now you’ve done it. What did we tell you about coloring outside the lines?