我永远无法完全拥抱LLM来写代码
作者曾教导妹妹不必理解每一行代码就可以使用成熟库函数,就像不懂内燃机也能开车。然而现在,当使用LLM生成代码时,作者发现自己陷入了同样的困境——他无法提交自己不理解或不信任的代码。每次生成的代码都可能出错,而修复的过程又可能带来新的问题。对代码理解的执着,抵消了AI生成速度带来的效率提升。作者质疑自己是否应该像信任内燃机一样信任AI,还是该更新这个比喻。
作者曾教导妹妹不必理解每一行代码就可以使用成熟库函数,就像不懂内燃机也能开车。然而现在,当使用LLM生成代码时,作者发现自己陷入了同样的困境——他无法提交自己不理解或不信任的代码。每次生成的代码都可能出错,而修复的过程又可能带来新的问题。对代码理解的执着,抵消了AI生成速度带来的效率提升。作者质疑自己是否应该像信任内燃机一样信任AI,还是该更新这个比喻。
The author rejects becoming a "reverse centaur"—a term for humans forced to review machine-generated code—after observing a surge in LLM-produced pull requests to his open source projects. Despite his personal decision not to use generative AI coding tools, he now spends increasing time reviewing code written by AI and explains how he resists this role.
The article argues that disallowing trailing (or leading) separators in languages like JSON, Haskell, and Prolog was a design mistake, as it makes adding or removing elements more complex. It highlights languages like Python, Go, and Alloy that permit trailing commas, and notes potential parsing ambiguities when trailing separators are used in control-flow contexts.
The article argues that Lucas Costa's concept of "backpressure" for systems handling code-generating AI is a misnomer. Backpressure signals upstream processes to slow down, while Costa's suggestions are about improving quality, not reducing quantity. The author proposes "lean manufacturing" as a more accurate analogy for managing unstable inputs from AI-generated code.
The article explains that the Windows thread pool is optimized for throughput rather than low latency, which can cause delays in task execution. It discusses the trade-offs between throughput and latency when scheduling work on thread pools.
A developer asks if there's a Windows API to exclude the cursor from a region (the opposite of ClipCursor). The answer is that no such feature exists, but the same effect can be achieved virtually by clipping the cursor to the inverse of the desired exclusion region.