本文由 AI 分析生成
建立時間: 2026-01-01
Summary
EN: A Linus Torvalds essay (or attributed essay) on why programming is beautiful — not as a craft skill but as a form of world-creation similar to mathematics. Programming is the construction of an internally consistent, working system from abstract rules; like mathematics, the elegance of the solution matters, not just its correctness. The Gauss summation story (young Gauss summing 1+2+…+100 instantly by recognizing the pattern) is used to illustrate the beauty of the “right approach” vs brute force.
ZH: Linus Torvalds 關於程式設計之美的文章——不是作為技藝技能,而是作為類似數學的世界創造形式。程式設計是從抽象規則構建內在一致的工作系統;如同數學,解決方案的優雅性很重要,不僅僅是正確性。高斯求和故事(少年高斯瞬間計算 1+2+…+100)用來說明「正確方法」與暴力解法的美感差異。
Key Points
- Programming as world-creation: you define the rules, and the world (computer) executes them faithfully
- The beauty is in the elegance of the approach, not just correctness — the Gauss summation as the archetype
- Operating system as constitution: the OS defines the rules within which all other programs must operate — a constitutional analogy
- Mathematical elegance is transferable to code: the most elegant solution often reveals a deeper truth about the problem structure
- The “right approach” can transform a brute-force O(n) problem into an O(1) insight
Insights
- The Gauss story is a perfect illustration: the brute-force approach (add 1+2+3…) and the elegant approach (n*(n+1)/2) both give correct answers, but only one is beautiful
- Framing the OS as a “constitution” is technically precise: the OS defines what operations are legal, how resources are shared, and what the rules of engagement are
- This essay likely explains why Torvalds cares so deeply about code quality in kernel contributions — he experiences code aesthetically, not just functionally
Connections
- Connects to the software professionalism article: both argue that engineering has aesthetic and ethical dimensions beyond mere function
- The “right approach” appreciation connects to the DRY/abstraction debate: the right abstraction is beautiful; the wrong one is ugly and hard to maintain
- Related to the sustainable capitalism article’s long-term thinking: elegant code ages better than brute-force code
Raw Excerpt
“Programming is like mathematics. The right answer isn’t enough — the right answer arrived at through the right approach reveals something true about the problem. When young Gauss saw that 1+2+…+100 = 100*(101)/2, he didn’t just solve the problem. He saw through it.”