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.

National (JavaScript) Security Agency

48 pointsby thewavelengthabout 9 years ago

11 comments

PaulRobinsonabout 9 years ago
I feel sorry for the people who wrote this.<p>Which one of us would want a code review by people who did not understand the requirements given by &quot;the client&quot; done on the front page of HN?
skrowlabout 9 years ago
While this code is pretty bad, I&#x27;m going to guess that the NSA reserves their best IT folks for... you know... the assignments other than their public facing website.
评论 #11643832 未加载
vertex-fourabout 9 years ago
Honestly, it&#x27;s... not terrible? It&#x27;s hackish, sure, but the NSA website&#x27;s frontend isn&#x27;t a huge app where good software engineering needs to be practiced - the code does what it needs to do, was likely written quite quickly, and doesn&#x27;t need the likes of webpack to build.<p>In my core projects I&#x27;ll use Ember or React+Redux, but where I just need a couple hundred lines of one-off code for e.g. a marketing site... why not some hackish jQuery?
mpegabout 9 years ago
&#x2F;&#x2F; start comment block<p>That&#x27;s some properly documented code !<p>&#x2F;&#x2F; end comment block
评论 #11644097 未加载
评论 #11643849 未加载
zuck9about 9 years ago
Looks like it was written by a VB programmer, who&#x27;s missing &quot;on error resume next&quot; in JS.
评论 #11644350 未加载
Grue3about 9 years ago
A lot of popular websites have pretty crappily written JS code. The reason it&#x27;s not noticed is that usually it&#x27;s served compressed. The reason why it&#x27;s crappy is that the bulk of functionality is implemented server-side, and the person who ends up writing that code is primarily a server-side programmer who half-asses a JS snippet to finish the feature, and then since it works, it is never refactored. It&#x27;s not &quot;real programming&quot; anyway ;)
评论 #11644584 未加载
cookiemonstaabout 9 years ago
What would be the reason for this:<p>&#x2F;&#x2F; analytics disable if url contains underscore try { if(window.location.href.indexOf(&#x27;_&#x27;) &gt; 0) {window[&#x27;ga-disable-UA-20753548-1&#x27;] = true;} } catch(e) {} });
评论 #11642838 未加载
评论 #11643726 未加载
评论 #11642837 未加载
elcapitanabout 9 years ago
They should add a comment ad in there at the bottom saying<p><pre><code> &#x2F;* Smarter than that stuff? Come work for us. *&#x2F;</code></pre>
评论 #11644071 未加载
lewisjoeabout 9 years ago
And then I visited their homepage and found the UI to be uglier than the code.
maze-leabout 9 years ago
&gt; assets&#x2F;js&#x2F;main.js<p>I smell rails
评论 #11643299 未加载
评论 #11643954 未加载
crisisactorabout 9 years ago
Stop advertising the NSA please
评论 #11642854 未加载