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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

National (JavaScript) Security Agency

48 点作者 thewavelength大约 9 年前

11 条评论

PaulRobinson大约 9 年前
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?
skrowl大约 9 年前
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-four大约 9 年前
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?
mpeg大约 9 年前
&#x2F;&#x2F; start comment block<p>That&#x27;s some properly documented code !<p>&#x2F;&#x2F; end comment block
评论 #11644097 未加载
评论 #11643849 未加载
zuck9大约 9 年前
Looks like it was written by a VB programmer, who&#x27;s missing &quot;on error resume next&quot; in JS.
评论 #11644350 未加载
Grue3大约 9 年前
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 未加载
cookiemonsta大约 9 年前
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 未加载
elcapitan大约 9 年前
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 未加载
lewisjoe大约 9 年前
And then I visited their homepage and found the UI to be uglier than the code.
maze-le大约 9 年前
&gt; assets&#x2F;js&#x2F;main.js<p>I smell rails
评论 #11643299 未加载
评论 #11643954 未加载
crisisactor大约 9 年前
Stop advertising the NSA please
评论 #11642854 未加载