Ask HN: 理解代码正在变得“可有可无”吗?

3作者: mikaelaast5 天前
在推特上,Claude Code 的创建者 Boris Cherny 最近表示,Claude Code 中近乎 100% 的代码都是由 Claude Code 编写的,他个人已经几个月没有写过代码了。另一条来自 OpenAI 员工的推文写道:“编程一直很糟糕 [...] 我很高兴它结束了。” 这种“终于摆脱了”的态度真的让我很恼火。它把编程框定为一个我们终于可以摆脱的必要之恶。 具有讽刺意味的是,我的目标与此类似,只是原因不同。我也想少写代码。 少写代码是因为代码等于责任。少写代码是因为“代码越多,问题越多”。因为糟糕的代码就是技术债务。因为错误是不可避免的。少写代码是因为活动部件越少,出错的可能性就越小。 我坦诚地说,我喜欢删除代码胜过编写代码。所以,我对释放一个人工智能代理来生成我没有机会完全理解的大量代码持怀疑态度,这也许并不令人惊讶。 对我来说,编程本质上是关于构建知识的。软件开发是知识工作:发现我们不知道我们不知道什么,识别我们知道我们不知道什么,弄清楚真正的问题是什么,并解决它。 而这些知识必须存在于某个地方。 当有人说“我不再写代码了”时,我听到的意思是:“我把知识工作塞进了一个黑盒子里。” 对我来说,两者之间存在真正的区别: - 用语言表达的知识(人工智能可以无限量地生成),和 - 在人脑中凝固为联系的知识。 后者不是一个文本文件。它不是你的“技能”或“珠子”。它不是数百行 Markdown 垃圾。不。它是一个心智模型:系统是什么,为什么是这样,哪些是可以安全更改的,抽象提供了什么杠杆作用,以及脆弱的假设在哪里。 我一直带着我正在使用的代码库的心智模型。在我脑海中,它不是“代码”,不是语言和语法意义上的。它更像是一个“思维宫殿”,我可以走进其中,打开门,关上门,翻新,拆掉一堵墙,增加一个新的侧翼。它发生在直觉和智力融合的层面。 我并不反对进步。最近,随着发生的一切,我开始将代码分为两类: - 我不需要在大脑中建模的代码(低风险,遵循既定惯例,可预测,易于验证),和 - 我忍不住要在大脑中建模的代码(业务关键,新颖,实验性,或引入新模式)。 我很乐意将前者委托给人工智能代理。后者是领域知识和系统理解真正形成的地方。这就是它变得有趣的地方。这是有趣的部分。而我的“思维宫殿”渴望与它保持同步。 你是否担心理解代码在某种程度上是可选的这种新兴观念?
查看原文
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 it.<p>Is the emerging notion that understanding code is somehow optional something you are worried about?