刪除 168,000 行程式碼註解後,我的 AI Agent 毫無察覺
I Deleted 168,000 Lines of Comments. My AI Agent Didn't Notice
刪除 168,000 行程式碼註解後,AI Agent 沒有察覺;回應者認為結果可信,但指出樣本只有 n=3,且測試使用 Opus 5.5。回應者亦質疑測試任務的難度,提醒結果未必適用於其他程式碼庫,並認為註解可作文件,也有其價值。
This seems believable! And the n=3 of it all seems very wise (though n=3 alone isn't quite enough to speak confidently of "noise" AFAIU).
Two important caveats, though, before we rush to universalize this:
1. It's based on the smartest model ever released to the public in the history of humanity, Opus 5.5. So if this is true for your codebase, it probably only became so ~post-Mythos.
2. It seems like the hard task isn't really hard enough -- the "trick" is something about PHP, and sounds common enough that it would be well baked into each model. Regardless, there are far, far easier to miss gotchas than "fails on reload", especially in a large codebase where a post-mortem are written about correct code that just runs slower all of a sudden or something, much less cases where you have to rely on users (or worse, metrics) to uncover such issues.
When I joined Google, they gave me the baffling instruction to try to write as few comments as possible. I've since learned that's a semi-popular approach, based on the logic that "the code should speak for itself". I'm just a baby engineer (4 more months to make it onto 30-under-30!), but I find that to be more about self-esteem for seniors and feeling like a craftsman than it is about real, measured tradeoffs.
Plus, comments can A) be documentation[1] and B) be beautiful[2] ;)
[1]: https://github.com/doering-ai/my-basis/blob/main/docs/regex....
來源:Hacker News:AI 熱帖 · news.ycombinator.com