<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
  <title>Benjamin Taoson · 赖建铭 · 中文</title>
  <subtitle>Benjamin Taoson（赖建铭）的个人网站。探索大模型、智能体与机器人学习，分享项目设计、实验结果与技术思考，连接交流、合作与教学。</subtitle>
  <link href="https://benjamindaoson.github.io/daoson_website/feed-zh.xml" rel="self" type="application/atom+xml" />
  <link href="https://benjamindaoson.github.io/daoson_website/" rel="alternate" type="text/html" hreflang="zh" />
  <updated>2026-10-12T12:18:36+08:00</updated>
  <id>https://benjamindaoson.github.io/daoson_website/feed-zh.xml</id>
  <author>
    <name>Benjamin Taoson</name>
    <email>benjamindaoson@gmail.com</email>
  </author><entry>
      <title>我为什么在构建数字员工系统</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/06/05/why-build-digital-employee-system/" rel="alternate" type="text/html" />
      <published>2026-06-05T10:00:00+08:00</published>
      <updated>2026-06-05T10:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/06/05/why-build-digital-employee-system/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>数字员工系统不是成熟产品发布，而是我用来研究智能体如何从演示走向可靠工作流的长期实验。</summary>
      <category term="AI" /><category term="智能体" /><category term="工程" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/06/05/why-build-digital-employee-system/">
        &lt;p&gt;我正在构建一个数字员工系统。&lt;/p&gt;

&lt;p&gt;先把边界说清楚：它目前不是成熟产品，也不是已经公开的完整项目案例。具体仓库、演示和实现细节还在整理中。现在可以公开的是方向、问题背景、我正在验证的假设，以及接下来准备补充的构建记录。&lt;/p&gt;

&lt;p&gt;我之所以要把这些写出来，是因为我越来越觉得，AI 智能体最重要的问题不是“能不能做一个惊艳演示”，而是：&lt;strong&gt;它能不能在真实工作流里稳定、可恢复、可监督地完成一段工作。&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;演示和工作之间有一道鸿沟&quot;&gt;演示和工作之间有一道鸿沟&lt;/h2&gt;

&lt;p&gt;现在很多智能体演示看起来都很强。它可以读文件、调用工具、写代码、生成计划，甚至模拟一个完整任务链。&lt;/p&gt;

&lt;p&gt;但演示能跑，不等于系统可靠。&lt;/p&gt;

&lt;p&gt;真正进入工作流以后，问题会变得具体很多：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;任务边界是否清楚？&lt;/li&gt;
  &lt;li&gt;上下文在多个智能体之间如何交接？&lt;/li&gt;
  &lt;li&gt;工具调用失败后，系统知道失败在哪里吗？&lt;/li&gt;
  &lt;li&gt;哪些状态仍然可信？&lt;/li&gt;
  &lt;li&gt;下一步应该自动恢复，还是交给人确认？&lt;/li&gt;
  &lt;li&gt;结果如何被验证？&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这些问题看起来不如模型能力本身耀眼，但它们决定了智能体能不能从一次性演示变成可反复运行的系统。&lt;/p&gt;

&lt;h2 id=&quot;我说的数字员工是什么&quot;&gt;我说的数字员工是什么&lt;/h2&gt;

&lt;p&gt;我说的数字员工，不是“一个更会聊天的机器人”。&lt;/p&gt;

&lt;p&gt;我更关心的是一个工作系统：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;它能接收一个明确的工作目标。&lt;/li&gt;
  &lt;li&gt;它能把工作拆成可执行步骤。&lt;/li&gt;
  &lt;li&gt;它能调用工具完成部分任务。&lt;/li&gt;
  &lt;li&gt;它能在失败时保留状态并恢复。&lt;/li&gt;
  &lt;li&gt;它能在不确定时请求人类判断。&lt;/li&gt;
  &lt;li&gt;它能留下过程记录，方便复盘和改进。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;换句话说，数字员工不是单个模型，而是模型、工具、状态、协议、评估和人在回路共同组成的系统。&lt;/p&gt;

&lt;h2 id=&quot;真正难的不是聊天&quot;&gt;真正难的不是聊天&lt;/h2&gt;

&lt;p&gt;聊天能力当然重要，但它不是我最关心的部分。&lt;/p&gt;

