TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How I Started TDD

8 点作者 r11t超过 15 年前

2 条评论

tjpick超过 15 年前
gah! but all those steps make the whole process harder than just thinking hard and writing down the correct function to start with. Or to write several test cases to start with (because you know many of the expected outputs up front) and writing a single function that passes them all.<p>TDD should make the process EASIER and MORE efficient.<p>&#62;&#62;&#62; This isn't a perfect example of TDD, but that's not the point.<p>Illustrating a process by applying it to a problem that doesn't need it is surely the wrong way to go about it. Unfortunately "the point" is mostly dwarfed by the imperfect example.
评论 #933799 未加载
sync超过 15 年前
That last step is quite a leap from the previous 6.
评论 #933711 未加载