问HN:代码审查的命运如何?
鉴于人工智能的使用日益增加,我的经验是,团队成员的工作节奏非常快,产生了大量的变更,以至于几乎不可能对所有内容进行审查。有时我甚至无法跟上自己使用大型语言模型(LLMs)生成的代码。诚然,我可以放慢这一切的速度。当以下情况之一成立时,我确实会这样做:
1. 这是我想要理解的新领域
2. 我对当前领域的代理不够信任
3. 这是极其复杂且细致的工作
依赖于“神谕”(能够提供一个真实依据,以便LLMs可以对其实现进行检查的东西)让我在跳过审查时感到更加自信,也让我安心。广泛的测试和正式验证似乎将取代代码审查。
代码审查还提供了指导、设计反馈和共享所有权。那么,指导的方向在哪里转移了呢?人们是否仍然有时间进行设计审查?
开源AI辅助的1000多行的拉取请求(PR)是另一个完全不同的挑战。我在这里的最佳技巧是提取PR中的关键思想,并自己重新实现一遍。
查看原文
Given the increased use of AI, my experience is that teammates are moving so fast churning out so many changes that it is nigh impossible to review it all. I can't even keep up with the code being generated by my own use of LLMs at times. Granted, I can slow it all down. And I do at times when one of the following is true:
1. It is a new space I want to understand
2. I don't trust the agent for the current domain
3. It is incredibly complex and nuanced work<p>Leaning on oracles (something that can provide a ground truth that LLMs can check their impls against) gives a lot of confidence and eases my mind when skipping reviews. Expansive testing and formal verification seem like they will displace code review.<p>Code review also provided mentorship, design feedback, shared ownership. Where is mentorship being redirected? Are people still finding time to design review?<p>Open Source AI assisted 1k+ line PRs is a whole nother ball of wax. My best trick here is to extract the key ideas from the PR and re-implement it myself.