═══ 創作者的 Unix 哲學 ═══ 2026 年 9 月 3 日 · 閱讀時間約 5 分鐘 ┊ 純文字版 [1] Eric S. Raymond 在 The Art of Unix Programming [2] 這本書裡,列出了 Unix 程式設 計的 17 條哲學。 但我覺得這根本不是在講程式設計,而是寫給所有創作者的行為準則啊!以下只挑一些我 特別有共鳴的來講,有興趣讀完整 17 條原文的,按下方展開。 按這裡展開原文 1. Rule of Modularity: Write simple parts connected by clean interfaces. 2. Rule of Clarity: Clarity is better than cleverness. 3. Rule of Composition: Design programs to be connected to other programs. 4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines. 5. Rule of Simplicity: Design for simplicity; add complexity only where you must. 6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do. 7. Rule of Transparency: Design for visibility to make inspection and debugging easier. 8. Rule of Robustness: Robustness is the child of transparency and simplicity. 9. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust. 10. Rule of Least Surprise: In interface design, always do the least surprising thing. 11. Rule of Silence: When a program has nothing surprising to say, it should say nothing. 12. Rule of Repair: When you must fail, fail noisily and as soon as possible. 13. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time. 14. Rule of Generation: Avoid hand-hacking; write programs to write programs when you can. 15. Rule of Optimization: Prototype before polishing. Get it working before you optimize it. 16. Rule of Diversity: Distrust all claims for "one true way". 17. Rule of Extensibility: Design for the future, because it will be here sooner than you think. ◆ 分離原則​ "4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines." (分離原則:把政策和機制分開;把介面和引擎分開。) 套用到創作上面,簡單來說就是把「你想講的話」跟「你用來講話的工具」分開。 不要特別為了平台 [3],來量身訂做你想講的東西。當你開始想「開頭五秒要放什麼才不 會被滑掉」、「什麼時候上傳觸及率比較高」、「這個詞會不會被黃標」、「這個演算法 會推嗎」⋯⋯這時傳達的訊息就已經被工具改寫了。 訊息應該要凌駕於工具之上,而且隨時能被轉化成任何格式。 如果非要選一種「終極格式」,我想純文字是最好的選擇 [4]。 ◆ 節儉原則​ "6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do." (節儉原則:除非能證明別無他法,否則不要寫大程式。) 不要鋪張、不要搞一堆有的沒有的來擾亂自己。 你真的需要這麼複雜的企劃、這麼多人的團隊、這麼多攝影機角度、這麼繁複的剪輯嗎? 如果無法證明「真的非得要這樣不可,沒有別的辦法」,那就把這些贅肉通通砍掉 [5]吧 ! ◆ 資料原則​ "9. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust." (資料原則:把知識放進資料裡,所以程式邏輯可以又笨又耐用。) 讓「內容」去變化就好,而不是「流程」。流程要盡量簡單、耐用就好,不要每天變來變 去。 例如這個部落格,我每天上傳的流程都是一樣的──寫一個 Markdown 檔案,丟進資料夾, npm run build,上傳──因為流程既無聊又簡單,我才能專注在每天寫的主題上,而不是跟 流程搏鬥。 做音樂也一樣:只要有一台不錯的音源機,就能做出幾乎所有類型的音樂。不需要一直更 新編曲軟體到最新版 [6],也不需要下載 500 GB 的音色庫,更不需要糾結那十五種 compressor 的聲音到底差在哪裡。 ◆ 沉默原則​ "11. Rule of Silence: When a program has nothing surprising to say, it should say nothing." (沉默原則:如果沒有有趣的東西可講,就不要講。) 現在的內容生態 [7],根本是朝完全相反的方向運作──明明就沒有東西講,但每個人還是 強迫自己一直發限動、刷存在感、餵演算法。 ◆ 最佳化原則​ "15. Rule of Optimization: Prototype before polishing. Get it working before you optimize it." (最佳化不是優化喔原則:先讓它能用,再慢慢打磨。) 這是許多新手創作者最常犯的錯誤:根本什麼都還沒開始做,就先擔心要買什麼鏡頭、哪 隻麥克風、Logo 要找誰設計、紅了以後怎麼應付酸民⋯⋯想太多了啦,先把第一集拍出來再 說好不好! ◆ 擴充原則​ "17. Rule of Extensibility: Design for the future, because it will be here sooner than you think." (擴充原則:為未來設計,因為未來來得比你想的還快。) 這點我太認同了!擁有自己的網站 [8]、自己的網域 [9]、掌握作品的主權 [10]與跟讀者 直接聯絡的管道,在未來只會越來越重要。 平台收割韭菜的速度,絕對比你想像中還要快。那日漸萎縮的觸及率 [11],就是「未來」 即將到來的徵兆呀! ── 連結與圖片 ── [1] https://wiwi.blog/blog/unix-philosophy.txt [2] https://edu.anarcho-copy.org/UNIX/The%20Art%20of%20Unix%20Programming%20-%20Eric%20Steven%20Raymond.pdf [3] https://wiwi.blog/blog/content-creator.txt [4] https://wiwi.blog/blog/wiwi-blog-txt.txt [5] https://wiwi.blog/blog/less-is-more.txt [6] https://wiwi.blog/blog/reason-enshittification.txt [7] https://wiwi.blog/blog/so-called-trends.txt [8] https://wiwi.blog/blog/update-your-own-site.txt [9] https://wiwi.blog/blog/get-your-own-domain.txt [10] https://wiwi.blog/blog/internet-peasant.txt [11] https://wiwi.blog/blog/you-are-popular.txt