

Show HN: my spare time project, an on-site QR image decoder - dgarner
http://w-labs.at/mms/qr-decoder/

======
tmslnz
Not sure I understand why this was even created in the first place. Wouldn't
it suffice to simply spell out the content of the QR next to it, on hover or
else? It's not like QR codes are born out of thin air; if you place a QR on
your site then it's unlikely you don't know what data it represents.

~~~
bakerfreak
good point :D

------
hiroprot
As others have said, I think the project isn't super useful. The most
interesting thing I saw on the page was an attempt at hiding the source for
the script by putting it into an image, and then decoding it.

Pretty easy to decode and just console.log though. Here's a Gist of the source
for anybody who's interested:

<https://gist.github.com/anonymous/5169037>

~~~
dgarner
I guess it would have been way more useful if you pointed out how you decoded
it. anyways, great post :)

~~~
hiroprot
I simply replaced the eval line at the end of the decode script with
console.log.

I hadn't seen this obfuscation technique yet, learned something new :)

------
franze
ok, besides the fact that this is the most non-existent use case in the
history of QR codes ever, i would love to take a look at the source code if he
really managed (and how he managed) to get a QR decoder in 1.5kb. sadly this
is not (easily) possible because the script is base64img/canvas encoded, which
is (his good right but non the less) very annoying.

~~~
xPaw
He just uses JSONP-ajax to get result from "[http://www.patrick-
wied.at/static/qrgen/qrdecode_widget.php?...](http://www.patrick-
wied.at/static/qrgen/qrdecode_widget.php?url). It's a dumb idea to sell this
for 15$

~~~
franze
we can start calling this the SimCity strategy:

    
    
      1. pitch a software product (script/game)
      2. sell a service
      3. be misleading about it

------
Nyarlah
It seems all this code does is send the image url to a remote server that does
the decoding and returns the content. I'm actually not sure how this takes
1.5kb of code.

