提问 HN:你如何利用 AI 辅助编码来防止草率的验证?

1作者: rmnull6 个月前
在引入了智能体代码工具后,开发速度确实突飞猛进,但我一直在努力跟上这些工具的验证工作,因为有些东西“就是能跑”(这让我想起了那个老笑话,“它编译通过了”)。 所以我想知道,这只是我个人的问题,还是其他人也面临同样的情况,以及你们的验证工作流程是怎样的。但我最感兴趣的是你们处理工作的方式以及背后的思考过程。 ======== 附:我之前尝试过的方法: * 总是先验证工作,然后才批准。但这总是在一天结束时给我带来认知负担,让我精疲力竭。副作用是产出质量不好的工作。为了解决这个问题,我开始放慢工作节奏。这大大降低了开发速度,但对我的心理健康有好处。 * 我一直想尝试的另一件事是快速完成开发工作,然后花一两天时间验证。这会带来我想要的持续迭代,并获得只有在构建之后才能获得的见解。 * 我尝试过的另一个选择是,编写测试,然后让它生成代码,直到这些测试通过。但最初的门槛很高,因为需要指定、生成和验证的用例太多(这是迄今为止我获得的最可靠的方法,并且让我对构建的内容有一定的保证)。有时,使用智能体工具,这种初始验证需要明确地阐述出来,这会消耗时间,有时甚至让我忍不住想咒骂AI,因为它会遗漏我所说的(或者我认为规范中已经很清楚的)一些东西。
查看原文
After the introduction of agentic code tools, the development speed has increased rapidly, but i have been struggling to keep up with the verification of these tools, since some of these things &quot;just work&quot;(reminds me of the old joke, &quot;it compiles&quot;).<p>So i wanted to know whether this is a me problem, or others are also going through it and what your workflow for this looks like. but mostly I&#x27;m interested in the way you approach the work and the thought process behind that.<p>========<p>P.S: I&#x27;ll leave the approaches i have tried before()<p>* always verify the work and only then approve. But this always leads me to a cognitive load and fried brain state at the end of the day. As a side effect producing poor quality work. And to resolve that i started approaching the work more slowly. This has brought down the development speed a lot but this has been good for my mental health.<p>* Other thing that i have been meaning to try is to get the development things done quickly, then spend another 1 or two days verifying things. This leads to continous iteration that i want and get the insights that only come after building.<p>* Other option i have also tried is, write tests and then refine ask it to generate code till those tests work, again the initial barrier entry becomes high, because there&#x27;s so much of cases to be specified and generated and verified(this is the most reliable approach and happy path I&#x27;ve gotten till now that gives some sense of guarantee about whatever is built). Sometimes gain with agentic tools this initial verification has to be laid out clearly which consumes time and sometimes makes me wanna curse at AI because it misses out on somethings that i said(or i thought was clear with the spec)