文章摘要
文章反对过度依赖AI提示词优化来完成编程工作,主张开发者应亲自参与代码编写。作者建议可以结合AI辅助,如让AI生成初稿后自行重构、自己写关键部分让AI补充等,但避免陷入反复调整提示词的无效循环。核心观点是程序员应保持动手写代码的能力,而非沦为"提示词调校师"。
文章总结
标题:别光调教AI了,动手写代码吧
当前编程圈流行这样一条建议:
学会将问题分解成小块、明确需求、选择合适的AI模型,并不断优化你的提示词。
但我要说:别这么干。
"学会分解问题"没问题,但"反复优化提示词"大可不必。你真正该做的是动手写代码:
- 让AI生成初版代码,然后亲自重构优化
- 自己写出初始版本,再让AI审核改进
- 完成核心代码后,让AI补充剩余部分
- 先搭建代码框架,再让AI填充细节
看出规律了吗?关键是要深度参与编码,别把工作全丢给AI。
如果AI能在一两次提示后就完美完成任务,那当然好。否则就别再死磕提示词了,先自己写代码,再回头找AI。这样效果会好得多。
声明:这不是反AI建议。尽管用AI,随便用。但千万别陷入无休止的提示词调优陷阱——试图用"英语编程"让AI产出完美结果。这种方式低效、不精确且痛苦至极。
弄脏你的手,亲自写代码。这才是你的专长所在。
记住:你是软件工程师,不是提示词调教师。
★订阅获取最新文章
评论总结
以下是评论内容的总结,涵盖主要观点和论据,并保持不同观点的平衡性:
支持AI辅助编程的观点
AI作为高效工具:AI能快速查找API和算法,帮助重构代码,但开发者仍需决定架构和编写测试。
- "I use AI as a pairing buddy who can lookup APIs and algorithms very quickly" (评论1)
- "AI is just another tool, use it or turn it off. it shouldn’t matter much to a developer." (评论7)
帮助克服学习障碍:AI在陌生环境中提供代码示例,帮助开发者快速上手新语言或框架。
- "it allows to overcome the main 'energy barrier' for me — helping to navigate e.g. the vast standard library of a new programming language" (评论4)
- "Let the AI toil away making the implementation work according to your spec." (评论10)
反对过度依赖AI的观点
理解与记忆的丧失:过度依赖AI可能导致开发者对代码的理解和记忆能力下降。
- "I have found that I’m remembering more and understanding the code more (shocking)." (评论5)
- "If it’s the (N+M)th time, and you’ve been using AI to write the code for the last M times, you may find you no longer understand the problem." (评论9)
代码质量与团队问题:AI生成的代码可能未经充分审查,导致质量问题和团队矛盾。
- "no one will review the ticket now that it’s Llm generated and that it will probably make our application slower" (评论8)
- "If your prompting is even slightly off it seems like it can go from 10xing a build process to making it a complete waste of time" (评论11)
中立或平衡的观点
AI作为辅助而非替代:AI应被视为辅助工具,开发者仍需主导关键部分。
- "Write the initial version yourself and ask AI to review and improve it." (评论11)
- "Spend more time on interfaces and test suites. Let the AI toil away making the implementation work according to your spec." (评论10)
未来技能转变:未来开发者可能需要更多关注代码审查、测试和设计模式,而非直接编写代码。
- "learn reading/reviewing an inordinate amount of code, very fast. Also heavy focus on patterns, extremely detailed SDLC processes" (评论12)
- "how do you acquire/extend your skills in the age of AI-coding assistance?" (评论12)
总结:评论中既有对AI辅助编程的积极评价,也有对其潜在问题的担忧。多数观点认为AI应作为工具辅助开发者,而非完全替代编程过程。同时,开发者需警惕过度依赖AI可能导致的理解力下降和代码质量问题。