人工智能让编程更有趣。
AI made coding more enjoyable

原始链接: https://weberdominik.com/blog/ai-coding-enjoyable/

这位软件工程师认为工作中令人沮丧的方面是重复性的“打字练习”代码——例如大量的错误处理、管理众多数据类型和属性传播。然而,最近的进步,特别是人工智能驱动的工具,正在显著改善体验。 这位工程师利用人工智能来*生成*测试,设计可测试的架构并提供初始示例来指导人工智能。虽然通常信任人工智能的代码生成,但他们仍然对复制粘贴功能持谨慎态度,担心大型语言模型引入的微妙且难以检测的错误。 总的来说,这位工程师对这些新工具感到兴奋,它们正在自动化软件开发中最繁琐的部分,让他们能够专注于更具吸引力和智力刺激性的任务。他们认为这是职业生涯中的一个重大积极转变。

## AI 与编码的乐趣:喜忧参半 一篇最近的文章引发了 Hacker News 上关于人工智能是否真正提升编码体验的讨论。虽然有些人发现像 LLM 这样的 AI 工具可以提高生产力,尤其是在繁琐的任务和快速原型设计方面,但许多人表达了一种令人惊讶的情绪:**人工智能可以*降低*乐趣。** 许多评论员指出,手动编写代码,即使是“枯燥”的部分,比如测试,也能培养更深入的理解和所有权意识。依赖人工智能可能会让人感觉像是在别人的代码库中工作,缺乏从头开始构建解决方案的满足感。 讨论强调了一个有用的框架,即将工作分为“创造性”和“繁重”,理想情况下 AI 应该处理后者。然而,人们担心人工智能可能会通过绕过关键的学习体验(如错误处理和系统架构)来助长不良的工程实践。另一些人则担心供应商锁定和对持续互联网连接的依赖。 最终,意见不一。有些人拥抱人工智能来加速个人项目,而另一些人则认为它窃取了解决问题和深入代码知识带来的“多巴胺刺激”。
相关文章

原文

To me, one of the most annoying parts of software engineering is writing code that doesn’t require thinking. It’s just a typing exercise, and that’s boring.

That includes code outside of the happy path, like error handling and input validation. But also other typing exercises like processing an entity with 10 different types, where each type must be handled separately. Or propagating one property through the system on 5 different types in multiple layers.

Writing tests is another enjoyable use-case. I design the architecture so the code is testable, write the first test so the AI knows how they should be written, and which cases should be tested. Then I tell the AI each test case and it writes them for me.

The only thing where I don’t trust it yet is when code must be copy pasted. I can’t trace if it actually cuts and pastes code, or if the LLM brain is in between. In the latter case there may be tiny errors that I’d never find, so I’m not doing that. But maybe I’m paranoid.

In any case, this is incredible. In the past years I’ve been handed tools that do the most tedious tasks of software engineering for me. And I love it.

联系我们 contact @ memedata.com