←back to thread

246 points D4Ha | 7 comments | | HN request time: 0.42s | source | bottom
1. Timwi ◴[] No.42168742[source]
Unfortunately it seems that every online explanation of QR codes always leaves out the Reed-Solomon error code calculation. The author here describes it as “long, tedious, and not very interesting”, but since everyone seems to think that, it is now very hard to find.
replies(5): >>42169094 #>>42170320 #>>42170344 #>>42170889 #>>42170910 #
2. cammikebrown ◴[] No.42169094[source]
There’s a Wikipedia article for it
3. steventhedev ◴[] No.42170320[source]
I took a code theory course in grad school. It was the most rigorous course I took, and for all of the 5 students it was difficult, but I'm also really glad I took it.

Reed Solomon was about two thirds of the way through the semester, and the gist is that it's based on polynomials - with enough points you can define exactly where the polynomial is - so include some extra points and that way if some get lost along the way you can recreate them.

The rest of it is how to apply that for binary data (finite fields). Which is mathematically beautiful, but where they get somewhat complex.

4. larsbrinkhoff ◴[] No.42170344[source]
These two tutorials explain the error code calculations:

https://www.thonky.com/qr-code-tutorial/error-correction-cod...

https://dev.to/maxart2501/let-s-develop-a-qr-code-generator-...

replies(1): >>42182940 #
5. amenghra ◴[] No.42170889[source]
https://www.quaxio.com/an_artisanal_qr_code.html and PagedOut! Issue #2 have a qrcode from scratch including the error code calculation using long division. Enjoy!
6. vrighter ◴[] No.42170910[source]
it is long, tedious, and the absolute most interesting part of it all.
7. Timwi ◴[] No.42182940[source]
Thank you so much! That's really helpful and enlightening.