AI 编程简直是场噩梦。难道只有我一个人有这种体验吗?
4 分•作者: sollawen•3 个月前
目前我对 AI 编码助手的最大不满之处在于:
痴迷于重复造轮子。你经常会发现它在一个文件中为同一个功能编写三个重复的函数。为什么?因为它害怕超出上下文窗口的限制,所以它只读取大型文件的一小部分,完全忽略了已有的功能。
文件本身为什么会如此臃肿?因为 AI 倾向于添加新代码而不是修改现有代码,而且它很少删除任何东西。经过几次迭代,你的代码库就会变成一堆“僵尸代码”。
缺乏整体性认知。它会过度关注当前任务,而对它所做的更改是否会破坏系统的其他部分毫不在意。如果你指出原始逻辑现在已损坏,它会将其视为一项全新的任务。它会修复那个特定的 bug,但它新写的代码在修复后是否还能正常工作?“不关我的事。”
上下文窗口的长度非常有限。如果你试图通过将所有必要的上下文信息塞入提示来解决上述问题,你很快就会达到 20 万个 token 的限制。再进行两次交互后,它就会触发自动压缩,然后突然又变回了“笨蛋”。
长上下文 = 即时脑损伤。当你好不容易将完美的上下文信息塞进窗口后,模型就会完全“失控”。上下文越长,它的回复就越不连贯。
逻辑推理能力几乎不存在。一个人类开发者只需要 3-5 行代码就能在现有函数中调整的简单功能?AI 却会坚持为此设计一个全新的系统架构。
你越是调整它,它就越“笨”。你消耗了数百万个 token,每次它回复“我明白了!”或“我完全理解了!”时,它生成的代码仍然无法运行。
查看原文
Here are my biggest gripes with AI coding assistants right now:
Obsessed with reinventing the wheel. You'll often find it writing three duplicate functions for the exact same feature in a single file. Why? Because it's terrified of blowing up the context window, so it only reads a fraction of a large file and completely misses the existing functionality.
Why are files so bloated in the first place? Because AI prefers adding new code over modifying existing code, and it rarely deletes anything. After a few iterations, your codebase becomes a mountain of dead code.
Zero holistic awareness. It hyper-focuses on the current task and couldn't care less if its changes break other parts of the system. If you point out that the original logic is now broken, it treats it as a brand-new task. It’ll fix that specific bug, but whether its newly written code still works after the fix? "Not my problem."
The context window is painfully short. If you try to solve the issues above by dumping all the necessary context into the prompt, you'll hit the 200k token limit in no time. After just two more turns, it triggers auto-compacting, and suddenly it turns back into an idiot.
Long context = instant brain damage. Just when you've painstakingly stuffed the perfect amount of context into the window, the model completely loses its mind. The longer the context, the more incoherent its responses become.
Logical reasoning is practically non-existent. A simple feature that would take a human dev 3-5 lines of code to tweak in an existing function? The AI will insist on designing an entirely new system architecture for it.
The more you tune it, the dumber it gets. You burn through millions of tokens, and every time it replies with "I understand!" or "I've got it completely!", the code it spits out still refuses to run.