TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A tiny QR code generator – my second webapp

10 pointsby udhbover 11 years ago

7 comments

GeneralMayhemover 11 years ago
Looks like you've already learned the most important lesson of software engineering: don't reinvent the wheel. Offloading the real work to Google probably is the best way to build this app in most cases, but it makes the headline a little misleading, because you didn't actually write a QR generator, you just wrote a text box that proxies to a web API.
评论 #6393638 未加载
mconstableover 11 years ago
<a href="http://www.itwiz.co.uk/search/index.php" rel="nofollow">http:&#x2F;&#x2F;www.itwiz.co.uk&#x2F;search&#x2F;index.php</a><p>Just type &quot;QR&quot; then a space and whatever you want QR&#x27;d<p>Loads of other services too<p>Integrates with your browser&#x27;s search bar too with <a href="http://www.itwiz.co.uk/search/index.php?search=%s" rel="nofollow">http:&#x2F;&#x2F;www.itwiz.co.uk&#x2F;search&#x2F;index.php?search=%s</a>
danielrmayover 11 years ago
Good effort, but you should go for sanitizing the user input before you go ahead and use it.<p>For example, if you enter &quot;&#x27;&#x2F;&gt; Hellooooo!&quot; into your textarea, you can see the result shows the text &quot;Helloooo!&#x27;&#x2F;&gt;&quot; being shown next to the QR code for &quot;&#x27;&#x2F;&gt;&quot;.<p>This is hugely important when writing web applications - you can read a bit more from this stack overflow question: <a href="http://stackoverflow.com/questions/2794137/sanitizing-user-input-before-adding-it-to-the-dom-in-javascript" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2794137&#x2F;sanitizing-user-i...</a><p>You may also want to read up about XSS: <a href="http://en.wikipedia.org/wiki/Cross-site_scripting" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cross-site_scripting</a><p>EDIT: I realise this was just a small, simple, learning project, but it&#x27;s important to learn and be mindful of these considerations.
评论 #6394165 未加载
jorangreefover 11 years ago
I was hoping you had a much shorter embedded version of <a href="http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/" rel="nofollow">http:&#x2F;&#x2F;d-project.googlecode.com&#x2F;svn&#x2F;trunk&#x2F;misc&#x2F;qrcode&#x2F;js&#x2F;</a>
评论 #6394190 未加载
Sae5waipover 11 years ago
Yet another Google Chart APIs QR code &quot;generator&quot;. Come on, seriously, its not so hard to generate it yourself.<p>(Since there is even a JavaScript library to do it for you there is absolutely no excuse to use Googles API)
udhbover 11 years ago
and here is the first one - <a href="https://news.ycombinator.com/item?id=6392134" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6392134</a>
ismaelcover 11 years ago
<a href="https://www.mashape.com/search?query=qr" rel="nofollow">https:&#x2F;&#x2F;www.mashape.com&#x2F;search?query=qr</a>