RT Dave W Plummer:他说得对。我参与过的最后一个你能看懂的代码库是MS-DOS。等到Windows NT出现时,你已...

·

观点分析 · 2026/09/08

Dave W Plummer 回应了关于理解大型代码库的讨论。他指出,像 MS-DOS 这样的早期代码库可以完全理解,但像 Windows NT 这样的现代系统过于庞大,开发者只能专精于某个部分(如调度器或分配器),而无法全面掌握。他个人依赖视觉记忆,但代码量超出了他的上下文窗口。他提到,即使与更聪明的同事交流,也发现并非只有他这样。最终,大脑会将知识分类为具体和一般,例如可能具体了解 fork() 的工作原理,但对 printf() 的浮点格式化只有大致了解,感觉上知道但实际并非如此。Theo 补充说,如果你能理解整个代码库,那它就不那么重要。真正的软件比大脑能理解的范围更大。

这篇文章以资深开发者 Dave W Plummer 的视角,深刻剖析了大型代码库带来的认知挑战,反驳了“必须理解全部代码”的传统观念,并引用 Theo 的观点,为开发者提供了新的视角,值得一读。

RT Dave W Plummer

He's right. The last codebase I worked on that you had a chance to understand was MS-DOS.

By the time Windows NT came along, you could be an expert on the scheduler or an expert on the allocator, but you weren't going to know fibers and OLE embeddings at the same level.

Plus, I'm wired to remember what code looks like in the editor, so I've got to see it, and you just can't see it all.

There's too much code for my context window. And in talking to people on the team much smarter than me, I'm not the only one.

Eventually, your brain (or mine, at least) sorts them into specifics and generals. So I might know specifically how fork() works but only have a general sense of how printf() actually formats floats. It still FEELS like you know, but you don't.<hr />Theo - t3.gg: If you understand your whole codebase, the codebase isn't that important.

Real software is larger than what your brain can comprehend.

在原站观看视频

资讯配图

阅读原文

参与讨论