3 ms·
I appreciate the steps, but this fails to answer a question which, imho, is way too often omitted in tech tutorials, and that’s ”Why?”. Sure, I understand thes
by asutekku 6y ago
I appreciate the steps, but this fails to answer a question which, imho, is way too often omitted in tech tutorials, and that’s ”Why?”.
Sure, I understand these are just the steps to create a QR code and I could just Google why the QR code needs a masking pattern, but that’s besides the point. A good material would explain why I need it, instead of just saying it should be done. Even one sentence would be sufficient.
- nayuki 6y agoI agree that the why is important, and it reinforces understanding of the how. I share your frustration when I see technical tutorials that show a bunch of screenshots or make you type a bunch of command line actions without explaining what it does and why you should do it. In this case though, I chose to omit the why because other written resources on QR Codes have covered the topics extensively. Just to name a few: https://en.wikipedia.org/wiki/QR_code https://en.wikipedia.org/wiki/QR_code ; http://datagenetics.com/blog/november12013/index.html http://datagenetics.com/blog/november12013/index.html ; https://en.wikipedia.org/wiki/Error_correction_code#Interleaving https://en.wikipedia.org/wiki/Error_correction_code#Interlea... ; https://en.wikipedia.org/wiki/Clock_recovery https://en.wikipedia.org/wiki/Clock_recovery
- Slartie 6y agoThe utility of the masking pattern becomes clear when following the next steps, which calculate "penalty points" for dot patterns in the QR code that might occur naturally, but are known to make it harder to read and more prone to erroneous reads. The masking pattern that, when applied to the "clean" content, generates the least problematic output is chosen. I found this pretty self-explanatory while just following the individual steps. However, a few sentences detailing the higher-level algorithm and its purpose right before the step which first introduces the masking pattern probably wouldn't be a bad idea either.
- pacaro 6y agoYeah, I once implemented a very simple AR tag mechanism -- using Binary Golay codes [1] which are super simple to understand. It turns out that you need a mask, otherwise you can too easily get a tag that is entirely (or close to) white or black. I was fortunate with a small code space (only 12 bit) that I could get away with a single mask, it never occurred to me that I could have used multiple masks (at the cost of a the bits to encode the choice) I looks like extra complexity, but it solves a very pragmatic problem [1] https://en.wikipedia.org/wiki/Binary_Golay_code https://en.wikipedia.org/wiki/Binary_Golay_code
- patrickg 6y agoI have written a QR encoder in Lua and documented it a bit. Perhaps this goes into the direction? http://speedata.github.io/luaqrcode/docs/qrencode.html http://speedata.github.io/luaqrcode/docs/qrencode.html