Hacker News new | ask | show | jobs
by Timwi 584 days ago
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.
5 comments

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.

Thank you so much! That's really helpful and enlightening.
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!
it is long, tedious, and the absolute most interesting part of it all.
There’s a Wikipedia article for it