ATRIUMsearch → argument graph
AnecdoteArticle

TDD(测试驱动开发)并非全新发明,而是一次重新发现:Kent把一本古老的薪资程序设计书中一个被遗忘的输入磁带技巧,套用到了他的SUnit测试框架上——先写测试、后写代码——结果发现这消解了他对编程的焦虑。

Kent Beck讲述了自己如何通过回想起磁带时代一本编程书里的技巧,并将其应用到SUnit框架上,从而重新发现了TDD,而这出人意料地缓解了他对编程的焦虑。 ✦ AI 生成 · 平台预翻

Kent Beck · The Pragmatic Engineer · 2026-07-01 · English original →

多年以后,Kent开发了一个小型测试框架SUnit,他偶然想起了那个输入磁带的技巧,于是把它套用到了SUnit上。按照这个模式,他会在写代码之前先写测试。他为此放声大笑,因为这听起来简直是个愚蠢的主意:类和方法都还没定义出来,为什么要写一个注定会失败的测试呢?
Years later, Kent built SUnit, a small testing framework, and randomly remembered the input-tape trick, so mapped it onto SUnit. If he followed the pattern, he’d write the test before the code. He laughed out loud at this because it seemed like such a stupid idea: why write a test that’s guaranteed to fail, when the classes and methods aren’t even defined yet?

阅读原文 ↗合理引用摘录 · 中文为平台译文