frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: An interactive demo of QR codes' error correction

https://qris.cool
109•Xiione•7mo ago
Hi HN! This is a hobby project of mine that recently landed me my first interview and helped me get my first internship offers.

Draw on a QR code, and the health bars will accurately display how close the QR code is to being unscannable. How few errors does it take to break a QR code? How many errors can a QR code handle? Counters at the bottom track your record minimum and maximum damage. (Can you figure out how to break a QR code with 0.0% damage to the actual data region?)

Also, click on the magnifying glass button to toggle between "draw mode" and "inspect mode". I encourage you to use your phone's camera to scan the code as you draw and undo/redo to verify that the code really does break when the app says it does.

I wrote the underlying decoder in C++, and it's compiled to WebAssembly for the website.

I hope you find it interesting.

Comments

flysand7•7mo ago
It's surprising how much data you need to corrupt while still being able to read the QR code, that's what I'd take out from this. The demo is interesting in that respect, but I do think it's somewhat incomplete.

It seems to be missing some explanations regarding how the code is structured and how it performs error correction. I feel like there's little point in interacting with a system you don't understand or not trying to understand. And I also think there are cool ways to make those things interactive as well. Pick an image, then explain what the little squares in the corners are for and provide little interactivity to see how they affect the decoding. Then move on to the error correction. This step-by-step style of interactivity may be better, I'd think about that.

As for what is there, the first thing I don't like here is icons. The four icons in the lower-right corner (result data, format info, ..) are hard to distinguish, and are hard to correlate with the "history" tab. I'd probably either make them slightly different color, or actually simplifying these icons further might be a better option, just because they're so small.

But yeah it is pretty hard to tell what I'm interacting with, unfortunately. I don't know pretty much nothing about QR codes, and I don't know what the different kinds of errors are, what "EC" stands for etc.

