HackerURLs

一次又一次被重新发现的经典。

同一个链接,相隔一年以上,一次又一次被人重新发现、再次冲上 Hacker News 首页。能经受住这种时间检验的,大多是值得一读再读的文章。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从名人堂开始
  • 4,700+篇经过时间检验的经典

Hall of fame

名人堂

在经典库里看全部精选

上首页次数最多、而且有中文导读的 30 篇。时间轴上每个黑点是一次上首页,空心点是一次没冲上去的投稿。

  1. 正在载入经典…

Archive

经典库

按第一次上首页的年份分布,点柱子筛选。

排序

    About

    这些经典是怎么挑出来的

    1. 01

      合并同一个链接

      读取 Hacker News 自 2006 年以来的全部链接投稿,把 http/https、www、跟踪参数等写法不同的同一篇文章合并成一条。

    2. 02

      只留经得起时间的

      同一链接至少两次拿到 50 分以上(约等于上首页),而且两次相隔一年以上;再由 AI 剔除状态页、产品首页和新闻事件。

    3. 03

      写导读、译评论

      上首页次数最多的 2,000 篇配上中文导读、"为什么经久不衰",并精选翻译 HN 高赞评论。导读由 AI 生成,可能有误。

    系统与基础设施bugs.launchpad.net

    妻子抱怨 OpenOffice 每逢周二无法打印(2009)

    “My wife has complained that OpenOffice will never print on Tuesdays” (2009)

    3次上首页
    6年跨度
    1,240累计得分
    399条评论

    2014 — 2020,它一次次回到首页

    黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。

    导读

    这是 2009 年 Ubuntu 上一个真实 bug 报告的评论区:用户的 OpenOffice 打印机每逢周二就无法打印,最终发现与 CUPS 定时清理任务有关。这个离奇的“只在周二坏”的 bug 多次登上 HN,评论区变成大家分享各种诡异环境相关 bug 故事的聚集地。

    为什么经久不衰:它把“看似荒谬的 bug 报告往往有真实原因”这个道理讲得生动难忘,评论区里一众经典诡异 bug 故事至今读来仍有趣且有启发。

    关键词 诡异bugCUPS打印机调试故事

    HN 评论精选

    引出经典的“香草冰淇淋汽车”bug 案例,说明时间相关的诡异 bug 由来已久

    这类 bug 最著名的例子大概是那个“汽车对香草冰淇淋过敏”的故事:车主每次开车去买冰淇淋,买某些口味时车能重新启动,买香草口味时车就打不着火。

    soared查看英文原文

    Arguably the most famous example of a bug like this is the person who would drive to the store to buy ice cream and depending on what flavor of ice cream they bought, the car would or would not start back up. https://www.kepner-tregoe.com/blog/help-my-car-is-allergic-to-vanilla-ice-cream-a-study-in-problem-solving-the-complete-case/

    分享手表磁场误触发 MacBook 合盖传感器的诡异 bug 及简单修复思路

    我的 2011 款 MacBook Air 会随机黑屏。排查后发现是进入睡眠而非死机,Apple 也查不出原因,换新机后问题依旧——说明是环境因素。最后发现是我手腕上的精工动能手表触发了机身侧面的磁性感应合盖传感器:用左手拿电脑时就会触发。其实修复很简单:只有左右两个传感器同时触发才睡眠。

    gnicholas查看英文原文

    I had a 2011 Macbook Air that would go blank randomly. After some investigation, I determined it was often when I was moving it from one place to another (sometimes even just repositioning on my lap), and that it was going to sleep, not completely crashing. Of course, MBAs have no moving parts, and there were no rattles when I shook the machine and listened. Apple also could not figure it out. After replacing several parts, they eventually replaced the unit with a newer model (it was 2014 at the time). Soon after getting my new MBA up and running, it experienced the exact same glitch. I knew it had to be something environmental, since the odds would be astronomical that they would have replaced my unit with one that had the same rare glitch. But I was traveling, which eliminated anything relating to my house, neighborhood, power lines, etc. Then I looked at my wrist, on which I wore a Seiko Kinetic watch. It was triggering the magnetic lid-closure detector, which is on the sides of the base of the MBA. When I picked up my computer with my left hand (I'm right-handed, so this was less common), it would trip the sensor. Interestingly, there is a very easy fix for this (and similar issues, mentioned in other comments in this thread), which is to only sleep the machine if both left AND right sensors are triggered. If it seems like the left side of the lid is closed and the right side is not closed, probably it's a false positive!

    用未初始化变量与 '\n' 的 ASCII 码解释“字节数 mod 256”的诡异 bug

    我职业生涯最喜欢的 bug:HTTP 库随机返回完全空的响应。后来发现并非随机——只要整个请求的字节数恰好是 10 mod 256 就会复现。多年后才想通:解析函数里有个未初始化变量,先判断 c != '\n' 再读入,而换行符 '\n' 的 ASCII 码恰好是 10。

    sampsonetics查看英文原文

    Reminds me of my favorite bug story from my own career. It was in my first year or two out of college. We were using a commercial C++ library for making HTTP calls out to another service. The initial symptom of the bug was that random requests would appear to come back with empty responses -- not just empty bodies, but the entire response was empty (not even any headers). After a fair amount of testing, I was somehow able to determine that it wasn't actually random. The empty response occurred whenever the size in bytes of the entire request (headers and body together) was exactly 10 modulo 256, for example 266 bytes or 1034 bytes or 4106 bytes. Weird, right? I went ahead and worked around the problem by putting in a heuristic when constructing the request: If the body size was such that the total request size would end up being close to 10 modulo 256, based on empirical knowledge of the typical size of our request headers, then add a dummy header to get out of the danger zone. That got us past the problem, but made me queasy. At the time, I had looked at the code and noticed an uninitialized variable in the response parsing function, but it didn't really hit me until much later. The code was something like this: void read_status_line(char *line) { char c; while (c != '\n') { c = read_next_byte(); *(line++) = c; } } Obviously this is wrong because it's checking c before reading it! But why the 10 modulo 256 condition? Of course, the ASCII code for newline is 10. Duh. So there must have been an earlier call stack where some other function had a local variable storing the length of the request, and this function's c variable landed smack-dab on the least-significant byte of that earlier value. Arrrrgh!

    感叹用户能凭观察归纳出“只在周二坏”这种规律非常难得

    这个故事最让我惊讶的其实是:他妻子居然注意到了打印机只在周二坏。无论成功失败多少次,我都不可能归纳出这种规律。很多人真能察觉到这种相关性吗?

    icambron查看英文原文

    The most interesting part of this story to me is actually that his wife noticed that the printer didn't work on Tuesdays. I'd have never, ever put that together, no matter how many times I saw it succeed or fail. I'd actually be more likely to figure it out by debugging the CUPS script than I would be observing my printer's behavior. Can a lot of people pick up on correlations like that? "Ever notice how it's always Tuesday when the printer won't work?"

    历次讨论

    同类还值得读

    1. TTY 揭秘(2008)

      The TTY demystified (2008)

      经典文章深入剖析了 Unix/Linux 中 TTY 子系统的工作原理,包括线路规程、终端驱动、信号与控制字符等机制。

      系统与基础设施上首页 11 次 · 2009–2025linusakesson.net编辑精选
    2. 为什么 GNU grep 这么快

      Why GNU grep is Fast

      FreeBSD 邮件列表上一篇广为流传的帖子,解释 GNU grep 为什么快:核心在于 Boyer-Moore 字符串搜索算法配合精心优化的内部循环和 I/O,让程序在搜索时“…

      系统与基础设施上首页 9 次 · 2010–2022lists.freebsd.org
    3. Xplain:为普通人讲解 X11

      Xplain – Explaining X11 for the rest of us

      《Xplain》是作者(HN 用户 Jasper_)写的一系列 X11 长文,用他在浏览器中重建的 X11 绘图模型做交互演示,讲解 X11 的绘图模型与窗口系统设计。

      系统与基础设施上首页 6 次 · 2013–2020magcius.github.io编辑精选
    4. 旋风教程:为 Linux 创建极小 ELF 可执行文件(1999)

      A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (1999)

      breadbox 写于 1999 年的经典教程,主题是如何为 Linux 手工构造并裁剪出体积极小的 ELF 可执行文件。

      系统与基础设施上首页 6 次 · 2007–2025muppetlabs.com
    5. PostgreSQL 内部原理

      The internals of PostgreSQL

      《The Internals of PostgreSQL》是一本免费在线书籍,系统讲解 PostgreSQL 的内部实现,包括查询处理、并发控制、WAL、缓冲区管理等核心机制。

      系统与基础设施上首页 5 次 · 2017–2025interdb.jp编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。