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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

GitHub search for 84600 seconds. Oops.

43 点作者 jeremycole大约 11 年前

20 条评论

Steuard大约 11 年前
Honestly, I think there&#x27;s a little something to this submission beyond the &quot;Ha ha, lots of people made typos that could cause big problems&quot; factor.<p>A public repository like GitHub makes checks for common errors like this <i>really easy</i>. Would it be feasible for GitHub or the community to automatically recognize broad classes of these likely errors and notify the authors? How sophisticated could that sort of tool become?<p>Maybe &quot;given enough bots, most bugs are shallow&quot;.
评论 #7717701 未加载
评论 #7717630 未加载
joshstrange大约 11 年前
I wonder if Github will ever reconsider allowing bots [0]. There are bunch of things like this that would be cool to have pull-requests automatically generated for. Security fixes would be another place where I can see bots helping to fix common mistakes.<p>[0] <a href="http://www.wired.com/2012/12/github-bots/" rel="nofollow">http:&#x2F;&#x2F;www.wired.com&#x2F;2012&#x2F;12&#x2F;github-bots&#x2F;</a>
评论 #7717614 未加载
memnips大约 11 年前
86400 seconds is 24 hours. It is surprisingly commonly mis-entered as 84600 seconds, as evidenced by this search. As such, many unintended consequences can ensue.
chubot大约 11 年前
Haha, should be 86400, not 84600.
评论 #7717552 未加载
评论 #7717739 未加载
Xylakant大约 11 年前
It&#x27;s actually not that many places where it&#x27;s wrong: Anything from page 57 to 100 is one repo that does it consistently wrong: <a href="https://github.com/sconklin/solardata" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sconklin&#x2F;solardata</a>, then there&#x27;s quite a few places that are partial matches only (seconds, but not 84600), there&#x27;s quite a few places where it&#x27;s a least not obviously wrong (page 38, where it matches on &quot;PHI( 1) +6.18900e+05-7.84600e+05i Hz&quot;) and a ton of places that get copied around (the first pages are all bundled versions of the sonata cache interface).
strommen大约 11 年前
HN Challenge: name a scenario in which defining a constant as 86400 is better then defining it as (60 * 60 * 24).<p>Or, are there languages where you can&#x27;t declare a constant with a multiplication expression?
评论 #7717618 未加载
评论 #7717617 未加载
评论 #7717620 未加载
nkozyra大约 11 年前
Disturbing enough that - despite having used 86400 a bazillion times (yes, literally) that it didn&#x27;t look wrong at first glance.
markcarlson大约 11 年前
Many of those are legitimately meant to be 23.5 hours, not 24 hours (TTL defaults, approximates for converting seconds to days, etc.)
elwell大约 11 年前
I don&#x27;t think it&#x27;s right to judge someone just because they have 23.5 hour days. To each their own, I say.
akerl_大约 11 年前
Humorous as this is, it doesn&#x27;t seem newsworthy. Maybe submit to The Daily WTF next time?
elwell大约 11 年前
And none of them have any Stars: <a href="https://github.com/search?q=84600+seconds+stars%3A%3E0&amp;type=Repositories&amp;ref=advsearch&amp;l=" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=84600+seconds+stars%3A%3E0&amp;type=...</a>
nicklovescode大约 11 年前
<a href="https://github.com/search?q=%22%3D+funtion%28%29%22&amp;type=Code&amp;ref=searchresults" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=%22%3D+funtion%28%29%22&amp;type=Cod...</a>
Kiro大约 11 年前
I don&#x27;t understand.
评论 #7717524 未加载
评论 #7717561 未加载
评论 #7717586 未加载
评论 #7717526 未加载
评论 #7717535 未加载
评论 #7717517 未加载
评论 #7717522 未加载
评论 #7717532 未加载
评论 #7717520 未加载
nperez大约 11 年前
Even if you&#x27;re using 86400, remember the possibility of leap seconds if you need absolute precision.<p>Time makes my brain hurt sometimes.
oxplot大约 11 年前
This should never be entered like that. Not only it&#x27;s prone to typos, it also requires a comment to accompany it. Since just about every compiler&#x2F;interpreter folds constants, one should write it as 60 * 60 * 24 which would run without a performance hit.
Aaron1011大约 11 年前
I first read this as &#x27;Github search <i>takes</i> 84600 seconds&#x27;. Oops :)
tantalor大约 11 年前
A day is not always 24 hours.<p><a href="http://en.wikipedia.org/wiki/Daylight_saving_time" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Daylight_saving_time</a>
评论 #7717564 未加载
评论 #7717608 未加载
beagle3大约 11 年前
Easy mnemonic: 60 * 60 * 24 = 864e2 (scientific notation). Take down 2 each time, and shove an e.
评论 #7718080 未加载
ejo0大约 11 年前
check out 48600 seconds for ruby, <a href="https://github.com/search?q=48600+seconds&amp;type=Code&amp;ref=searchresults" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=48600+seconds&amp;type=Code&amp;ref=sear...</a>
评论 #7717698 未加载
评论 #7717704 未加载
评论 #7718540 未加载
pkamb大约 11 年前
`60 * 60 * 24`