&lt;p&gt;我更关心这些工程问题：&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;协作协议&lt;/strong&gt;：多个智能体之间如何分工？谁负责计划，谁负责执行，谁负责检查？&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;工具可靠性&lt;/strong&gt;：工具调用失败后如何重试？什么时候停止重试？&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;状态恢复&lt;/strong&gt;：执行到一半失败，哪些中间状态可以继续用？&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;人工确认&lt;/strong&gt;：什么环节必须让人确认？什么环节可以自动完成？&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;结果验证&lt;/strong&gt;：系统如何知道自己做对了，而不是只是“看起来完成了”？&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;这些问题没有一个能靠一句提示词彻底解决。它们需要系统设计，也需要大量小实验。&lt;/p&gt;

&lt;h2 id=&quot;当前状态&quot;&gt;当前状态&lt;/h2&gt;

&lt;p&gt;目前这个项目处在持续构建阶段。&lt;/p&gt;

&lt;p&gt;我正在整理三个方向：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;智能体之间的任务分工和上下文交接。&lt;/li&gt;
  &lt;li&gt;工具调用失败后的恢复机制。&lt;/li&gt;
  &lt;li&gt;人在回路的确认点和系统边界。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;我还没有把它包装成产品，也没有公开具体仓库。这个边界很重要：如果我还不能清楚说明系统做到了什么、没做到什么，就不应该把它说成成熟成果。&lt;/p&gt;

&lt;h2 id=&quot;接下来要验证什么&quot;&gt;接下来要验证什么&lt;/h2&gt;

&lt;p&gt;下一步，我想先把系统说明补清楚，而不是急着展示更多界面。&lt;/p&gt;

&lt;p&gt;我会优先整理：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;当前原型到底能完成什么。&lt;/li&gt;
  &lt;li&gt;哪些环节仍然需要人类确认。&lt;/li&gt;
  &lt;li&gt;工具调用失败时系统如何响应。&lt;/li&gt;
  &lt;li&gt;哪些实现细节可以公开。&lt;/li&gt;
  &lt;li&gt;是否能开放一个更具体的仓库或小型演示。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这些内容会进入构建记录，而不是只留在脑子里。&lt;/p&gt;

&lt;h2 id=&quot;为什么这值得长期做&quot;&gt;为什么这值得长期做&lt;/h2&gt;

&lt;p&gt;我相信 AI 智能体真正改变工作方式的时刻，不会来自某个炫酷演示，而会来自很多可靠性细节慢慢变稳：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;边界更清楚。&lt;/li&gt;
  &lt;li&gt;失败更可恢复。&lt;/li&gt;
  &lt;li&gt;人类介入点更合理。&lt;/li&gt;
  &lt;li&gt;工作过程更可追踪。&lt;/li&gt;
  &lt;li&gt;系统能被长期维护。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这也是我建设这个网站的原因。它不是为了展示一个完美形象，而是为了把判断、实验和写作沉淀成一个长期研究系统。&lt;/p&gt;

&lt;p&gt;数字员工系统只是其中一个实验，但它会成为我接下来一段时间最重要的构建对象。&lt;/p&gt;
      </content>
    </entry><entry>
      <title>使用 Vite 搭建现代化前端项目</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/05/20/vite-modern-frontend/" rel="alternate" type="text/html" />
      <published>2026-05-20T10:00:00+08:00</published>
      <updated>2026-05-20T10:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/05/20/vite-modern-frontend/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>从零开始，一步步配置一个干净、快速、可维护的前端开发环境。</summary>
      <category term="前端" /><category term="工具" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/05/20/vite-modern-frontend/">
        &lt;p&gt;这篇记录我如何用 Vite 搭一个干净、快速、可维护的前端实验环境。
它不是完整框架教程，而是一份偏实践的项目初始化笔记。&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;「工具应该服务于思想，而不是相反。」&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;为什么选择-vite&quot;&gt;为什么选择 Vite&lt;/h2&gt;

&lt;p&gt;Vite 利用浏览器原生的 ES Modules 能力，开发时无需打包，启动速度极快。
相比传统的 Webpack，它在以下几个方面有明显优势：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;冷启动时间从「秒级」缩短到「毫秒级」&lt;/li&gt;
  &lt;li&gt;HMR（热更新）几乎是即时的，文件越多优势越明显&lt;/li&gt;
  &lt;li&gt;开箱即用支持 TypeScript、JSX、CSS 预处理器&lt;/li&gt;
  &lt;li&gt;生产环境用 Rollup 打包，输出更精简&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;下面这张图是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm run dev&lt;/code&gt; 启动后的终端输出示意，注意那个 187ms 的启动时间：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/posts/vite-modern-frontend/dev-server.svg&quot; alt=&quot;Vite 开发服务器启动后的终端输出&quot; /&gt;
