开发者们正在解决错误的问题。
Developers Are Solving the Wrong Problem

原始链接: https://caseysoftware.com/blog/developers-are-solving-the-wrong-problem

## “氛围编码”的兴起与软件开发重点的转变 软件世界对“氛围编码”存在分歧——利用人工智能根据问题描述快速生成代码。有些人认为这是一种对既定编码实践的混乱威胁,而另一些人则认为这是编写代码*目的*发生根本性转变。传统上,“简洁”、“模块化”和“精炼”的代码受到重视,因为人类阅读和维护代码本身就具有难度。 然而,如果主要的“读者”变成机器,那么许多担忧就会减少。核心目标不是漂亮的的代码,而是*高效地解决问题*。氛围编码允许用户绕过漫长的开发周期,直接获得解决方案,即使是不完美的,从而促进快速迭代和学习。 这并不否定质量控制的必要性。相反,它强调通过严格的测试(业务逻辑、安全性、性能)来验证人工智能生成代码,并编写有效的提示来清晰地定义需求。最终,代码成为一种可丢弃的副产品,而提示和学习过程才是真正的价值。 未来可能将拥有更多的自动化、“无开发者”公司,以及对能够利用人工智能解决问题的人才的需求——这对那些关注结果的人来说是福音,但对那些仅仅致力于代码工艺的人来说是一个挑战。

## 黑客新闻讨论:开发者们解决的问题是否错误? 一篇由[caseysoftware.com]引发的黑客新闻讨论,围绕着人工智能驱动的“氛围编码”工具可能导致更少开发者工作岗位的想法展开。然而,评论者们大多不同意,预测会产生一种反趋势:更多的非技术公司将聘请开发者来寻找*定制*解决方案,而不是依赖昂贵的SaaS和顾问。 争论延伸到代码质量。一些人认为开发者过于关注“干净代码”,而速度和客户需求才是最重要的。另一些人则强烈捍卫代码质量,并非为了质量本身,而是为了长期的可维护性、减少错误和安全性——强调未来自己和其他使用该代码的人将承担的负担。 一个关键点是,好的代码反映了对所解决问题的深刻理解,而不仅仅是美观。一位评论员将问题描述为“映射”——结构良好的代码反映了问题的复杂性,而“意大利面代码”则会产生不可预测和危险的后果。最终,许多人认为“过度关注质量的开发者”的说法是对现实的误解。
相关文章

原文

Everyone is either offended or excited about “vibe coding.” It’s all the rage and going to solve all your problems, or it’s the next great evil spewing crap code all over your systems. Those of us who love well structured clean code which is modular and concise seem to be a dying breed. For someone who’s early career was shaped by McConnell’s Code Complete, Brooks’ The Mythical Man Month, and Fowler’s Refactoring, this feels.. odd.

But when we dig into the WHY, something interesting happens:

Why do we want “well structured” code?

Well structured code is easier to understand to debug, extend, and maintain. But is there a single, shared definition of “well structured”?

Why do we want “clean” code?

Clean code is easier to understand to debug, extend, and maintain. But is there a single, shared definition of “clean”?

Why do we want “modular” code?

Modular code is easier to understand to debug, extend, and maintain. But is there a single, shared definition of “modular”? Actually, yes the Single Responsibility Principle addresses this one.

Why do we want “concise” code?

The less code there is, the easier it is to understand to debug, extend, and maintain. But too concise can make things harder to understand.

But when it gets down to it, all of these goals point at the problem.

It’s Not About You 

Previously, we needed “well structured clean code which is modular and concise” because writing code was easy but reading code is hard. Really hard. Painfully hard. Making sense of someone else’s code is harder still. All of our practices are really just to decrease that pain. Anything we can do to make it easier for the next person – or ourselves six months from now – is worth it.

But what if the next “person” isn’t a person?

If we assume that the code will only be debugged, extended, and maintained by a computer, most of our reasoning for clean code goes out the window. We don’t care what a human can do with the resulting (output) code as long as they can consistently generate code and configuration to solve the business problem, which gets at the REAL problem.

It’s Not About Code 

Somewhere along the line, we started treating the code as our goal. We worked hard to make sure it was structurally perfect on whatever framework we’re using today and didn’t realize that no one cares about our code. No one cares or even knows how “clean” our code is. They don’t even know what code is.

All our customers know is “does this solve my problem?” Enter vibe coding.

It’s About the Problem 

When a savvy user can describe their problem in detail, they can skip over all the messy coding steps and get directly to a solution. It won’t be perfect, and it won’t have “clean code” but they’ll see it in hours instead of months. More importantly, the savviest users can make mistakes, improve their understanding, experiment with ideas, and iterate on the entire process while getting better at each step along the way at a fraction of the cost.

And that’s why vibe coding is popular and only going to get more popular.

Instead of seeing vibe coding as a threat, we need to consider it another tool.

If you see it exclusively as a threat, I’m shocked you read this far. Thanks. I hope I can nudge your thinking.

If you see it as a tool, there are a few things we can do.

Improving Vibe Coding 

First, remember that any generative AI approach is only as good as the underlying model. If there’s a public model that suits your needs, use it. Though you can also give it context by adding code that fits your standards and expectations. To be clear, I don’t mean coding standards but patterns and practices which demonstrate good security and performant code.

Next, build out the rest of your tools. If you’re not writing the code directly, you need to be able to validate that the code works exactly the way you expect. At a minimum, that means testing business logic and validating interfaces, but you should include security and load or performance testing systems too.

Next, figure out how to describe your needs and capabilities effectively. We all know about requirements documents and Jiras but you’ll need to figure out how to translate that into actionable requests and steps for the generative AI. This will vary heavily on the system you’re using.

Finally, get used to throwing code away. Remember that your goal is solving the problem, and your code is merely the byproduct or the tool to get to that solution. The most important parts are the prompt and process used to generate the code, along with the understanding you gained and applied to get to that prompt. The more and faster you can learn, adapt, iterate, and ship, the better your solution will be.

But what happens After Vibe Coding?

It’s hard to predict things – especially the future – but I have a couple ideas.

First, more people are going to try more ideas faster. This is good. The people who were Excel wizards a generation ago are going to create “pretty good” things that solve their problems without involving a developer. My friends over at Dreambase are already doing that. We’ll have more automations and solutions than ever before.

Second, we may see the rise of “developer-less” companies. People will be able to imagine, describe, and ship a product with minimal developer input. Occasionally they may need an integration or similar and might contract with someone but maybe not even that. In my “Creating Better SDKs with Generative AI” course for LinkedIn, I realized that with well-defined interfaces, you don’t need much human interaction.

BUT – is this good or bad? Depends on who you are. If you job is to solve problems faster, this is a great time to be in the space. If your job is only to write beautiful code, you have a problem.

联系我们 contact @ memedata.com