写代码。
Write the damn code

原始链接: https://antonz.org/write-code/

当前关于最大化AI编码辅助的建议——分解问题、具体提示和迭代改进——常常是*误导性的*。作者认为,无休止地调整提示以获得所需的代码是不可取的。 相反,**积极参与代码本身**。使用AI生成初始草稿、填充大纲或审查你的工作,但*不要*陷入提示不断调整的循环。如果AI不能快速提供可用的代码,**自己编写**。 核心信息是,软件工程师擅长*编写代码*,而不是“用英语编程”。虽然AI是一个有价值的工具,但依赖它通过提示来完善代码效率低下且令人沮丧。利用AI的优势,但保持控制并发挥你的编码技能以获得最佳结果。

相关文章

原文

Here's some popular programming advice these days:

Learn to decompose problems into smaller chunks, be specific about what you want, pick the right AI model for the task, and iterate on your prompts.

Don't do this.

I mean, "learn to decompose the problem" — sure. "Iterate on your prompts" — not so much. Write the actual code instead:

  • Ask AI for an initial version and then refactor it to match your expectations.
  • Write the initial version yourself and ask AI to review and improve it.
  • Write the critical parts and ask AI to do the rest.
  • Write an outline of the code and ask AI to fill the missing parts.

You probably see the pattern now. Get involved with the code, don't leave it all to AI.

If, given the prompt, AI does the job perfectly on first or second iteration — fine. Otherwise, stop refining the prompt. Go write some code, then get back to the AI. You'll get much better results.

Don't get me wrong: this is not anti-AI advice. Use it, by all means. Use it a lot if you want to. But don't fall into the trap of endless back-and-forth prompt refinement, trying to get the perfect result from AI by "programming in English". It's an imprecise, slow and terribly painful way to get things done.

Get your hands dirty. Write the code. It's what you are good at.

You are a software engineer. Don't become a prompt refiner.

★ Subscribe to keep up with new posts.

联系我们 contact @ memedata.com