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.

Things you should do now (2011)

199 pointsby bshanksover 4 years ago

8 comments

evaneliasover 4 years ago
This is from 2011, according to the commit blame info [1]. The advice appears to be from the standpoint of LAMP development a decade ago.<p>[1] <a href="https:&#x2F;&#x2F;secure.phabricator.com&#x2F;source&#x2F;phabricator&#x2F;browse&#x2F;master&#x2F;src&#x2F;docs&#x2F;flavor&#x2F;things_you_should_do_now.diviner$1" rel="nofollow">https:&#x2F;&#x2F;secure.phabricator.com&#x2F;source&#x2F;phabricator&#x2F;browse&#x2F;mas...</a>
评论 #26196036 未加载
borisover 4 years ago
For me #1 would be to add a version to any data format or communication protocol. If you want to know how hard not doing so can bite, don&#x27;t look further than Git and it&#x27;s tourcherous migration from sha1.
评论 #26196569 未加载
评论 #26198179 未加载
评论 #26193432 未加载
评论 #26196474 未加载
marcus_holmesover 4 years ago
Things you should never do: use integers as ID&#x27;s. This is literally a solved problem, and the solution is UUIDs, which were invented for exactly this job.
评论 #26195412 未加载
评论 #26193867 未加载
评论 #26194429 未加载
评论 #26192760 未加载
评论 #26194552 未加载
评论 #26196186 未加载
评论 #26192504 未加载
评论 #26195242 未加载
评论 #26194711 未加载
continuationalover 4 years ago
Don&#x27;t use a raw integer as the ID type. Use different types for different IDs: UserId, OrganizationId, etc.<p>It&#x27;s a common bug to get different ID types mixed up, and a gigantic offset will do nothing to help you with that.
评论 #26196016 未加载
bryanrasmussenover 4 years ago
That start ids at a gigantic number idea is great, even though I&#x27;ve never encountered a bug caused by not doing it.
评论 #26190967 未加载
评论 #26195024 未加载
评论 #26191083 未加载
评论 #26191860 未加载
评论 #26191627 未加载
评论 #26190947 未加载
评论 #26195972 未加载
silvestrovover 4 years ago
&gt; Only Store Valid UTF-8<p>Linux could learn something about filenames here.<p>Personally I would also disallow anything below 32 to avoid having filenames contain escape sequences.<p>I have absolutely no need for a filename that contains an escape character, and would see this as a major bug, like his description of SQL injection. Better to fail fast.
simonblackover 4 years ago
I knew of a trucker once, who when he was starting his transport business, marked his first truck with &quot;Number 8&quot;.<p>It never hurts to make people believe you are bigger and better than you really are.
mobilemidgetover 4 years ago
&quot;As of 2011 Facebook is in the second group, and spends several milliseconds of CPU time sanitizing every display string on its way to the browser, which multiplies out to hundreds of servers worth of CPUs sitting in a datacenter paying the price for the invalid UTF-8 in the databases.&quot;<p>I can imagine how companies will be taxed extra for this somewhere in the (probably not so near) future.
评论 #26191163 未加载