frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

https://qris.cool
109•Xiione•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y ago
Awesome! I love seeing how the blocks are affected by twiddling bits.
pveierland•1y 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•1y 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•1y 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•1y 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

Plex "laid off the player team" what is the industry doing to developers?

https://samueleast.co.uk/playground/laid-off-from-plex-60-days-in
1•healsdata•2m ago•0 comments

New AI-powered mosquito trap could help curb dengue outbreaks

https://www.usf.edu/news/2026/new-ai-powered-mosquito-trap-could-help-curb-dengue-outbreaks.aspx
1•gmays•2m ago•0 comments

AI Phone

https://github.com/oxnw/ai-phone
1•handfuloflight•3m ago•0 comments

Cue – A daily notes and to-do app for Mac and iPhone

https://github.com/zlwaterfield/cue
1•zlwaterfield•4m ago•0 comments

A New Dwarf Planet (Probably) Spotted Beyond Pluto

https://www.nytimes.com/2026/10/27/science/space/new-dwarf-planet-beyond-pluto.html
1•mrjaeger•11m ago•1 comments

Toad Venom Nose Spray Quickly Eases Depression for Weeks in Clinical Trial

https://www.sciencealert.com/scientists-tested-a-toad-venom-psychedelic-on-treatment-resistant-de...
1•gmays•13m ago•0 comments

New Agentic security tool detects shuts down hackers on autopilot

https://argusone.website
13•wearehumxn•14m ago•1 comments

Ukraine is arming war robots with grenade launchers to hit the Russians

https://www.businessinsider.com/ukraine-robots-use-grenade-launchers-to-fire-without-risking-sold...
2•beansovertoast•14m ago•0 comments

'Forced out': HOA fees to rise to $2,500 a month

https://www.wsoctv.com/news/local/forced-out-hoa-fees-rise-7500-month/XCW2HIHUKNBMTNWVQSYXQZJCY4/
1•hippich•19m ago•0 comments

Agent Harness for Learning Things [video]

https://www.youtube.com/watch?v=nfTDljFG2g0
1•rice7th•22m ago•0 comments

Capturing and replaying real database workloads at Airbnb

https://medium.com/airbnb-engineering/beyond-synthetic-testing-capturing-and-replaying-real-datab...
1•shcallaway•23m ago•0 comments

Create your own Jev using Voyage models

https://blog.voyageai.com/2026/10/27/how-to-create-your-own-jev-using-voyage-models/
1•fzliu•26m ago•1 comments

Redirect Audit – Check how HTTP/HTTPS/www variants and bots get redirected

https://redirectaudit.com/
1•zamilist•27m ago•0 comments

Rubin Observatory reveals its first dwarf planet candidate in our solar system

https://www6.slac.stanford.edu/news/2026-10-27-nsf-doe-vera-c-rubin-observatory-reveals-its-first...
1•consumer451•27m ago•0 comments

Nice Little Satellite You Got Here. Shame If Anything Were to Happen to It

https://streetwiseprofessor.com/nice-little-satellite-you-got-here-shame-if-anything-were-to-happ...
3•jacquesm•31m ago•0 comments

Ferring to acquire ovary-in-a-dish startup Gameto for up to $1.38B

https://endpoints.news/ferring-to-acquire-ovary-in-a-dish-startup-gameto-for-up-to-1-38b/
1•wslh•31m ago•0 comments

Show HN: VelaTrace KiCad plugin: Catch PCB mistakes before you order the board

https://forum.kicad.info/t/velatrace-plugin-a-linter-for-kicad-boards-that-catches-mistakes-befor...
1•a2-_•31m ago•1 comments

Cloudflare Computer helps agents recover from interruption and wait for approval

https://developers.cloudflare.com/changelog/post/2026-10-26-computer-durable-javascript/
1•gmays•33m ago•0 comments

Show HN: Better Backlog: Filter GitHub issues with decision models

https://github.com/BerriAI/better-backlog
1•mfkhalil•34m ago•2 comments

OEIS sequence A400000: The city-building sequence

https://oeis.org/A400000
1•rahidz•42m ago•1 comments

Show HN: Guess what frontier LLMs do in a repeated prisoner's dilemma

https://thenunchiproject.com/game/ai-decides
4•masterofarbs•47m ago•0 comments

Harley-Davidson Wanted an Electric Revolution. That Dream Is in Trouble

https://www.wsj.com/business/autos/harley-davidson-wanted-an-electric-revolution-that-dream-is-in...
1•bookofjoe•49m ago•1 comments

Egres: A Postgres-compatible database for heavy, multi-tenant workloads

https://egresql.io/
1•random42•51m ago•0 comments

Show HN: WordClash Daily – A daily crossword game, solo or multiplayer

https://wordclash.io/daily
1•pandaman28•53m ago•0 comments

Gender Reveal App

https://www.revealsky.com/
1•umoizeonesi•56m ago•0 comments

Bureau – BUREAU – an agent skill that designs like a studio

https://acf1210.github.io/bureau/
1•acf1210•56m ago•0 comments

Moxnox 1.0: NT-Like, POSIX-Compatible OS Running Atop Btrfs

https://github.com/maharmstone/moxnox
3•SockThief•1h ago•0 comments

LibreOMR

https://github.com/foxzyt/LibreOMR
3•bernardodealbuq•1h ago•0 comments

Free daily JSON feed of Shanghai government subsidy notices

https://github.com/ZhongGheart/china-policy-data
10•subsidyradar•1h ago•0 comments

Claude finds TikTok, Instagram bypassing microphone permissions to listen to you

https://twitter.com/starmexxx/status/2114841068839526865
13•thunderbong•1h ago•4 comments