Stop sending me huge PRs; a rant
Stop sending me huge PRs; a rant
别再给我发超大 PR 了;一点牢骚
I’m tired boss. I’m tired of reviewing one, two, three thousand line PRs because some agent was able to “one shot the whole issue.” Small PRs were never asked for because they’re easier to write, it’s always been for the benefit of the reviewer. AI is such a boon to the industry, but it’s becoming such a liability for reviewers and maintainers. Maybe I’m just an old man yelling at the clouds, but please, stop sending me huge PRs.
老板,我累了。我厌倦了去审查那些一千、两千甚至三千行的 PR,仅仅是因为某个 AI Agent 能够“一次性解决整个问题”。我们要求小规模 PR 从来不是因为它们写起来更容易,而是为了审查者的利益。AI 对整个行业来说确实是一大福音,但它正在成为审查者和维护者的负担。也许我只是个对着天空咆哮的老古董,但请务必停止给我发送超大 PR。
I have heard on multiple occasions recently the argument that “it won’t work without the whole change” or “the code will do nothing if we don’t put in the entire diff,” well, yeah? Good? The point of small PRs is not necessarily to have small, individual, finished products. It’s to have small, digestable, reviewable, understandable pieces of work.
最近我多次听到这样的辩解:“如果不包含完整的改动,它就无法工作”或者“如果我们不提交整个 diff,代码就什么也做不了”。嗯,是吗?那不是很好吗?小规模 PR 的目的并不一定是要产出微小、独立、成品化的功能,而是为了将工作拆解成小巧、易于消化、易于审查且易于理解的部分。
I have no data for this, so I will wildly speculate, that the time it takes to fully comprehend a piece of code increases exponentially with the number of lines the code covers. Taking up exponentially more of my time because you wanted to ship a full feature does not spark joy.
虽然我没有数据支持,但我可以大胆推测:完全理解一段代码所需的时间,会随着代码行数的增加而呈指数级增长。仅仅因为你想一次性交付完整功能,就占用我指数级增长的时间,这真的让人一点也高兴不起来。
While we’re at it, I don’t need 50 line comments. Sure, document functions, give me jsdoc, rustdoc, javadoc, all of that good stuff. Absolutely do not give me 5 lines of comments on why a variable is named is_logged_in. If your variable is named well, 9 times out of 10 I’ll understand what it does. If your variable is not named well and you need a comment, name your variable better.
顺便提一下,我不需要 50 行的注释。当然,给函数写文档、提供 jsdoc、rustdoc、javadoc 等等这些好习惯是必须的。但绝对不要给我写 5 行注释来解释为什么变量命名为 is_logged_in。如果你的变量命名得当,十有八九我一眼就能看懂它的用途。如果你的变量命名糟糕到需要写注释来解释,那请把变量名改好一点。
Finally, for you AI maximalists that say “just use AI to grok it bro,” you’re wasting your tokens reingesting code that was already made by an AI. “I use a different model for reviews though,” okay, great, why did you put it up for a human review at all then? Perhaps, you could have your precious AI separate it for us mere mortals and then review it after we’ve had our turn?
最后,对于那些 AI 极客们,你们说“兄弟,用 AI 去理解它不就行了”,你们这是在浪费 Token 去重新消化那些本就是由 AI 生成的代码。“但我用的是不同的模型来做审查啊”,好吧,太棒了,那你为什么还要把它提交给人类来审查呢?或许,你可以让你那珍贵的 AI 先把代码拆分好,等我们这些凡人审查完之后,你再让它去审查?
Look — AI is a great tool, it really helps things move faster and can make code better, but when React came out we didn’t accept larger PRs because “React is faster to write and easier to read,” so why are we doing it now?
听着——AI 是个伟大的工具,它确实能加快进度并提升代码质量。但当初 React 刚出来时,我们并没有因为“React 写起来更快、读起来更容易”就接受超大 PR,那为什么现在我们要这么做呢?
Addendum: are you just making giant PRs so I give up halfway through and approve it? If so, well played. Well. Played.
附言:你们是不是故意搞出巨大的 PR,好让我中途放弃直接批准?如果是这样,算你狠。算。你。狠。