2026年为什么还要写代码
Why write code in 2026

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

虽然现代的“软件工厂”模式利用智能体通过基础设施、测试和护栏实现开发自动化,但完全依赖人工智能编写代码存在重大风险。 作者认为,尽管人工智能可以高效地维护流水线,但人类仍需亲手编写代码——这并非因为人类写得更好,而是因为手动编码是一种至关重要的思考工具。英语在表达复杂的架构意图时往往不够精确,而编写代码则能带来对系统脆弱性和设计逻辑的深刻、直观的理解。 如果没有人类的亲身参与,“垃圾代码”就会堆积,而智能体本质上是保守的,倾向于在过去的错误上进行构建和放大,而非纠正它们。通过手动调试、重构和进行“探针测试”(spiking),人类能够保持必要的掌控感和批判性的品味,从而有效地引导工厂运作。归根结底,软件工程师的角色在于平衡高水平的自动化与优化架构所需的精细化实操工作。我们不应将智能体仅仅视为编译器,而应将其视为实习生;它们需要那种只有通过深度、主动参与代码本身才能获得的、经过锤炼的专家级指导。

关于“为何在2026年还要编写代码”的Hacker News讨论,突显了软件行业在AI角色问题上的尖锐分歧。 **支持手动编程的观点:** 许多开发者认为,编写代码对于维护系统的“思维模型”至关重要。他们主张,深度专注和亲手编码的过程是建立专业能力、调试复杂生产环境问题以及避免“草率粘贴”(即大模型产生冗余和过度设计)所必需的。持此观点的人认为,完全依赖AI会导致技能退化和架构控制权的丧失,实际上使开发者变成被动的观察者,无法有效地审查或排查他们所“拥有”的系统。 **支持AI辅助开发的观点:** 相反,一些人认为AI在广泛的非专业领域已经超越了人类的能力。他们将编码视为一种正在进化的技能;正如汇编语言曾让位于高级语言一样,手动编码正在让位于“代理式”工程。他们认为,AI输出的质量取决于用户的输入——通过掌握深度的、富含上下文的提示词以及严谨的架构设计,开发者可以比独自工作时更快、更一致地实现成果。
相关文章

原文

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