&lt;em&gt;Vite dev server · 冷启动 187ms&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;快速开始&quot;&gt;快速开始&lt;/h2&gt;

&lt;p&gt;用一行命令就能创建一个新项目：&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;npm create vite@latest my-app &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--template&lt;/span&gt; vue-ts
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;my-app
npm &lt;span class=&quot;nb&quot;&gt;install
&lt;/span&gt;npm run dev
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;就这么简单。打开 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://localhost:5173&lt;/code&gt;，你就能看到默认页面了。&lt;/p&gt;

&lt;p&gt;这篇文章暂时不放视频演示。等有真实录制的项目过程，再补到外部发布或文章里。&lt;/p&gt;

&lt;h2 id=&quot;常用配置&quot;&gt;常用配置&lt;/h2&gt;

&lt;p&gt;下面是我常用的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vite.config.ts&lt;/code&gt; 配置：&lt;/p&gt;

&lt;div class=&quot;language-typescript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;defineConfig&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;vite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;vue&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;@vitejs/plugin-vue&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fileURLToPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;URL&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;node:url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;defineConfig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;plugins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;vue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()],&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;alias&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;fileURLToPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;URL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./src&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;meta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;小结&quot;&gt;小结&lt;/h2&gt;

&lt;p&gt;工具会变，但解决问题的本质不会。希望这篇文章能帮你少踩一些坑。
如果你有更好的实践，欢迎给我发邮件交流。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;本文写于 2026 年 5 月。如有疏漏，欢迎指正。&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry><entry>
      <title>代码可读性的本质是什么</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/05/12/code-readability/" rel="alternate" type="text/html" />
      <published>2026-05-12T14:30:00+08:00</published>
      <updated>2026-05-12T14:30:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/05/12/code-readability/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>为什么有的代码读起来像散文，有的却像加密电报？聊聊命名、抽象层级和「写给未来的自己看」的几条心得。</summary>
      <category term="编程" /><category term="思考" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/05/12/code-readability/">
        &lt;p&gt;为什么有的代码读起来像散文，有的却像加密电报？&lt;/p&gt;

&lt;p&gt;写代码这么多年，我越来越觉得，&lt;strong&gt;代码的可读性，本质上是「认知负担」的问题&lt;/strong&gt;&lt;sup id=&quot;fnref:cognitive-load&quot;&gt;&lt;a href=&quot;#fn:cognitive-load&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;——读者每读一行，要在脑子里维护多少状态？&lt;/p&gt;

&lt;h2 id=&quot;命名是第一道关&quot;&gt;命名是第一道关&lt;/h2&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// 不好&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// 好&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;findUsersByStatus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;短变量名节省了打字时间，但偷走了未来读者的时间——而后者通常是几十倍的代价&lt;sup id=&quot;fnref:read-write-ratio&quot;&gt;&lt;a href=&quot;#fn:read-write-ratio&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;。&lt;/p&gt;

&lt;h2 id=&quot;抽象层级要一致&quot;&gt;抽象层级要一致&lt;/h2&gt;

&lt;p&gt;一个函数里，如果一会儿在做高层级的业务编排，一会儿又在做底层的字节操作，
读者就得不停地切换视角，非常累。&lt;/p&gt;

&lt;h2 id=&quot;写给未来的自己&quot;&gt;写给未来的自己&lt;/h2&gt;

&lt;p&gt;我的一个习惯：&lt;strong&gt;在每个稍复杂的函数前，写一句话告诉未来的自己「这是什么、为什么」&lt;/strong&gt;。&lt;/p&gt;

&lt;p&gt;不是注释每一行（那是糟糕的注释），而是告诉读者「上下文」。&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;# 因为后端在 v2 之前会返回字符串型的 ID，
# 这里强制转 int 以保证前后端类型一致
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;payload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这种注释，写代码的人自己半年后回来看都会感谢自己。&lt;/p&gt;

&lt;h2 id=&quot;小结&quot;&gt;小结&lt;/h2&gt;

