问HN:理解代码变得“可选”了吗?

1作者: mikaelaast5 天前原帖
在推特上,Claude Code 的创始人 Boris Cherny 最近表示,Claude Code 中几乎 100% 的代码都是由 Claude Code 编写的,而他个人已经几个月没有写代码了。另一位 OpenAI 员工的推文则写道:“编程一直很糟糕……我很高兴这一切结束了。” 这种“好 riddance”的态度让我非常不满。它将编程框定为一种我们终于可以摆脱的必要之恶。 讽刺的是,我的目标与此类似,只是原因不同。我也想写更少的代码。 减少代码,因为代码意味着责任。减少代码,因为“代码越多,问题越多”。因为糟糕的代码是技术债务。因为错误是不可避免的。减少代码,因为更少的活动部分意味着更少的出错机会。 老实说,我觉得删除代码比写代码更让我享受。因此,或许我对释放一个 AI 代理来生成我不可能完全理解的大量代码持怀疑态度也就不足为奇了。 对我来说,编程从根本上是关于构建知识。软件开发是一种知识工作:发现我们不知道的未知,识别我们知道的未知,弄清楚真正的问题是什么,并解决它。 而这些知识必须存在于某个地方。 当有人说“我不再写代码了”,我听到的是:“我把知识工作塞进了一个黑匣子。” 在我看来,以下两者之间有着真正的区别: - 用语言表达的知识(AI 可以无休止地生成),和 - 在人类大脑中固化为连接的知识。 后者不是一个文本文件。它不是你的“技能”或“珠子”。它不是数百行的 Markdown 垃圾。不,这是一种心智模型:系统是什么,为什么是这样,什么是安全的变更,抽象提供了什么杠杆,以及脆弱的假设在哪里。 我一直在心中保持着我所工作的代码库的心智模型。在我脑海中,它并不是“代码”这个意义上的语言和语法。它更像是一个“心智宫殿”,我可以走进去,打开门,关上门,翻新,拆掉一面墙,增加一个新翼。这发生在直觉与智力交融的层面。 我并不反对进步。最近,随着一切的发展,我开始将代码分为两类: - 我不需要在脑中建模的代码(低风险,遵循既定规范,可预测,易于验证),和 - 我无法不在脑中建模的代码(业务关键,创新,实验性,或引入新模式)。 我很乐意将前者委托给 AI 代理。后者才是领域知识和系统理解真正形成的地方。那才是有趣的部分。那是乐趣所在。而我的“心智宫殿”渴望与这一切保持同步。 你是否担心出现了理解代码在某种程度上是可选的这种新观念?
查看原文
On Twitter, Boris Cherny (creator of Claude Code) recently said that nearly 100% of the code in Claude Code is written by Claude Code, and that he personally hasn’t written code in months. Another tweet, from an OpenAI employee, went: &quot;programming always sucked [...] and I’m glad it’s over.&quot;<p>This &quot;good riddance&quot; attitude really annoys me. It frames programming as a necessary evil we can finally be rid of.<p>The ironic thing is that I’m aiming for something similar, just for different reasons. I also want to write less code.<p>Less code because code equals responsibility. Less code because &quot;more code, more problems.&quot; Because bad code is technical debt. Because bugs are inevitable. Less code because fewer moving parts means fewer things can go wrong.<p>I honestly think I enjoy deleting code more than writing it. So maybe it’s not surprising that I’m skeptical of unleashing an AI agent to generate piles of code I don’t have a realistic chance of fully understanding.<p>For me, programming is fundamentally about building knowledge. Software development is knowledge work: discovering what we don’t know we don’t know, identifying what we do know we don’t know, figuring out what the real problem is, and solving it.<p>And that knowledge has to live somewhere.<p>When someone says &quot;I don’t write code anymore,&quot; what I hear is: &quot;I’ve shoved the knowledge work into a black box.&quot;<p>To me there’s a real difference between:<p>- knowledge expressed in language (which AI can produce ad nauseam), and<p>- knowledge that solidifies as connections in a human mind.<p>The latter isn’t a text file. It isn’t your &quot;skills&quot; or &quot;beads.&quot; It isn’t hundreds of lines of Markdown slop. No. It’s a mental model: what the system is, why it’s that way, what’s safe to change, what leverage the abstractions provide, and where the fragile assumptions lie.<p>I’ve always carried a mental model of the codebase I’m working in. In my head it’s not &quot;code&quot; in the sense of language and syntax. It’s more like a &quot;mind palace&quot; I can step into, open doors, close doors, renovate, knock down a wall, add a new wing. It happens at a level where intuition and intellect blend together.<p>I&#x27;m not opposed to progress. Lately, with everything going on, I’ve started dividing code into two categories:<p>- code I don’t need to model in my head (low risk, follows established conventions, predictable, easy to verify), and<p>- code I can&#x27;t help modelling in my head (business-critical, novel, experimental, or introduces new patterns).<p>I’m fine delegating the former to an AI agent. The latter is where domain knowledge and system understanding actually forms. That’s where it gets interesting. That’s the fun part. And my &quot;mind palace&quot; craves to stay in sync with all of it.<p>Is the emerging notion that understanding code is somehow optional something you are worried about?