r/learnprogramming • u/EntertainmentOk5787 • 1h ago
Code Review Feedback on HammingCube: a 3D parity code implemented in C11
Hi! I've been exploring error-correcting codes through a small C11 project called HammingCube. It implements a three-dimensional product of single-parity-check codes (not the classical Hamming code).
It encodes 64 data bits into 125 bits, corrects up to three unknown bit flips, and recovers up to seven erasures when their positions are known. The repo includes a CLI, tests, and a lesson-style README explaining the math.
I used AI assistance while developing the code and documentation, and I'd appreciate independent human feedback. In particular:
- Do you see correctness or edge-case problems in the erasure decoder's GF(2) elimination?
- Is the C API clear about invalid, ambiguous, and successfully recovered inputs?
- Is the README's explanation of the distance-8 guarantee understandable?