&lt;p&gt;可读性不是「好看」，而是&lt;strong&gt;「下一个人接手时的痛苦最小化」&lt;/strong&gt;。
而那个「下一个人」，大概率就是几个月后的你自己。&lt;/p&gt;
&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:cognitive-load&quot;&gt;
      &lt;p&gt;「认知负担」是 John Sweller 1988 年提出的概念，原指学习者处理新信息时占用的工作记忆容量。代码上下文也遵循同一规则：人类工作记忆约能维持 4±1 个组块。变量名差、缩进乱、抽象层级跳跃，都会让组块数迅速超载。 &lt;a href=&quot;#fnref:cognitive-load&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:read-write-ratio&quot;&gt;
      &lt;p&gt;Robert C. Martin 在《Clean Code》里提到，代码”读”与”写”的时间比是 &lt;strong&gt;10:1&lt;/strong&gt; 以上。意味着任何让”读”变快的微小投入，回报率都是正数。 &lt;a href=&quot;#fnref:read-write-ratio&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
      </content>
    </entry><entry>
      <title>我的 Mac 工作流配置 2026</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/04/28/mac-workflow-2026/" rel="alternate" type="text/html" />
      <published>2026-04-28T20:00:00+08:00</published>
      <updated>2026-04-28T20:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/04/28/mac-workflow-2026/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>分享一下今年我每天都在用的软件、Shell 配置、快捷键。</summary>
      <category term="工具" /><category term="效率" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/04/28/mac-workflow-2026/">
        &lt;p&gt;每年我都会写一篇当下的工作流配置，一是给自己留个备份，二是分享给可能感兴趣的朋友。&lt;/p&gt;

&lt;h2 id=&quot;终端--shell&quot;&gt;终端 &amp;amp; Shell&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;终端&lt;/strong&gt;：Ghostty —— 速度极快、配置即代码&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Shell&lt;/strong&gt;：zsh + &lt;a href=&quot;https://ohmyz.sh/&quot;&gt;oh-my-zsh&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;提示符&lt;/strong&gt;：&lt;a href=&quot;https://starship.rs/&quot;&gt;Starship&lt;/a&gt; —— 跨 Shell 通用&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;复用&lt;/strong&gt;：tmux + tmuxinator&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;编辑器&quot;&gt;编辑器&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;主力&lt;/strong&gt;：VS Code（Vim 插件 + Copilot）&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;轻量编辑&lt;/strong&gt;：Helix（终端里直接 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hx&lt;/code&gt;）&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;写作&lt;/strong&gt;：Obsidian + iA Writer&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;必装的命令行工具&quot;&gt;必装的命令行工具&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;工具&lt;/th&gt;
      &lt;th&gt;替代了什么&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bat&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eza&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fd&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;find&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rg&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zoxide&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fzf&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;所有需要模糊搜索的场景&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;快捷键&quot;&gt;快捷键&lt;/h2&gt;

&lt;p&gt;最近发现一个超好用的：用 &lt;a href=&quot;https://karabiner-elements.pqrs.org/&quot;&gt;Karabiner&lt;/a&gt; 把 CapsLock 改成”按下是 Escape，长按是 Ctrl”。
适配 Vim 用户来说，效率提升至少 30%。&lt;/p&gt;

&lt;h2 id=&quot;小结&quot;&gt;小结&lt;/h2&gt;

&lt;p&gt;工具是为人服务的，不要陷进去为了配置而配置。
我每年都会忍痛删掉一些「装了但没怎么用」的工具——保持轻量很重要。&lt;/p&gt;
      </content>
    </entry><entry>
      <title>读《程序员的自我修养》有感</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/04/15/reading-programmer-self-cultivation/" rel="alternate" type="text/html" />
      <published>2026-04-15T21:00:00+08:00</published>
      <updated>2026-04-15T21:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/04/15/reading-programmer-self-cultivation/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>链接、装载、运行——这本书让我第一次真正「看见」了代码是如何变成可执行程序的。</summary>
      <category term="读书" /><category term="随笔" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/04/15/reading-programmer-self-cultivation/">
        &lt;p&gt;写代码很多年，直到读了《程序员的自我修养——链接、装载与库》，
我才第一次真正「看见」代码是怎么变成可执行程序的。&lt;/p&gt;

&lt;h2 id=&quot;你以为你懂其实你不懂&quot;&gt;你以为你懂，其实你不懂&lt;/h2&gt;

