Hacker News new | ask | show | jobs
by aim4min 1102 days ago
Imagine if some construction company created a whole neighborhood that from the right vantage point would be a valid QR code.
4 comments

It's all fun and games... Until someone forgets to pay the annual domain fee.
A QR code on a yoghurt that I bought couple of months ago came with some interstitial ad due to an unpaid fee. It made me double check the yoghurt's expiration date.
Seems like nowadays links rot faster than yoghurt!
10/10, no notes!
Like those 800k or so Maryland drivers with starspangled200.org on their license plates.
A QR code is just data, it doesn't have to be a URL, it could just as easily be any kind of data
Realistically if you want to contain anything but short text or heavily compressed data URIs you need to be hosting it on a domain the code points to.
Fun to imagine in the abstract. I used to take classes in a building designed to have a certain appearance from above, and the user experience was definitely the worse for it

    1. Secretly repaint one wall of a house and redirect the qr code to a slightly different url
    2. ???
    3. Profit
Not possible -- QR codes have error correction.
Error correction doesn't make it impossible to change a message by flipping bits, you just have to change enough bits, and know which bits to flip. I wouldn't rule out, that if you are being smart about it, you might be able to change it into a different valid url, without having to change too many of the squares. You might even be able to use the error correction to your advantage to an extend.
Especially if we are gonna throw away half the error correction in an attempt to make artsy qr codes
You could use an unnecessarily big QR code for extra correction bits to mitigate this somewhat (up to the maximum correction standard (30%?) even if that means 41 cell code instead of a 33 cell one). For URLs another size hack is to include meaningless extra data (a qstring parameter or anchor that won't be interpreted). This doesn't increase the error protection in itself, but gives the fancier more data to work with so it can produce better visual results without losing more of the signal correction strength. Using the generator at https://qrbtf.com/ someone linked above, try the “C2” style with https://qrbtf.com/ and https://qrbtf.com/#some-extra-data-to-increase-the-image-siz... to see the difference this makes.

The issue with artsy QR codes often isn't the individual bit flips, but that they often include large areas of all black or all white which can make it harder for the reader to pick up the actually correct bits if the viewing angle and lighting aren't perfect. The standard includes 8 mask patterns that you can freely choose from, the intention being that you pick the one which gives most black/white variation in the final result, so there is as few low-contrast areas as possible. With improvements in cameras and processing built into QR scanners these days this is becoming less of a concern, but if you need your code to be reliably readable by older devices, probably stay away from the fancy tricks.

The fancy tricks are cool though, worth all the caveats if they match your stylistic needs.

I love seeing companies blindly encoding massive URLs into QR codes that end up being ridiculously detailed images. Like they would be impossible to scan unless you were right up close with a good camera because the individual dots are so small.
It is possible, you only have to replace also the correction stuff
Old Maxtor campus in Milpitas was supposed to look like an HDD https://goo.gl/maps/JbRWqZseAVL14n167