HN 提问:代码评审的命运如何?
1 分•作者: tantaman•18 天前
随着人工智能(AI)使用的增加,我的经验是,团队成员的开发速度非常快,产生了大量的代码变更,以至于几乎不可能全部审查。有时我甚至跟不上自己使用大型语言模型(LLMs)生成代码的速度。诚然,我可以放慢速度。当出现以下情况时,我确实会这样做:
1. 这是一个我想了解的新领域
2. 我不信任该代理在当前领域的能力
3. 这是一项极其复杂且细致的工作
依赖“神谕”(即能够提供大型语言模型可以对照检查其实现的基本事实)可以极大地增强信心,并在跳过代码审查时让我感到安心。广泛的测试和形式化验证似乎将取代代码审查。
代码审查也提供了指导、设计反馈和共同所有权。指导的去向何方?人们是否仍有时间进行设计审查?
开源 AI 辅助的千行以上拉取请求(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.