每日思考文摘 · 2026-10-21Daily Thought Digest · 2026-10-21
发布于 2026-10-21Published 2026-10-21
今日深读Today's Deep Read
TDD 的邪教心理,AI 编程工具把它复制了十遍The Cult Psychology of TDD, and How AI Coding Tools Reinvented It 10x
Drew DeVault 2026 年 1 月写了一篇文章,把 TDD(测试驱动开发)和 AI 编程工具放在一起比较。他先承认 TDD 有真价值:先写一个会失败的测试、再写实现让它变绿,这个快速反馈回路确实帮他把很多工作往前推——他自己用了十几年。但他警惕的是『围绕自动测试长出来的邪教』:一批工具和实践围着 TDD 营造出『好工程师』的氛围——盯着一千个绿灯、盯着覆盖率百分比爬到 100%、README 上不断新增的绿色徽章、Jenkins 发到 Slack 的测试消息、还有把 CTO 的纸板像摆在『最后一个弄挂构建的人』工位上的传统。这些让人产生强烈的『我在认真工作、我很优秀』的感觉,但这个感觉和软件是否满足用户需求之间,没有任何必然联系。In January 2026 Drew DeVault published an essay putting test-driven development (TDD) and AI coding tools side by side. He starts by conceding TDD's real value: write a failing test, then make it green — the fast feedback loop genuinely moves work forward, and he used it for years. What he distrusts is the cult that grew around automated testing: the ecosystem of tools and rituals that manufacture the vibes of a good engineer — a thousand green lights, a coverage percentage climbing to 100%, fresh green README badges, Jenkins messages in Slack, and a cardboard cutout of the CTO kept on the desk of whoever last broke the build. None of it is connected by necessity to whether the software actually meets its users' needs.
他指出了两个 TDD 教友不愿意正视的裂缝。第一,TDD 会反过来塑造代码:为了让代码『可测试』,你会把设计往测试方便的方向掰——这有时候确实让代码更好,但『有时候』不等于『必然』。第二,更根本的:测试能证明『这个函数做了它被期望的事』,却不能保证『被期望的事本身是对的』。一千个通过的测试加 100% 覆盖率,只能证明测试在通过,不能证明软件满足用户或业务的真实需要——可它给你信心,而这份信心可能是放错地方的。He points at two cracks TDD's true believers won't look at. First, TDD shapes your code: to make it 'testable' you bend the design toward what tests find easy — which sometimes improves the code, but 'sometimes' is not 'necessarily'. Second and deeper: passing tests prove a function does the behavior you expected, not that the expected behavior was right. A thousand green tests plus 100% coverage proves the tests are passing; it cannot prove the software meets the real requirement — yet it hands you confidence, and that confidence may be misplaced.
DeVault 的核心论点是:TDD 最大的问题不是逻辑上的,而是心理学上的——它的反馈回路是一套多巴胺系统,而 AI 编程工具触发了完全相同的机制,并放大了十倍。一个编程水平中庸的人,用 agent 就能获得『我是 10 倍工程师』的快感——那种坐在天才旁边十年也没体验过的感觉;输出翻了十倍,曾经要艰难搭建的『简陋木屋』,现在一口气『独自写出大教堂』。但大教堂不是大教堂:架构经不起看,一旦代码的光环褪去、bug 开始冒头,真正手写得好的人依然赢。一千个漂亮的绿色测试、99.9% 的覆盖率,地基照样是烂的。His central claim: TDD's biggest problem isn't logical, it's psychological — the feedback loop is a dopamine system, and AI coding tools tap into the exact same reflex, amplified tenfold. A merely-so-so programmer using agents finally gets the rush of being a 10× engineer — the feeling they chased next to great programmers for a decade without ever earning it. Output goes up 10x; the homely shack they used to struggle to build is replaced by solo-coding a great cathedral in a fraction of the time. But the cathedrals aren't cathedrals: the architecture is nonsense, and once the gleam wears off and bugs surface, the hand-writing great programmer still wins. 99.9% coverage on a thousand beautiful green tests, foundations still rotten.
文章最后有一段罕见的诚实。他说自己明白这一切——知道 AI 数据中心是最快增长的碳排放源之一、正在耗掉新鲜水源、让周边居民的电价飙升、生产的宣传材料在撕裂社会、这些工具的最终目的可能是让用户自己失业——『可一旦尝过那种滋味,这一切问题就显得很遥远了。』这也是全文最值得琢磨的地方:它跳出了『TDD 好还是坏』的技术争论,把问题拉到更根本的层面——我们的工程实践,有多少是被工程价值驱动的,多少是被心理反馈驱动的?The closing paragraph is unusually honest. DeVault says he understands why people chase this dragon anyway — the colossal waste of fresh water, datacenters as one of the fastest-growing sources of carbon emissions, neighbors' power bills and rolling outages, the reams of propaganda these machines produce, and the plain fact that the tools' ultimate purpose is to put the users out of a job — but 'once you get a taste of what it feels like to be great… I suppose all those problems seem so far away.' That reframing is the essay's real contribution: not 'is TDD right or wrong,' but 'how much of our engineering practice is driven by psychological feedback rather than engineering value?'
给读者的带走项很具体:先问『测试有没有验证正确的行为』,再问『覆盖率多少』。一个 20% 覆盖率但每个测试都戳在真风险上的代码库,胜过 100% 覆盖率但大半在测边缘情况的代码库。这个判断没法自动化——AI 时代这条尤其成立:AI 工具把『快速反馈』做到了极致,如果反馈的来源本身不可信,你只是在放大一个有问题的系统。The takeaway is concrete: ask 'do my tests verify the right behavior?' before you ask 'what's my coverage?' A codebase with 20% coverage where every test hits a real risk beats one at 100% where most tests are busywork. No tool can make that judgment for you — and in the AI era this matters more, because AI tools have pushed rapid feedback to its limit. If the source of the feedback isn't trustworthy, you're just amplifying a flawed system.
AI 思考AI Thoughts
- AI 时代数学是黄金时代还是黑暗时代?Will AI Make Mathematics a Golden Age or a Dark Age?
- Maggi 提出了一个对称的两种未来:『黄金时代』是 AI 工具被嵌入科学体系,增强而非替代人类研究者;『黑暗时代』是 AI 短期疯狂产出,但独立人类的科学能力持续萎缩,知识变得与人类理解脱节——那种脱节本身就是黑暗所在。Maggi sketches two symmetric futures: in the 'golden age,' AI tools get embedded in the scientific ecosystem, augmenting rather than replacing human researchers; in the 'dark age,' AI produces spectacular short-term output while independent human scientific capacity atrophies — and knowledge becomes alien to human understanding. That alienation, not scarcity, is the real darkness.
- 他给出了一个具体的观察支撑:LLM 在 Lean 里写出的长证明,其『自然语言翻译』质量与证明长度成反比——证明越长,翻译越难以理解。这意味着即使 AI 证明了重要定理,人类『真正理解它』的门槛在提高,不是降低。He grounds this in a concrete observation: the longer a Lean proof an LLM produces, the less faithful and readable its natural-language translation tends to be. So even when the AI proves something important, the barrier to genuinely understanding it goes up, not down.
- 他因此反对『数学完了,机器会证定理』的说法:没有理解数学的人类,数学就不是人类的数学,只是基准测试。他的结论是社会需要更多数学家,不是更少——『多得多』。He therefore rejects the claim that mathematics is over because machines can prove theorems: without humans who understand mathematics, there is no human mathematics — just benchmarking. His conclusion: society will need more mathematicians, not fewer. A lot more.
- Agent 不是魔法:环境、工具清单与复合错误率(2025 年 1 月)Agents Aren't Magic: Environments, Tool Inventories, and Compounding Error (Jan 2025)
- Chip Huyen 从 1995 年 Russell & Norvig 的教科书定义出发重新锚定『agent』这个被用滥的词:能感知环境、并对环境行动的就是 agent——ChatGPT 是 agent,RAG 系统也是 agent。决定一个 agent 能力的,是它的『环境』和它的『动作集合』(工具清单),而且两者互相锁死:国际象棋环境里只有合法棋步;机器人如果只会游泳,就被困在水里。Chip Huyen re-anchors the worn-out word 'agent' using the 1995 Russell & Norvig definition: anything that perceives an environment and acts on it. What determines an agent's power is its environment and its set of actions (its tool inventory), and the two lock each other: in a chess environment the only actions are legal moves; if a robot can only swim, it's confined to water.
- 她给出一个很少有人在 hype 期说出口的算术:agent 要完成多步任务,错误会按步数复合——每步准确率 95%,十步之后整体成功率只剩 60%,一百步之后只剩 0.6%。这就是『为什么 agent 的单次问答测不出真实水平』的根本原因:它的失败模式是非线性的,跟聊天机器人完全不是一类问题。She does the arithmetic almost nobody said during the hype: agents take many steps, and errors compound multiplicatively — 95% accuracy per step is 60% success over 10 steps, and 0.6% over 100. This is the real reason a single-turn benchmark tells you nothing about an agent: its failure mode is nonlinear, categorically different from a chatbot's.
- 她特别注明:这是一个『没有既定理论框架』的领域,自己是在『尽力搭一个框架,之后还会随领域演化』。由此引出她的两个反直觉建议——工具不是越多越好(越多越难用好,要实验取舍);『上网』既是防腐剂(模型知识会过期)也是污染源,互联网 API 要像选同事一样选。判断一个 agent,看它的环境、动作集和规划器,别看它宣传的『自主性』。She flags the field as one 'with no established theoretical framework' — her framework is a best-effort draft that will evolve. Two counterintuitive consequences: more tools isn't better (the bigger the inventory, the harder to use it well, so prune by experiment), and web access is both the preservative against a stale model and a gateway to the cesspools — pick your internet APIs like you'd pick coworkers. Judge an agent by its environment, action set, and planner, not by its advertised autonomy.
数学之美Mathematics
每日 Lean 谜题 · 周三Daily Lean Puzzle · Wednesday ★★★☆☆☆☆
六整除 n 的立方减 n(★3)Six Divides n cubed minus n (★3)
证明:对任意整数 $n$,$n^3 - n$ 都能被 $6$ 整除(即 $6 \mid n^3 - n$)。Prove that for every integer $n$, $n^3 - n$ is divisible by $6$ (i.e. $6 \mid n^3 - n$).
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
-- level: 3
import Mathlib
/-! Prove that $n^3 - n$ is divisible by $6$ for every integer $n$. (Idea: it is a product of three consecutive integers.) -/
theorem six_dvd_cube_sub (n : ℤ) : 6 ∣ n ^ 3 - n := by
sorry
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
题目注释已经点了方向:$n^3 - n$ 恰好是三个连续整数的乘积。连续意味着什么?另外,『被 6 整除』在 Lean 里可以翻译成『除以 6 余 0』的目标——翻译成余数之后,剩下的就是机器最喜欢的事:有限个情况。The comment in the problem already points the way: $n^3 - n$ is exactly a product of three consecutive integers. What does 'consecutive' give you? Also, in Lean you can rewrite 'divisible by 6' as a goal about remainders mod 6 — and once it's a remainder, what's left is the thing machines love most: finitely many cases.
答案与讲解Solution & walkthrough
- 数学第一步是因式分解:$n^3 - n = n(n^2 - 1) = (n-1) \cdot n \cdot (n+1)$,三个连续整数的乘积。Lean 里这一行是 have h : n^3 - n = (n - 1) * n * (n + 1) := by ring——ring 是多项式恒等式的判定器,把两边都展开成规范形式再比较,所以这个 have 不花任何心思。Step one in math is the factorization: $n^3 - n = n(n^2 - 1) = (n-1) \cdot n \cdot (n+1)$, a product of three consecutive integers. In Lean this is one line: have h : n^3 - n = (n - 1) * n * (n + 1) := by ring — ring is the decision procedure for polynomial identities, normalizing both sides and comparing, so the have costs you no thought.
- 数学上经典的做法:三个连续整数里必有一个偶数(被 2 整除),必有一个被 3 整除;2 与 3 互素,所以乘积被 6 整除。这份证明不直接翻译进 Lean,形式化选了另一条同样严谨的路:把整除目标换算成余数目标。Lean 里 rw [h, Int.dvd_iff_emod_eq_zero] 把 goal 变成 ((n - 1) * n * (n + 1)) % 6 = 0——对应数学上『证被 6 整除 ⟺ 证余数为 0』这一步。The classical math proof: among three consecutive integers one is even and one is a multiple of 3; 2 and 3 are coprime, so the product is a multiple of 6. The formalization doesn't translate that proof directly — it takes a second road that is equally rigorous: convert the divisibility goal into a remainder goal. In Lean, rw [h, Int.dvd_iff_emod_eq_zero] turns the goal into ((n - 1) * n * (n + 1)) % 6 = 0, which is exactly the math step 'divisible by 6 if and only if the remainder mod 6 is zero.'
- 整数除以 6 的余数只能是 0、1、2、3、4、5——六个情况穷尽一切可能。Lean 里 have hr : n % 6 = 0 ∨ n % 6 = 1 ∨ ... ∨ n % 6 = 5 := by omega——这条显然的穷举正好落在 omega(线性整数算术的判定器)的能力半径内。对应数学上『n ≡ 0, ±1, ±2, 3 (mod 6)』的完备性。An integer's remainder mod 6 can only be 0, 1, 2, 3, 4, or 5 — six cases, and they exhaust the universe. In Lean: have hr : n % 6 = 0 ∨ n % 6 = 1 ∨ ... ∨ n % 6 = 5 := by omega. The omega tactic is the decision procedure for linear integer arithmetic, and this exhaustive dichotomy sits squarely in its reach. It corresponds to the completeness of the math case split $n \equiv 0, \pm 1, \pm 2, 3 \pmod{6}$.
- 最后逐案验证:rcases hr with hr | hr | hr | hr | hr | hr 把一个六路析取拆成六个小 goal,每个小 goal 里都多了一条假设 n % 6 = k。分号加尖号(<;>)让后面的 tactic 对六个 goal 全部执行:simp [Int.mul_emod, Int.sub_emod, Int.add_emod, hr] 把『乘/减/加与取余可交换』的三条引理塞进去,余数就被推着穿进乘积,每个小 goal 化简成 $0 = 0$ 自动关闭。例如 n ≡ 2 时,(n-1)·n·(n+1) ≡ 1·2·3 = 6 ≡ 0。Then verify case by case: rcases hr with hr | hr | hr | hr | hr | hr splits the six-way disjunction into six goals, each carrying an extra hypothesis n % 6 = k. The <;> applies the next tactic to all six: simp [Int.mul_emod, Int.sub_emod, Int.add_emod, hr] feeds in the three lemmas saying remainder commutes with multiplication, subtraction, and addition, so the mod gets pushed down into the product and every goal collapses to 0 = 0 and closes itself. Example: when n ≡ 2, (n-1)·n·(n+1) ≡ 1·2·3 = 6 ≡ 0.
- 回头看,这个证明其实展示了同一件事的两种证法:结构式(连续三个数必含 2 和 3 的倍数,能推广到『k 个连续整数的乘积被 k! 整除』)和计算式(模 6 穷举)。Lean 不问哪种更优雅,只问哪种能被机器逐步核查——这里它选了后者,而前者的洞察仍然值得你记住,因为它才是『为什么这永远成立』的答案。Looking back, the proof quietly displays two ways to prove the same fact: the structural way (consecutive integers must include a multiple of 2 and of 3 — which generalizes to 'a product of k consecutive integers is divisible by k!') and the computational way (check six residue cases). Lean doesn't ask which is more elegant, only which the machine can check step by step — and here it chose the latter. The former insight is still worth keeping: it's the answer to why this never fails.
-- level: 3
import Mathlib
/-! Prove that $n^3 - n$ is divisible by $6$ for every integer $n$. (Idea: it is a product of three consecutive integers.) -/
theorem six_dvd_cube_sub (n : ℤ) : 6 ∣ n ^ 3 - n := by
have h : n ^ 3 - n = (n - 1) * n * (n + 1) := by ring
rw [h, Int.dvd_iff_emod_eq_zero]
have hr : n % 6 = 0 ∨ n % 6 = 1 ∨ n % 6 = 2 ∨ n % 6 = 3 ∨ n % 6 = 4 ∨ n % 6 = 5 := by omega
rcases hr with hr | hr | hr | hr | hr | hr <;>
simp [Int.mul_emod, Int.sub_emod, Int.add_emod, hr]
人的思考A human's take
Binomial coefficient(Wikipedia) — Wikipedia 社区(条目为社区长期维护的人工写作)
条目的讲述顺序本身就回答了这道谜题:它先定义 $\binom{n}{k}$ 为『从 n 个东西里选 k 个』的方案数(比如从 $\{1,2,3,4\}$ 里选 2 个恰好 6 种),在任何公式出现之前先把『这是一个计数』钉死;随后才给出乘法公式——分子 $n(n-1)\cdots(n-k+1)$ 是降阶乘,除以 $k!$ 得到二项式系数。于是『k 个连续整数的乘积必被 $k!$ 整除』就不再是算术巧合:这个商本来就在数实实在在的对象,整数性是定义给的。条目接着用『某个元素 i 进组或不进组』给出一行帕斯卡恒等式的组合证明,并把上指标推广到复数——靠的仍是降阶乘那组基。这正是本题的最佳视角:$n^3 - n = 6\binom{n+1}{3}$,除以 6 就是在数三元子集。The article's order of presentation is itself the answer to this puzzle: it first defines $\binom{n}{k}$ as the number of ways to choose $k$ objects from $n$ (e.g. exactly 6 two-element subsets of $\{1,2,3,4\}$), pinning down 'this is a count' before any formula appears; only then does it give the multiplicative formula — numerator $n(n-1)\cdots(n-k+1)$, a falling factorial, over $k!$. So 'a product of $k$ consecutive integers is divisible by $k!$' stops being an arithmetic coincidence: the quotient was counting real objects all along, and its integrality comes from the definition. The entry then proves Pascal's identity combinatorially in one line — split the $k$-subsets by whether a fixed element $i$ is in them — and extends the top index to complex numbers via the falling-factorial basis. Which is exactly the best vantage on today's problem: $n^3 - n = 6\binom{n+1}{3}$; dividing by six is counting 3-element subsets.
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
『6 整除 n³ − n』看起来像一道练习题,但它藏着一个很少被讲透的视角。把证明拆开:(n−1)·n·(n+1)/6 是什么?它恰好是组合数 $\binom{n+1}{3}$——从 n+1 个东西里取 3 个的方案数。也就是说,『三个连续整数的乘积必被 6 整除』根本不是什么整除上的巧合:这个商本身在数一个实实在在的东西,一个计数对象的值当然是整数。把同样句式写下去:k 个连续整数的乘积被 k! 整除,因为除以 k! 之后就是 $\binom{n+k-1}{k}$。数学家会说,n³ − n 只是整数取值多项式世界的一个居民——多项式不用 $1, n, n^2$ 这组基,改用 $n, \binom{n}{2}, \binom{n}{3}$ 这组基来写,系数就自动变得诚实:n³ − n = 6·$\binom{n+1}{3}$,一展开就把『为什么总是 6 的倍数』写在了脸上。Lean 这篇证明选择了最机械的路线——模 6 穷举六案,omega 和 simp 接管一切,六个小 goal 各自啪嗒关闭,像六张多米诺骨牌。这恰好是形式化系统的性格:它不关心『这为什么必然如此』,只关心『每一步都能被核查』。而数学的趣味在于两种性格的互补:穷举让你确信它成立,组合解释让你明白它为什么非成立不可。读完答案以后,合上编辑器,试着用一句话向自己解释:『因为除以 6 就是在数三元子集』——什么时候这句话脱口而出,什么时候这道 ★3 才算真正做完。'Six divides n³ − n' looks like a drill, but it hides a viewpoint rarely spelled out. Take apart the proof: what is (n−1)·n·(n+1)/6? It is exactly the binomial coefficient $\binom{n+1}{3}$ — the number of ways to choose 3 objects from n+1. So 'the product of three consecutive integers is divisible by 6' is no arithmetic coincidence at all: the quotient itself is counting something real, and the value of a genuine count is of course an integer. Keep writing the same sentence: the product of k consecutive integers is divisible by k!, because dividing by k! gives $\binom{n+k-1}{k}$. A mathematician would say n³ − n is just one resident of the world of integer-valued polynomials — switch the basis from $1, n, n^2$ to $n, \binom{n}{2}, \binom{n}{3}$ and the coefficients become honest: n³ − n = 6·$\binom{n+1}{3}$, wearing its reason for being a multiple of six right on its face. The Lean proof above takes the most mechanical route — six residue cases, omega and simp doing the pushing, six small goals snapping shut one by one like dominoes. That is the temperament of a formal system: it asks not 'why must this be so' but 'can every step be checked'. The pleasure of math lives in the complement: exhaustion convinces you it's true; the counting interpretation shows you it couldn't be otherwise. After reading the solution, close the editor and try to say it to yourself in one sentence: 'because dividing by six is just counting 3-element subsets.' The moment that comes out easily, you've actually finished this ★3.
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目来自本站题库Problem from this site's puzzle bank · Lean v4.35.0 · Mathlib 56a0058
- 无穷序数:魔鬼的硬币袋子Infinite Ordinals: The Devil's Coin Bag
- Propp 用一个故事开头:魔鬼给你一袋美国硬币,可以随时往袋里加(但只能加有限多枚),你每天必须取出一枚花掉。如果你取出的比一分大,魔鬼就把一枚换成一百万枚小面额硬币给你。问题是:你能永远不玩完吗?直觉上好像可以——取一角就变成一百万个五分——但其实不行。Propp opens with a story: the devil puts finite-but-arbitrarily-large numbers of US coins in a bag and lets you take one out per day; when you remove anything bigger than a penny, the devil swaps in a million smaller denominations. Can you play forever? It seems like it — a dime becomes a million nickels — but the answer is no.
- 这直接引出了 Cantor 序数的核心概念:序数不只是『有多长』,而是有序的无穷——$\omega$、$\omega+1$、$\omega\cdot 2$、$\omega^2$……每个都是严格比前一个大的无穷。Propp 的历史叙述把这条路走完整:从 1870 年 Cantor 解三角级数唯一性问题(没有『沉默的第二种配方』),到 1871 年发现任意有限集合都是『唯一性集合』,再到发现无穷的唯一性集合,以及把集合按排名分层——从有限排名 0、1、2…到 $\infty$、$\infty+1$、$\infty+2$……This leads directly to Cantor's ordinals: not just 'how many' but 'how ordered.' $\omega$, $\omega+1$, $\omega\cdot 2$, $\omega^2$… each strictly larger than the last, yet all infinite. Propp walks the full historical arc: from Cantor's 1870 solution to the uniqueness problem for trigonometric series (no 'second recipe for silence') to the discovery that infinite sets can also be uniqueness sets, with a hierarchy of ranks — finite 0, 1, 2… then $\infty$, $\infty+1$, $\infty+2$…
- 最反直觉的一点:$\infty + 1$ 严格大于 $\infty$。这不是文字游戏——$\omega+1$ 的序数排名严格高于 $\omega$,因为 Cantor 可以构造排名 $\omega+1$ 的唯一性集合,却不能构造排名 $\omega$ 的更大的唯一性集合。这比『无穷加一还是无穷』的朴素直觉要走得深得多,也是 Cantor 真正革命性的地方。The most counterintuitive point: $\infty + 1$ is strictly greater than $\infty$. Not wordplay — Cantor can construct a uniqueness set of rank $\omega+1$ but not a larger one of rank $\omega$. That's far deeper than the naive 'infinity plus one is still infinity,' and it's where Cantor's revolution really lives.
- 让 AI 比较不同证法的『强度』:Tao 的第十 Heegner 数挑战Comparing the Strength of Proofs with AI: Tao's Tenth Heegner Number Challenge
- Gauss 认为只有 9 个二次判别式的整数环有唯一分解性质(即 9 个 Heegner 数);这个猜想直到 1952 年 Heegner 才证明。在此之前,Heilbronn–Linfoot(1934)用 Deuring–Heilbronn 排斥现象证明了:最多还有一个未发现的 Heegner 数,但这个证明是『无效的』——没有给出上界。Gauss believed only nine quadratic discriminants have unique factorization in their rings of integers (the nine Heegner numbers). The conjecture wasn't proven until Heegner (1952). Before that, Heilbronn–Linfoot (1934) used the Deuring–Heilbronn repulsion phenomenon to show at most one more could exist, but the proof was ineffective — no upper bound on that tenth discriminant.
- Tao 注意到,近几十年来对排除 Landau–Siegel 零点的各种新方法(包括 AI 相关的 quasi-Riemann 结果)在原理上都能给出第十判别式的有效上界,但把估计量化到具体常数是极其繁琐的计算工作——恰好是 AI 擅长、人类不想做的。Tao observes that several new (and effective) methods for ruling out Landau–Siegel zeroes, including the AI-era 'quasi-Riemann' results, should in principle yield explicit upper bounds on a hypothetical tenth discriminant — but making the estimates quantitative down to a concrete constant is exactly the tedious work that AI is good at and humans don't want to do.
- 于是这个挑战变成多用途工具:如果你的 AI 上界低于直接计算能覆盖的范围,你就得到了一个新的、可形式化的 class number one 证明;同时比较不同证法路径能揭示哪些安排更有效;甚至可能激发出全新的论证思路。The challenge thus becomes a multi-purpose tool: if your AI-derived bound falls below the threshold where direct computation resolves the remaining candidates, you've found a new, formalizable proof of the class number one problem; comparing bounds across different proof paths reveals which arrangements are strongest; and the exercise may even spur entirely new arguments.
- 写给失忆者的拉格朗日乘子法:约束优化为什么找『平行梯度』(2013 年)Lagrangians for the Amnesiac: Why Constrained Optima Mean Parallel Gradients (2013)
- Kun 的动机很坦白:『我经常忘记这些基础微积分操作,所以值得写下来当练习』——这篇 2013 年的文章是写给失忆者(也就是未来的自己)的。他的立场贯穿全文:不背套路,只留一条随时能重新推出来的逻辑链。全文只预设三件事:会向量与点积、会偏导、知道可导函数在一元里极值点导数为零。Kun's motivation is disarmingly honest: 'I often forget how to do these basic calculus-type things, so it's good practice.' The whole 2013 essay is written for the amnesiac — his future self — and stakes out a position: don't memorize recipes, keep a chain of reasoning you can re-walk. He presumes only three things: vectors and dot products, partial derivatives, and the single-variable fact that differentiable extrema have zero derivative.
- 第一步先把梯度讲成几何而不是公式:函数沿方向 $v$ 的增长率就是 $\langle \nabla f, v \rangle$;由点积的余弦形式 $\langle v, w \rangle = \|v\| \|w\| \cos\theta$ 立刻得到——方向取成梯度本身时最大,所以梯度指向最陡上升方向,与梯度垂直的方向导数为零。极值点处『任何方向都不上升』,用线性代数一推就是梯度为零向量。First he rebuilds the gradient as geometry, not formula: the rate of growth of $f$ along a direction $v$ is the inner product $\langle \nabla f, v \rangle$; from the cosine form $\langle v, w \rangle = \|v\| \|w\| \cos\theta$ it falls out instantly that the inner product is maximized when $v$ points along the gradient — so the gradient is the direction of steepest ascent, and directions perpendicular to it have derivative zero. At a local extremum nothing rises in any direction, and a small linear-algebra argument forces the gradient to be the zero vector.
- 然后是全文的灵魂:要在曲线 $g = 0$ 上最大化 $f$,最优点处 $f$ 的上升方向必须被曲线『挡住』——也就是 $\nabla f$ 与 $\nabla g$ 平行。$L = f + \sum \lambda_i g_i$ 里的 $\lambda$ 不是魔法,它就是这个『平行比例系数』的占位符:把 $\nabla L = 0$ 摊开,前面几条恰好是 $\nabla f = \lambda \nabla g$,最后一条恰好回到约束本身。Then the soul of the piece: to maximize $f$ while staying on the curve $g = 0$, at an optimum the uphill direction of $f$ must be blocked by the curve — $\nabla f$ has to be parallel to $\nabla g$. The $\lambda$ in $L = f + \sum \lambda_i g_i$ isn't magic; it's the placeholder for that proportionality factor. Expand $\nabla L = 0$: the first lines are exactly $\nabla f = \lambda \nabla g$, and the last line is exactly the constraint again.
- 他还顺手做了两次『祛魅』:判断极大/极小/鞍点要看 Hessian 矩阵的特征值——但大多数实际问题已知存在唯一全局最优,根本不用算特征值;以及『把约束写成 =0 的形式』这种约定,背后只是因为梯度要求的是『哪里为零』。带走的不只是拉格朗日法,而是一个标准:一个知识点你什么时候才算真会——能在忘记之后三分钟内自己重新发明它。He throws in two demystifications for free: telling maxima from minima and saddles technically needs eigenvalues of the Hessian, but in most applied problems a unique global optimum is already known to exist, so you never compute them; and the ritual of 'rewrite constraints as = 0' exists only because gradients hunt for zeroes. What you actually take away is his standard for mastery: you really know a piece of math when you can re-invent it, from nothing, three minutes after forgetting it.
程序员随想Programmer Reflections
- 系列电视的结构性困境:角色不能改变,但故事需要改变(2020 年)The Structural Dilemma of Serialized TV: Characters Can't Change, but Stories Need To (2020)
- Luu 在 2020 年这篇从《星际迷航:远航者》(Voyager)切入:该剧前提很好——联邦和叛军混合船员,离地球几千万光年,需要 70 年才能回家。但系列电视的结构性要求让角色不能改变:如果角色改变了,观众下周回来就找不到原来的那个人了。可故事的核心要求恰恰是角色改变。这是一个根本矛盾:唯一被允许改变的是 guest character,而 guest character 改变所依赖的 regular character 又恰恰是被禁止改变的。In this 2020 essay, Luu starts with Star Trek: Voyager: the premise is strong — mixed Federation/rebel crew, tens of millions of light-years from home, 70 years to get back. But serialized TV has a structural requirement that characters can't change: if they do, the audience can't find 'their' person next week. Yet stories fundamentally require change. This is the core paradox: the only character allowed to change (the guest) depends on a regular character who is forbidden from changing.
- 他给出了一个具体的重构方案:第一集里那个『聪明得像 Janeway』的叛徒,应该被关进禁闭室,一直关着,而不是打完就消失。这样就有了『Silence of the Lambs』式的戏剧张力——Janeway 随时可以去找他谈判,他也可以随时 taunt 她。这解决了『系列里唯一有趣的人物被浪费了』的问题。He offers a concrete restructuring: that villain 'as smart as Janeway' from the pilot should have been kept in the brig, not dismissed after one confrontation. Now you have 'Silence of the Lambs' dynamics — Janeway can negotiate with him whenever the pressure gets high, and he can taunt her. This fixes the waste of 'the only interesting character on the show.'
- 他进一步设计了一个三结局的终局场景(危机 + 资源不足 + 必须牺牲),并明确指出:他最喜欢的结局是第三个——Janeway 决定杀叛徒但不搞军事法庭。『是否真正杀了他并不重要;重要的是她做了这个决定。』这是对『角色做出有代价的自主决定』这一故事核心原则的最干净示范。He then designs a three-ending finale (crisis + resource shortage + someone must die) and states clearly which one he prefers: the third — Janeway decides to kill the prisoner without a court-martial. 'Whether she actually kills him doesn't matter; what matters is that she decides to do it.' It's the cleanest illustration of the story principle that characters must make costly, self-motivated choices.
- 飞机上的三个信息洞察:antirez 的随手笔记(2013 年)Three Messaging Insights from a Plane Window: antirez's Flight Notes (2013)
- 2013 年,antirez 在飞机上写了这篇文章,核心观察:当他断开互联网时,最让他感到不舒适的不是没有 GitHub 或 Twitter,而是没有即时消息。WhatsApp 在欧洲的『班级群』『家庭群』彻底改变了人们的沟通方式——这种改变在意大利是因为 WhatsApp 是事实标准,人人默认你有;但美国,恰恰是社交媒体公司的发源地,却没有形成统一的消息标准。In 2013, antirez wrote this on a plane, and the core observation: when disconnected, what bothers him most isn't the absence of GitHub or Twitter — it's the absence of instant messaging. In Europe, WhatsApp 'class groups' and 'family groups' have fundamentally reshaped how people communicate; in Italy it's a social fact, in the US — the birthplace of the biggest social apps — no unified messaging standard has emerged yet.
- 第二个洞察:语音识别其实早就准得够用,但几乎没人用,原因不在识别率,而在 UI——『按下按钮开始说话,松开结束』这种最直觉的交互,被藏在键盘角落、有延迟、有蜂鸣音。好的识别率加上差的交互,结果就是没人用。Second insight: voice-to-text recognition was already good enough years ago, but almost nobody uses it daily. The bottleneck isn't accuracy, it's the UI: the most natural interaction — 'press the button and talk, release to stop' — is hidden in a corner of the keyboard, with delays and a beep. Good recognition plus bad interaction means no one uses it.
- 第三个洞察:语音消息的发送方便利,接收方不便利(开会、开车、安静的场合不能听)。解法在服务器端:自动转写,文字高亮显示不确定的词,让接收方选择看文字还是听语音。双向无摩擦——这是真正的产品设计,不只是语音转文字的演示。Third insight: voice messages are convenient for the sender but inconvenient for the receiver (meetings, driving, quiet environments). The fix is server-side: auto-transcribe, highlight the uncertain words, let the receiver choose text or audio. Frictionless in both directions — that's real product design, not a voice-to-text demo.
- Dwarf Fortress 开始用版本控制了Dwarf Fortress Now Uses Version Control
- Willison 注意到一个他记了很久的软件史事实结束了:Dwarf Fortress(Tarn Adams 开发、极其复杂的 RPG)一直没有使用版本控制。Tarn 在 2013 年说『我不喜欢代码被丢进黑盒的感觉』;2016 年说他连版本控制是什么都不知道,『如果你知道那是什么你肯定会骂我』。Willison notes the end of a software-history fact he'd been tracking for years: Dwarf Fortress (Tarn Adams's enormously complex RPG) had long not used version control. In 2013, Tarn said he 'didn't like the feeling of code getting committed into a black box'; in 2016, he said he didn't even know what version control was. 'If you know what it is, you're gonna be like, what's wrong with you?'
- 2023 年 3 月,在接受 Steam 发布前的一次采访时,Tarn 说:『现在我有 Discord 频道要查,有版本控制要用了,流程确实变得稍微复杂了一点。』Willison 感慨:就在他们变成百万富翁之前,那个坚持了 15 年的理由终于松了。In March 2023, just before the Steam release that made them millionaires, Tarn said: 'I've got Discord channels to check and version control stuff to use now, so the process is definitely a little more involved.' Willison's verdict: the 15-year principle finally gave in right before the milestone.
- 这是一个关于『为什么一个复杂的软件项目可以 10 年不用版本控制』的有趣样本——答案不是技术不够,而是开发模式(单人主导、小团队、持续迭代)和『黑盒感』的心理成本之间的关系。It's an interesting sample of why a hugely complex codebase could go a decade without version control: not technical limits, but the psychology of a single-maintainer development model — the 'black box feeling' was the real cost.
哲学与生活Philosophy & Life
- 如何在变老中不让生命变成自我的讽刺:de Beauvoir 的『老年论』How to Grow Old Without Letting Life Become a Parody of Itself: de Beauvoir's 'Old Age'
- Popova 引 Le Guin 的话开头:对老年人来说,美不再靠荷尔蒙,而是『取决于这个人是谁』——能活到老年并且活得值得,本身就是生命的胜利。但她认为没有人比 de Beauvoir 在 1970 年的《La vieillesse》里给出了更优雅、更坚固的扶手。Popova opens with Le Guin: for old people, beauty no longer comes free with hormones — 'it has to do with who the person is.' To become a person worthy of old age is itself the triumph of life. But, she argues, no one furnished a more elegant handrail than Simone de Beauvoir in her 1970 book, La vieillesse.
- de Beauvoir 的核心论点是:变老不是『项目』——不是你可以去努力达成、去拿高分的东西;它是一个『事实』,需要用一生去练习如何与之相遇。唯一能让老年不成为人生讽刺的解法,是继续追求给存在赋予意义的事物:对人的深情、对事业或群体的投入。de Beauvoir's core point: growing old is not a project — something you work industriously to 'ace'; it's a fact, something you meet on its own terms, and for which you spend a lifetime practicing. The only way to prevent old age from becoming a parody of your former life is to keep pursuing things that give your existence meaning: devotion to people, to groups, to causes.
- 她的最后一句话值得记:『一个人的生命是有价值的,只要他还在别人的生命里赋予价值——通过爱、友谊、义愤或怜悯。』衰老本身不是问题;让生命在衰老中失去与他人的连接,才是问题。Her closing line is worth remembering: 'One's life has value so long as one attributes value to the life of others — by means of love, friendship, indignation, compassion.' Aging itself isn't the problem; losing connection with others in the aging years is.
工具角Tools Corner
- Llmspeed:买硬件前先用网页感受本地 LLM 有多快Llmspeed: Feel How Fast Your Local LLM Will Run Before You Buy the Hardware
- 本地 LLM 的一个真实痛点:你买了 GPU,装了环境,跑起来才知道速度——太慢了或者太快了都不知道,但已经花了钱。Llmspeed 的思路是把这个测试前置:用网页模拟常见本地硬件的 LLM 推理速度,让你在购买决策之前就有直观感受。A real pain point with local LLMs: you buy the GPU, set up the environment, and only then find out how fast it is — by which time the money is spent. Llmspeed's idea: move that test forward. The web tool simulates LLM inference speed on common local hardware, giving you an intuitive feel before the purchase decision.
- 核心点不在于精度(网页不可能精确模拟你的机器),而在于『把抽象的 token/秒数字变成你能感受到的体验』——这和买电脑前先跑 benchmark 是一样的逻辑,但做成了一个不需要安装任何东西的网页工具。The core point isn't accuracy (a webpage can't exactly simulate your machine), it's converting abstract tokens-per-second numbers into a feeling — the same logic as running benchmarks before buying a PC, packaged as a zero-install web tool.
- 页面本体是一份按硬件挑的清单:RTX 3090/4090/5090、Mac Studio M5 Ultra、Mac mini M5 Pro、Strix Halo、DGX Spark,甚至老 V100——点开对应机型,看的就是『本地模型在这台机器上跑起来是什么手感』。The site itself is a hardware picker: RTX 3090/4090/5090, Mac Studio M5 Ultra, Mac mini M5 Pro, Strix Halo, DGX Spark, even an old V100 — open the card for your machine and you see what a local model would feel like on it.
- Sphinx:发版前对 AI 生成的代码出考题Sphinx: A Pre-Ship Quiz for Your AI's Code
- 痛点:AI 写代码,你发版,但你真的理解它写了什么吗?Sphinx 是发版前的一个 hook:它盯着 agent 刚改出的 diff,向『你』提出关于这段代码的具体问题——答不上来就发不了版。它的标语点破了立场:『你可以外包思考,但不能外包理解。』The pain: AI writes the code, you ship it, but do you actually understand what it did? Sphinx is a pre-ship hook that watches the diff the agent just produced and quizzes *you* on it — no answer, no release. Its tagline states the position: 'You can outsource thinking, but not understanding.'
- 问题不是泛泛的审查清单,而是从具体改动里长出来的语义题:比如看到『webhook handler 现在先保存 event ID、再调用 charge()』,它会问『如果 Stripe 超时并重发了同一个事件,会发生什么?』——考的是你有没有想明白这一行改动带来的因果链。The questions aren't generic review checklists; they grow out of the specific change: seeing 'your webhook handler now saves the event ID before calling charge()', it asks 'Stripe times out and sends the same event again — what happens?' It tests whether you traced the causal chain the edit created.
- 点子的巧妙在于方向和常见『AI 审 AI』相反:用 AI 生成考题、考人类。因为 agent 落地代码的真实瓶颈从来不是生成速度,而是停止理解产物的那个人。安装即用(一条 sphinx-understand 的复制命令,OpenRouter/OpenAI 兼容),这层『理解检查』被做成了发布流水线上的一个关卡。The twist is that it points the usual 'AI reviews AI' arrow the other way: AI generates the exam, the human takes it — because the real bottleneck when agents land code was never generation speed, it's the human who stopped understanding the output. One-command install (sphinx-understand, OpenRouter/OpenAI-compatible), so the understanding check becomes an actual gate in your release pipeline.
- Wonderhop:每天猜多数人怎么说Wonderhop: Guess What Most People Say — Daily
- 游戏逻辑:给你一个问题,猜『多数人会怎么回答』,或者猜『最少人会怎么回答』。它好玩的地方在于:你知道答案是什么,但你不知道多数人会怎么想——这是对『你以为的常识』的直接挑战。The game: you get a question, and you guess what the majority of people will answer — or what the fewest will say. It's fun precisely because you know the 'right' answer but don't know what most people actually think: a direct challenge to your sense of 'common sense.'
- 和 Wordle 的每日机制类似,社交传播性强(你的答案 vs 全国分布),但它测试的不是记忆或拼写,而是你对人类行为的直觉。作为每日小工具,这个『猜人心』的定位很有区分度。Like Wordle's daily mechanic, it's socially contagious (your answer vs. national distribution), but it tests intuition about human behavior rather than memory or spelling. As a daily tool, the 'mind-reading' angle gives it a distinct niche.
- 四种玩法挂在同一个机制上:『天空』要最常见答案(越流行爬得越高),『深渊』要最罕见答案(越罕见沉得越深),『过去/未来』分别要最老和最新的回答——每天四局、每局七题,一题 30–40 秒,不用注册。Four modes hang off one mechanic: 'Sky' wants the most common answer (the more popular, the higher you climb), 'Abyss' the rarest (the rarer, the deeper you sink), while 'Past/Future' want the oldest and newest replies — four games a day, seven rounds each, 30–40 seconds a round, no account.