&lt;p&gt;我以为我懂编译：源码 → 编译器 → 可执行文件。&lt;/p&gt;

&lt;p&gt;但你知道吗？&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;链接器&lt;/strong&gt; 才是真正决定符号位置的人&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;重定位&lt;/strong&gt; 是为了让代码在任意地址都能跑&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;动态链接&lt;/strong&gt; 让多个程序可以共享同一份代码&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这些底层细节，决定了你写的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf&lt;/code&gt; 到底是怎么被调用的。&lt;/p&gt;

&lt;h2 id=&quot;印象最深的一段&quot;&gt;印象最深的一段&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;内存中的程序和磁盘上的程序，看起来都是一堆字节，
但它们之间的鸿沟，需要操作系统、编译器、链接器、加载器
配合无间地才能跨越。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;读到这里，我突然对每一个能跑起来的程序，都有了一种新的敬畏。&lt;/p&gt;

&lt;h2 id=&quot;推荐指数&quot;&gt;推荐指数&lt;/h2&gt;

&lt;p&gt;★★★★★&lt;/p&gt;

&lt;p&gt;适合所有「写过几年代码但从没认真想过底层」的人。
准备好一杯咖啡和几个安静的晚上。&lt;/p&gt;
      </content>
    </entry><entry>
      <title>CSS 容器查询完全指南</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/03/30/css-container-queries/" rel="alternate" type="text/html" />
      <published>2026-03-30T16:00:00+08:00</published>
      <updated>2026-03-30T16:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/03/30/css-container-queries/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>媒体查询的时代正在过去——容器查询让组件真正实现「响应式」。</summary>
      <category term="前端" /><category term="CSS" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/03/30/css-container-queries/">
        &lt;p&gt;很长一段时间，”响应式设计”约等于”媒体查询”。但媒体查询有个根本问题：
&lt;strong&gt;它只能根据视口（viewport）来响应，而不是组件所在的容器&lt;/strong&gt;。&lt;/p&gt;

&lt;p&gt;容器查询（Container Queries）解决了这个问题。&lt;/p&gt;

&lt;h2 id=&quot;基本用法&quot;&gt;基本用法&lt;/h2&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;/* 1. 把父元素声明为容器 */&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.card-wrapper&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;container-type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;inline-size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;container-name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/* 2. 根据容器宽度调整子元素 */&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;@container&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;card&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;400px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.card&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;grid-template-columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1fr&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2fr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;注意，这个查询关心的不是浏览器窗口宽度，而是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.card-wrapper&lt;/code&gt; 的宽度。&lt;/p&gt;

&lt;h2 id=&quot;为什么这是革命性的&quot;&gt;为什么这是革命性的&lt;/h2&gt;

&lt;p&gt;想象一个 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;UserCard&amp;gt;&lt;/code&gt; 组件，它可能出现在：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;侧边栏（窄）&lt;/li&gt;
  &lt;li&gt;主内容区（宽）&lt;/li&gt;
  &lt;li&gt;模态框（中等）&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;用媒体查询，你只能基于整个页面的宽度决定它的布局，
但同一个页面里，同一个组件可能既在侧边栏又在主区域——
这时容器查询才是唯一的解法。&lt;/p&gt;

&lt;h2 id=&quot;浏览器支持&quot;&gt;浏览器支持&lt;/h2&gt;

&lt;p&gt;到 2026 年，所有主流浏览器（Chrome、Safari、Firefox、Edge）都已经稳定支持。
可以放心使用了。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;容器查询配合 CSS Grid 的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;auto-fit/auto-fill&lt;/code&gt;，几乎可以让你扔掉 99% 的媒体查询。&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry><entry>
      <title>周末骑行去山里</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/03/18/weekend-cycling/" rel="alternate" type="text/html" />
      <published>2026-03-18T18:00:00+08:00</published>
      <updated>2026-03-18T18:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/03/18/weekend-cycling/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>逃离屏幕，骑了 40 公里到山里露营。山风、咖啡、和一本翻不完的书。</summary>
      <category term="随笔" /><category term="生活" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/03/18/weekend-cycling/">
        &lt;p&gt;周末看天气预报说连续两天晴，于是临时决定骑车去山里。&lt;/p&gt;