UI should probably be rethought as well, because before I was writing the comment I had no idea I could switch a brush. Hell, I had no idea I was changing colors (the cursor covered half the space of the pixels, so I couldn't tell)

The idea's cool though, good work

Xiione•7mo ago
Thank you so much for the honest feedback. One of the reasons I tried to not get into the math details is because the preliminaries would be somewhat lengthy, some people would not be familiar with what a finite field is so explaining even that succinctly would be its own challenge for me. But for those that the concepts are within reach for (like the folks here on HN), you are right that I ought to make some effort to explain what is going on, at least intuitively. As for the UI considerations, great feedback, I'll definitely take it all into account when re-designing. I'm open to additional suggestions from everybody.

Ultimately I'm glad that I was able to get the main point across. That is, that QR codes can take a lot more abuse than one might assume. Thanks for checking my work out!

boomskats•7mo ago
How can you say that you 'don't know pretty much nothing about QR codes' and that you 'feel like there's little point in interacting with a system you don't understand or not trying to understand', while feeling qualified enough to write a critique claiming a demo of said thing you know pretty much nothing about is incomplete?

You don't know what EC stands for but you have an opinion on when the error correction should be demoed? And the first thing you don't like are the icons?

OP, if I were you I would ignore this critique entirely. This is a fantastic demo. The usability was spot on (I learned a lot in a very short amount of time) and your /repos readme is _exactly_ what I wanted to read. It is perfectly executed.

I'm gonna dig into your code a bit more tomorrow, but you should be very proud of this. You have a bright future ahead of you.

Xiione•7mo ago
Thanks so much for your kind words! As a principle I try to at least listen to what everyone has to say, I wish I could make everybody happy but in the end I incorporate the feedback I'm convinced of/already agree with. Let me know if you have any thoughts on my code, and thank you for the github follow :)
gen3•7mo ago
Very cool work! I really like being able to see the blocks and directly interact with them. It's nice to feel out how the ECC works. I can see myself using this to draw custom QR codes in the future!
myself248•7mo ago
Oh, this is cool. My favorite part is being able to mouse over the health bars at the right, and see exactly which bits they draw from in the code itself.
teuobk•7mo ago
Awesome! I love seeing how the blocks are affected by twiddling bits.
pveierland•7mo ago
Super cool interface to explore. It took a bit of playing around with the UI to understand all the features. My only feedback would be to try to make the "Continue" part of the flow to get to the sandbox easier to discover.
Xiione•7mo ago
Thanks! The "continue" was one of those things that started off as a placeholder and didn't change much, I'll definitely be adjusting it.
solardev•7mo ago
This is really cool! Thanks for sharing!

Is there a way to get it to compute and visualize the MAXIMUM possible error rate for any given QR code? Like what is the greatest number and arrangement of pixels that could be altered before the QR code is no longer readable?

(Bonus: Is this a setting that can be controlled during QR code generation, based on version number or error correction level, etc.? Can you make some sort of huge and very complex QR code with a lot more redundancy than a smaller one?)

Xiione•7mo ago
Thanks for checking it out! Essentially, for any given QR code the maximum error rate is reached when you deplete every block's health bar to 1 remaining slice, making sure to invert every pixel in each codeword you've touched (the individual tetris-piece shaped chunks), and then introduce one more single pixel error in any block. This is actually independent of the arrangement of corrupted codewords within each block.

The amount of redundancy is determined solely by the specific version-ecLevel pair a code has. So, the code with the largest amount of redundancy (in bytes) is one that has version 40 and EC level H - a staggering 2.43kB of redundancy vs. 1.28kB of data! See this particular sample: https://qris.cool/decode?sample=135

Show HN: Meetinghouse.cc, a site to find and be found

https://meetinghouse.cc
1•simonsarris•1m ago•0 comments

Linux 6.19 Will Allow You to Write I2C Drivers in Rust

https://www.phoronix.com/news/Linux-6.19-I2C-Drivers-Rust
2•teleforce•3m ago•0 comments

The "Barbell Economy" – Visualizing the collapse of junior developer roles

https://ai-strategic-report.vercel.app/
1•ArthurDev•4m ago•1 comments

Butter-Bench: Evaluating LLM Controlled Robots for Practical Intelligence

https://arxiv.org/abs/2510.21860
1•prisenco•12m ago•0 comments

Building Rank'em: Model Orchestration Is the Skill I Didn't Know I Needed

https://ryanperry.io/post/building-rankem-dynamic-stack
1•Rperry2174•18m ago•0 comments

Ly – A lightweight TUI (ncurses-like) display manager for Linux and BSD

https://codeberg.org/fairyglade/ly
2•modinfo•19m ago•0 comments

Readeck – lets you save the content of web pages you like and keep forever

https://readeck.org/en/
2•modinfo•21m ago•0 comments

The Clade folding text editor

https://tibleiz.net/clade/
1•birdculture•21m ago•0 comments

The $260B Mom-and-Pop Funds Distorting the Credit Market

https://www.bloomberg.com/news/features/2025-11-30/the-260-billion-mom-and-pop-fixed-maturity-fun...
1•petethomas•24m ago•0 comments

Pony.ai Granted Citywide Driverless Robotaxi Permit in Shenzhen

https://humanprogress.org/pony-ai-granted-first-citywide-driverless-commercial-robotaxi-permit-in...
1•surprisetalk•25m ago•0 comments

Elite College Admissions

https://collisteru.substack.com/p/on-elite-college-admissions
1•surprisetalk•26m ago•1 comments

The Dangers of Ebikes

https://www.nytimes.com/2025/11/30/briefing/the-dangers-of-e-bikes.html
2•harambae•35m ago•0 comments

AI Threats Have Broken Strong Authentication

https://securityboulevard.com/2025/11/how-ai-threats-have-broken-strong-authentication/
1•mooreds•38m ago•0 comments

37-year-old quit her $390k Google job after saving up $1.5M

https://www.cnbc.com/2025/10/15/no-buy-checklist-helps-florence-poirel-save-money-in-switzerland....
2•mooreds•38m ago•0 comments

Could the US invade Venezuela? [video]

https://www.youtube.com/watch?v=svlAdZjxNeQ
1•mooreds•39m ago•0 comments

Flint Rockin' in Central Texas

https://www.pugetsoundknappers.com/interesting_stuff/Interesting%20Places/JM%20SoCentral%20Texas%...
2•doitLP•43m ago•1 comments

The Birth of the Performance Lab at Spring Health

https://medium.com/spring-health-engineering/the-birth-of-the-performance-lab-at-spring-health-76...
1•bob-surfs•43m ago•0 comments

The Differences Between an IndyCar and a F1 Car

https://www.openwheelworld.net/en/indycar101/76/IndyCar_vs_Formula_1_cars
1•1659447091•44m ago•0 comments

Blogging on My Gleam Experience: Compiling to Binary with Deno

https://caffeine-lang.run/blog/packaging-caffeine
1•bob-surfs•44m ago•0 comments

The Life Hunt for Red October

https://www.twz.com/sea/the-real-life-hunt-for-red-october-happened-50-years-ago
1•mauvehaus•48m ago•1 comments

Asteroid loaded with amino acids offers new clues about origin of life on Earth

https://phys.org/news/2025-11-asteroid-amino-acids-clues-life.html
4•pseudolus•51m ago•0 comments

What happens when you kick millions of teens off social media?

https://www.cnn.com/2025/11/29/australia/australia-social-media-ban-intl-hnk-dst
2•pseudolus•53m ago•0 comments

Agents Should Be More Opinionated

https://www.vtrivedy.com/posts/agents-should-be-more-opinionated/
1•emersonmacro•55m ago•0 comments

CPU-only PPO solving TSPLIB lin318 in 20 mins (0.08% gap)

1•jivaprime•1h ago•0 comments

Show IH: My App for Retail Investors

http://ultrajetsoftware.com
1•jm33077•1h ago•1 comments

Show HN: Fin2Cents – Learn investing by sandboxing portfolios with real data

https://www.fin2cents.com/
3•amywangyx•1h ago•0 comments

Linux 6.18 Released with Many New Features, Likely This Year's LTS Kernel

https://www.phoronix.com/news/Linux-6.18-Released
5•listic•1h ago•1 comments

New report examines how David Sacks might profit from Trump administration role

https://finance.yahoo.com/news/report-examines-david-sacks-might-213904399.html
4•zerosizedweasle•1h ago•0 comments

Show HN: Data lineage diagrams 10x faster than draw io

https://datadef.io
1•theolouvart•1h ago•0 comments

Show HN: The $1B problem with business cards nobody's solving properly

https://yenhyia.buzzchat.site/
2•abilafredkb•1h ago•0 comments