TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Mechanical sympathy for QR codes: making NSW check-in better

134 点作者 dbaupp超过 3 年前

21 条评论

negative_zero超过 3 年前
Something that I have found very interesting: In New Zealand the QR codes are like the &quot;Works Now&quot; NSW ones. The combination of the A4 page size, the QR code taking up most of that page and peoples natural standing distance away from the posters, roughly means that the QR code takes up most of their screen. And I am not sure why, but some phones seem to <i>really</i> struggle with this setup.<p>And when the code won&#x27;t scan, people&#x27;s natural tendency is to then move closer to the QR code (make it fill the whole screen), which doesn&#x27;t help at all. But if they instead initially move away it can fix the issue.<p>I&#x27;m not sure what would cause this? Maybe a reduction in relative angular distortion? Or perhaps only a crop of the image is &quot;scanned&quot; for QR codes?<p>But yeah this, (very) anecdotal, data point would counterintuitively push for a smaller QR code than &quot;Works now&quot;(maybe 10-20%).<p>The best experience I have had was the Queensland system. The QR codes I saw were different than explained at the end of this article. They were small (Original NSW size) but very simple codes. From the look and the number below, I assumed it was just a 6 digit number. Those would scan very fast (as in while I was still moving the phone at speed to align with the QR code).<p>In NZ the behaviour is: stop, aim, scan, wait, done. But in Queensland it worked so well I could just keep walking, wave my phone in the direction of the barcode and it would catch it.<p>Anyway, I just found those experiences very interesting, maybe others will too :)
评论 #28848679 未加载
评论 #28848155 未加载
drfuchs超过 3 年前
For the geographically illiterate, NSW refers to the Australian state of New South Wales (vs. Not Safe for Work, Naval Strike Wing, Newman–Shanks–Williams prime number, Nintendo Switch, or U.S. Naval Special Warfare Command).
lifthrasiir超过 3 年前
The workflow is generally reversed in South Korea: the visitor shows a generated QR code to the merchant&#x27;s camera for the check-in. (There are also multiple fallbacks available.) The QR code is, to my knowledge, a very short living JWT credential and looks like this: (I&#x27;ve redacted pretty much every nonce for the obvious reason)<p><pre><code> 003|eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZiIsImVucCI6Imh0dHBzOi8vd3NzLmNvb3YuaW8vMDEyMzQ1Njc4OUFiQ2RFZkdoSWoiLCJpc3MiOiJBQ01FIiwiZXhwIjoxNjAwMDAwMDAwLCJ2ZXJzaW9uIjoiMDAzIn0.AEwfg3OC34g07x_xVWekdUumxPTqbrRFvQkOVV_TQT4 </code></pre> That got encoded into a fairly large QR code---61 by 61 modules (version 11, error correction level L)---and it is always painful to get it recognized, mainly because every merchant&#x27;s device is different and some devices and&#x2F;or apps are particularly less responsive.<p>It is very noticable that there is a lot of redundancy here: the format of JWT payload will be very regular, always having `sub`, `enp`, `iss`, `exp` and `version` (fixed to `003`) fields in a verbose base64 format for example. It makes a fun challenge to optimize this into something much smaller.
评论 #28846628 未加载
评论 #28850746 未加载
评论 #28846300 未加载
noway421超过 3 年前
Really interesting write-up! New Zealand COVID Tracer app QR codes are actually pretty similar. We don&#x27;t use URLs, but we do use a base64 encoded JSON prefixed with the &quot;NZCOVIDTRACER&quot; string.<p>NZ Covid Tracer App is actually open source and the QR code reading function can be seen here: <a href="https:&#x2F;&#x2F;github.com&#x2F;minhealthnz&#x2F;nzcovidtracer-app&#x2F;blob&#x2F;main&#x2F;src&#x2F;features&#x2F;scan&#x2F;helpers.ts#L39" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;minhealthnz&#x2F;nzcovidtracer-app&#x2F;blob&#x2F;main&#x2F;s...</a><p>And here&#x27;s the type for the JSON we use: <a href="https:&#x2F;&#x2F;github.com&#x2F;minhealthnz&#x2F;nzcovidtracer-app&#x2F;blob&#x2F;main&#x2F;src&#x2F;features&#x2F;scan&#x2F;types.ts#L1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;minhealthnz&#x2F;nzcovidtracer-app&#x2F;blob&#x2F;main&#x2F;s...</a><p>Typical example of a QR code can be found here: <a href="https:&#x2F;&#x2F;lenny.cf&#x2F;all-qr-codes" rel="nofollow">https:&#x2F;&#x2F;lenny.cf&#x2F;all-qr-codes</a>
评论 #28845996 未加载
ademarre超过 3 年前
I think he could have saved even more space in his final pass by uppercasing the business names:<p>HTTPS:&#x2F;&#x2F;S.NSW.GOV.AU&#x2F;C&#x2F;121321&#x2F;Test+NSW+Government+QR+code (binary mode)<p>HTTPS:&#x2F;&#x2F;S.NSW.GOV.AU&#x2F;C&#x2F;121321&#x2F;TEST+NSW+GOVERNMENT+QR+CODE (alphanumeric mode)<p>He ruled out full alphanumeric mode early on, prior to ditching Base64, but it&#x27;s sensible to reconsider it by the time you reduce the URL this far. He goes on to allude to simplifying or even dropping the business names to save more space at the cost of lost functionality, but just uppercasing them seems benign to me.<p>It&#x27;s a nice write-up all the same.
评论 #28846094 未加载
评论 #28846273 未加载
Andys超过 3 年前
The way the govt did these codes was ridiculous. Many retailers put them behind a glossy protective plastic, and they are so hard to scan and really slow things down unnecessarily. I guess they were rolled out quickly or by someone inexperienced with QR codes.
评论 #28846661 未加载
评论 #28846042 未加载
评论 #28846125 未加载
评论 #28850335 未加载
评论 #28850949 未加载
hayyyyydos超过 3 年前
The craziest part is, the QR codes have all the data to be able to work offline. But the app requires an internet connection!
评论 #28846549 未加载
评论 #28846479 未加载
评论 #28846402 未加载
NamTaf超过 3 年前
I had surgery a couple of months ago and the hospital entry here in QLD had their QR checkin code printed on a novelty-cheque-sized piece of cardboard sitting on an artist&#x27;s easel outside the entry to the hospital foyer. I could scan it from like 10 metres away without any zoom. It was fantastic.<p>Many places I&#x27;ve seen have taken a &#x27;defence in depth&#x27; approach, where they put up numerous copies throughout their entryway so that multiple sets of people can check in simultaneously. Either on top of the pylons holding barrier ropes, or against multiple doors in an antechamber, etc. That also works well for getting people through.
评论 #28847479 未加载
hnick超过 3 年前
Somewhat related, there was a thread that raised the issue on Reddit a little while ago. Mostly anecdotes&#x2F;complaints, but some technical discussions too (with varying levels of accuracy).<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;sydney&#x2F;comments&#x2F;pp0kpg&#x2F;why_are_the_urls_for_covid_qr_codes_so_long_if&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;sydney&#x2F;comments&#x2F;pp0kpg&#x2F;why_are_the_...</a><p>I have no issues with my phone (until yesterday when I encountered some creased laminate), but it&#x27;s new. The most obvious improvement to me is what the article pointed out - use more of the paper you&#x27;re printing on! Make it bigger. Worst case, we all get to stand back a little.
评论 #28846333 未加载
wahern超过 3 年前
I feel obligated to give a shout-out to the qrcode LaTeX package at <a href="https:&#x2F;&#x2F;ctan.org&#x2F;pkg&#x2F;qrcode" rel="nofollow">https:&#x2F;&#x2F;ctan.org&#x2F;pkg&#x2F;qrcode</a>, written in pure LaTeX. Makes creating documents and templates with QR codes a breeze. Though, I&#x27;m sure most such printed documents are drafted using MS Word. :(
评论 #28846161 未加载
theden超过 3 年前
Nice writeup!<p>On the scheme, I&#x27;m not sure `https` is needed, at least when scanning with the iphone camera. Parsing seems to be based on the TLD and potentially subdomains, e.g., `example.com` will parse as an address but lesser-known ccTLDs like `example.ws` will be parsed as text, which is interesting.<p>Ideally, one would set up SSL redirection, so dropping the `s` from `https` wouldn&#x27;t be a sec issue, and have a naked domain so that the `www` CNAME isn&#x27;t needed either. Checking their website, that seems to be the case, so they could potentially drop `<a href="https:&#x2F;&#x2F;www" rel="nofollow">https:&#x2F;&#x2F;www</a>.` from the QR code<p><pre><code> $ curl -IL http:&#x2F;&#x2F;service.nsw.gov.au&#x2F; HTTP&#x2F;1.1 301 Moved Permanently Server: awselb&#x2F;2.0 Date: Wed, 13 Oct 2021 00:34:35 GMT Content-Type: text&#x2F;html Content-Length: 134 Connection: keep-alive Location: https:&#x2F;&#x2F;service.nsw.gov.au:443&#x2F; HTTP&#x2F;2 301 server: awselb&#x2F;2.0 date: Wed, 13 Oct 2021 00:34:35 GMT content-type: text&#x2F;html content-length: 134 location: https:&#x2F;&#x2F;www.service.nsw.gov.au:443&#x2F; </code></pre> (explicitly with `http` but it redirects properly without any protocol)
评论 #28847168 未加载
shirro超过 3 年前
I can mostly scan the South Australian ones on the move and as the article says they appear to be simpler.<p>The main problem with fast scanning is selecting one at the right height. Often the first I encounter is placed at waist level for wheelchair access which is a very good thing but often worth walking past that and using one at a better height for me as the keystoning of the image makes scanning less reliable.<p>The checkin data in my state is guaranteed to be kept for 28 days and treated as health data and not available for other purposes. But it was recently announced they discovered they had been keeping backups for longer than 28 days by mistake. That is probably quite relevant to a lot of businesses I think. Backups tend to be handled separately. I am sure I have worked on many systems where client data has been deleted in the app but persisted in backups long after they should have. Might be some lessons in that.
PaulHoule超过 3 年前
The brand guidelines for my three sided cards say version 2 and at least an inch on the side. These scan great. If you can tolerate a db lookup in the server version 2 is all you need.
jiggawatts超过 3 年前
Related: Most people don&#x27;t realise that they can use the optical zoom on their phone to stand 2x or 3x further away.
Aspos超过 3 年前
Quick ASCII-2-ASCII compression saved about 3-5% of the examples, so there is even more room for optimization with dictionary-based compression. Trading the app size for more efficiency is justified in this case, I guess.
评论 #28847938 未加载
semireg超过 3 年前
Indie dev here. I made an electron app to generate and print barcoded labels&#x2F;images. It’s one of the only apps available allowing windows and macOS users to print to thermal printers without drivers.<p>You can create forms for variables that get injected&#x2F;interpolated into barcodes&#x2F;images.<p>I just added the ability to print from the command-line or via URL. I’m looking for label printing system integrators and offering free licenses if you mention you found my app on HN.<p>I’d love to work with people on issues like this. Cheers!<p>Download from <a href="https:&#x2F;&#x2F;label.live" rel="nofollow">https:&#x2F;&#x2F;label.live</a>
评论 #28847484 未加载
SulphurCrested超过 3 年前
The article says the QR check-in in the neighbouring state of Victoria works offline, but it didn&#x27;t for me a couple of months ago when I lost 4G signal. Perhaps it&#x27;s been changed since then – one would hope so, given the existence of mobile blackspots in rural Victoria.<p>However, the way the codes are used in Victoria is different, which means the size of the QR code doesn&#x27;t matter much. (They tend to be about 1&#x2F;4 of an A4 sheet, so larger than in NSW.) No-one is checking your phone to ensure you checked in; rather, it&#x27;s an honesty system. So the codes are generally in the window near the door, and you stand off to one side. In those circumstances, if the code were larger and you could stand farther away, it would actually be less safe because it might encourage more than one at a time to use the code. As it is, a queue forms with polite distancing, like an ATM. (Remember those, and cash?)<p>We also have QR codes at every tram and bus stop in Victoria, as laminated A4, so they definitely do need to work outside. I haven&#x27;t used those, but ones in shop windows work fine when it&#x27;s raining. The only problem I ever encountered was a QR code on a bendy laminated piece of A4 indoors, under coloured lighting.<p>Vaccination status is integrated with the Victorian app, because it was that state that was tasked to work with the Federal government to implement and (together with the NT and Tasmania) test that. It is currently undergoing testing in rural Victoria, although anyone in the state can load their Federally-issued vaccination certificate into the app. NSW have not yet taken the code and put it in their app, probably because the people doing that expected the restrictions to be eased on the original timetable.<p>While loading the certificate into the apps should be technically simple, it isn&#x27;t, because of 1980s Federal laws to do with sharing of medical data. (They know my phone number, Victoria knows it, but it is against the law to match it. I must log in to the Federal site or the Federal app on my phone and authorise it to copy the certificate into the state app, and I must keep doing it every few months.)
评论 #28846653 未加载
评论 #28846680 未加载
IntemerateApe超过 3 年前
This is awesome. Thanks for sharing!
minaguib超过 3 年前
This is pretty cool, from a &quot;check-in-self-serve-here&quot; perspective.<p>In contrast, in Quebec Canada, the QR codes are issued to people once they get vaccinated, and contain the person&#x27;s name and vaccination(s) statuses, and digital signature by the issuer directly in the QR code.<p>The government then published 2 apps on the app stores: * App for users to easily host the QR code (instead of email&#x2F;PDFs&#x2F;etc), but more importantly: * App for businesses to scan the user-presented QR code and validate the signature, to allow into the premises (after also checking a photo ID to ensure person face matches ID and ID name matches name in QR code)<p>The above is because some businesses, like sit-down restaurants (even if eating on the terrace), are <i>required</i> to ensure patrons are fully vaccinated.<p>I don&#x27;t know if the &quot;scan&quot; app also remembers who it scans for contact-tracing purposes or not - but there&#x27;s a separate contact-tracing app for that, also published by the government, that uses iOS&#x27;s and Android&#x27;s contact-tracing facilities.
评论 #28846446 未加载
teh_infallible超过 3 年前
I can’t believe people here actually want to help Australia make their surveillance system work better. I wonder why so many people resent tech workers..
Guthur超过 3 年前
Even better solution, stop tracking your citizens.