```为什么在2026年编写代码```
Why Write Code in 2026

原始链接: https://softwaredoug.com/blog/2026/07/09/write-code.html

尽管现代软件工程侧重于构建“软件工厂”——即支持 AI 智能体生成并交付代码的基础设施——我们绝不能放弃手动编程的实践。 有些人认为 AI 让编写代码变得不再必要,但这种“反向半人马”式的方法会导致被动观察、主体责任感减弱,以及“劣质代码(slop)”的累积。当我们停止编写代码时,便失去了直接以可执行逻辑进行思考的能力,因为英语对于复杂的计算而言,始终是一种不够精确的媒介。 编写代码是维护架构完整性的关键工具。通过手动梳理代码库,人类能够发现脆弱之处、优化模式,并防止因智能体过度追求安全而牺牲设计质量所导致的“保守放大”型错误。正如工厂经理必须偶尔亲临生产线才能了解流程为何失效一样,软件工程师必须保持亲力亲为,以确保工厂产出的是质量,而不仅仅是产量。 归根结底,编写代码不仅关乎语法,更是一种认知过程。通过沉浸在细节之中,我们能更有效地引导智能体,确保系统保持稳健、可维护,并始终与我们的长期架构愿景保持一致。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 为什么要在2026年编写代码 (softwaredoug.com) 6点 | zdw | 14分钟前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

It’s our job to build the software factory - not just the software. Software engineers maintain the assembly line allowing anyone to prompt for a change and ship immediately.

We set up the infrastructure that makes agents successful. We act proactively through prompts (skills, AGENTS.md, knowledge bases etc). We protect software reactively through automated evaluation (tests, linting, type systems, evals, other AI, etc).

It all keeps the agent on track. Even a stupid model, with fresh context, can work within these constraints and produce a good-enough change. It starts to seem ridiculous to even look at the code. And definitely laughable to ever want to write code.

I disagree. It’s still useful to write code.

Even with Fable-like intelligence humans get value from writing code. Not because agents are worse at coding that humans. But to think directly in the execution environment, not proxied through English.

It’s about attention and understanding. To keep my attention, I must go beyond ‘read code’ like a passive observer of agents from afar. To really connect with the architecture of the system, it helps to truly experience the code. I don’t want your flat 2D system of diffs and patches. From time-to-time, I need the full, 4DX virtual reality experience with pain sensors attached to my nethers to experience what’s happening.

And no, it’s not because this “code isn’t pretty”, it’s about experiencing fragility. If it’s hard for me to build on top of this code without something breaking, it’ll harder for an agent to make sense of it. If I can clean it up, then document a consistent principle about the architecture, without half-a-dozen exceptions the software factory works better. If I can debug, find where the testing strategy is weak, and find a fix I can squash an entirely new class of bugs.

Yeah, you can do that without writing code. I’m not going to lecture you, call you slop-kitty, and say the only way to really experience software is by a magnetized needle and a steady hand. I, too, am infected with AI Psychosis. The vast majority of my code is AI generated.

Nevertheless, I find writing code to be a useful tool. I encourage others to do it. I struggle to pay attention when I’m just a reverse centaur. When I read and approve code, I observe I don’t have the same sense of ownership. Slop flies under the radar. It’s harder to micro-adjust. And in the long run slop hurts agents too. The fragility accumulates precisely because we’re not paying attention to the details. On the other hand, when the human does some work, spikes an approach, and then the agent stamps out the patterns I participate and own the result.

Writing code helps me think.

English is an under-specified language. It’s not a precise way to express computation. For truly algorithmic work, I want to sketch and think in executable steps. I want a calibrated degree of precision. Sometimes a low-level language with a huge design space. Sometimes a high-level language with a more limited computation environment.

Instead, we’re switching to this wrong-headed mindset that coding agents are like compilers. That mindset gives us permission to ship terribly written code. Agents aren’t compilers - they’re more like freshly onboarded interns. They read partial possibly slopified code, take an imprecise description of the change, and must generate a change.

Humans can’t surrender their thinking and taste to armies of interns. And being hands-on, rather than consumers, helps.

For example, have you ever seen an agent follow the boy scout rule? Where they leave code better than they found it? And would you WANT them to try to do this?

Agents bias to making the current change as safely as possible. I had a situation in a previous codebase where one morning, pre-caffeinated, my meat brain mentioned using browser local storage. So some random state was managed in local storage. Everything else through a backend database. When I looked at the code, the amount of wrapping and indirection to preserve this idiotic human mistake probably tripled the LoC. Agents can amplify our one-off bad decisions by being so conservative.

Going through and joyfully deleting code and exploring helped me arrive at a better architecture than just trying to proxy this through English. My thinking, my authorship, my ability to guide the factor was massively amplified by caring about the code.

If we’re building a software factory, details matter. The details that establish architectural patterns. Down to algorithms and performance. Agents push us to evaluate, measure, and guard. They’ve made it cool to add CI into side projects early, not as an afterthought.

That’s massive improvement to the state of software.

But any assembly line has its weak spots.

Occasionally at the car factory, we need to take apart the assembly line. Or dig into the details of internal combustion engines to make a 10% improvement. Or spend an entire day observing brake pad testing to figure out why some issue in the field isn’t detected early.

We need to do that not while keeping the entire picture of the factory in our heads. We connect the minute details to the big picture. Drawing arbitrary boundaries about what you can touch in software gets in the way of that endeavor.

to learn use agents in search. build better RAG and use LLMs in query understanding.

联系我们 contact @ memedata.com