&lt;p&gt;清晨五点出发，避开城市的车流。一路向北，沿着河道骑行，
空气里有早春的草木气息，自行车链条偶尔吱呀一声，
整个世界安静得只剩下风的声音。&lt;/p&gt;

&lt;p&gt;40 公里之后，到了一片半山腰的露营地。&lt;/p&gt;

&lt;h2 id=&quot;露营装备&quot;&gt;露营装备&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;单人帐篷（1.2 kg）&lt;/li&gt;
  &lt;li&gt;充气垫 + 羽绒睡袋&lt;/li&gt;
  &lt;li&gt;小折叠桌、马扎&lt;/li&gt;
  &lt;li&gt;摩卡壶 + 小炉子&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;一本翻不完的书&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;我带的是 Hannah Arendt 的《人的境况》。说实话，
这本书躺在我书架上三年了，每次想读都被工作打断。&lt;/p&gt;

&lt;p&gt;这次终于读完了第一章。&lt;/p&gt;

&lt;h2 id=&quot;山里的下午&quot;&gt;山里的下午&lt;/h2&gt;

&lt;p&gt;下午没什么事，就煮了一壶咖啡，
坐在小马扎上看着远处的山。&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;「Action, the only activity that goes on directly between men without the intermediary of things or matter, corresponds to the human condition of plurality.」&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;读累了就抬头看看天。&lt;/p&gt;

&lt;p&gt;第二天早上回来的时候，腿肌酸痛，
但脑子从未如此清晰过。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;我们需要离开屏幕的时间，比想象中更多。&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry><entry>
      <title>工程实践中，为什么保持简单这么难</title>
      <link href="https://benjamindaoson.github.io/daoson_website/posts/2026/02/22/three-years-of-work/" rel="alternate" type="text/html" />
      <published>2026-02-22T22:00:00+08:00</published>
      <updated>2026-02-22T22:00:00+08:00</updated>
      <id>https://benjamindaoson.github.io/daoson_website/posts/2026/02/22/three-years-of-work/</id>
      <author>
        <name>Benjamin Taoson</name>
      </author>
      <summary>不是某种语言或者框架——而是「保持简单」这件事比想象中难得多。</summary>
      <category term="编程" /><category term="思考" />
      <content type="html" xml:base="https://benjamindaoson.github.io/daoson_website/posts/2026/02/22/three-years-of-work/">
        &lt;p&gt;工程实践中，我反复遇到一个问题：
&lt;strong&gt;「保持简单」比想象中难得多&lt;/strong&gt;。&lt;/p&gt;

&lt;h2 id=&quot;简单不是少做&quot;&gt;简单不是少做&lt;/h2&gt;

&lt;p&gt;刚入行的时候，我以为简单就是「代码少」。所以我会用一堆三元表达式、
箭头函数、链式调用，把十行代码压缩成一行。&lt;/p&gt;

&lt;p&gt;后来才明白，简单不是「字符少」，而是「概念少」。&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// 字符少，但概念多&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;reduce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// 字符多，但每一步都清楚&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;current&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;counts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;current&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;后者多了几行，但读的时候不需要”解码”，反而更”简单”。&lt;/p&gt;

&lt;h2 id=&quot;简单的本质是克制&quot;&gt;简单的本质是「克制」&lt;/h2&gt;

&lt;p&gt;写代码时，一个值得反复练习的能力，
是判断「&lt;strong&gt;不做某些事&lt;/strong&gt;」：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;不做过度抽象&lt;/li&gt;
  &lt;li&gt;不做超前设计&lt;/li&gt;
  &lt;li&gt;不引入用不上的依赖&lt;/li&gt;
  &lt;li&gt;不为了优雅而牺牲清晰&lt;/li&gt;
  &lt;li&gt;不在还没需求时就准备好「扩展点」&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;每一次克制都需要勇气，因为它意味着——
当未来真的有需求时，可能要返工。&lt;/p&gt;

&lt;p&gt;但十次假想的扩展性需求中，真正发生的可能只有一两次。
为这一两次提前付出的”复杂度税”，往往得不偿失。&lt;/p&gt;

&lt;h2 id=&quot;小结&quot;&gt;小结&lt;/h2&gt;

&lt;p&gt;简单 = 克制 + 清晰 + 谦逊。&lt;/p&gt;

&lt;p&gt;谦逊指的是：承认你不知道未来会怎么变。&lt;/p&gt;
      </content>
    </entry></feed>
