为什么 TDD 会出现“尖峰”? 叫做“尖峰”?

发布于 2024-07-08 07:36:28 字数 268 浏览 12 评论 0原文

测试驱动开发人员指的是一种快速、探索性的调查,其中涉及编写代码以查看其是否有效,即峰值

你知道他们为什么想出这个词吗?

更新: 肯特·贝克 (Kent Beck) 的造词对我来说看起来像是“原始”的,尽管他对这个词的使用在我看来没有多大意义。 编写快速测试代码是“让项目突飞猛进”吗?

有趣的是,他似乎停止使用这个词,因为它对不同的人有不同的含义 - 请参阅下面的证据!

The test driven development guys refer to a quick, exploratory, investigation that involves coding something up to see if it works, a spike.

Any ideas why they came up with that word?

Update: The coinage by Kent Beck looks like the 'original' one to me, although his usage of the word doesn't make much sense in my opinion. Coding up a quick test is 'putting a spike through the project'?

Interestingly, it seems he stopped using the term because it conjured up various meanings to different people - see below for evidence!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

御弟哥哥 2024-07-15 07:36:28

Ward Cunningham 在 WardsWiki 上写道(参考 Kent Beck):

我经常问肯特,“什么是
我们可以编程的最简单的事情
会让我们相信我们是对的
轨道?”这样走出去
眼前的困难常常导致我们
更简单、更引人注目的解决方案。
肯特称其为“斯派克”。 我找到了
练习特别有用
维护大型框架。

Kent Beck 在更好的 Smalltalk 指南中写道:

有时我称其为“尖峰”,因为我们正在整个设计中推动尖峰。 [...] 由于人们将“钉鞋”与排球、铁路或狗联系在一起,因此我开始使用“架构原型”来描述此实现。

Ward Cunningham writes on WardsWiki (referring to Kent Beck):

I would often ask Kent, "What is the
simplest thing we can program that
will convince us we are on the right
track?" Such stepping outside the
difficulties at hand often led us to
simpler and more compelling solutions.
Kent dubbed this a Spike. I found the
practice particularly useful while
maintaining large frameworks.

Kent Beck writes in Guide to Better Smalltalk:

Sometimes I call this a "spike," because we are driving a spike through the entire design. [...] Because people variously associate "spike" with volleyball, railroads, or dogs, I have begun using "architectural prototype" to describe this implementation.

佞臣 2024-07-15 07:36:28

恕我直言,“尖刺”一词与将钉子钉入木板有关。
是的..就是这里

“Spike”是一个极限编程术语
意思是“实验”。 我们用这个词
因为我们认为尖峰有一个
快速、近乎蛮力的实验
目的只是学习一件事。
想象一下用一根大钉子穿过
板。
-- C# 极限编程冒险 - Ron Jeffries

IMHO the term spike relates to driving a nail through a plank.
Yup.. here it is

"Spike" is an Extreme Programming term
meaning "experiment". We use the word
because we think of a spike has a
quick, almost brute-force experiment
aimed at learning just one thing.
think of driving a big nail through a
board.
-- Extreme Programming Adventures in C# - Ron Jeffries

诗笺 2024-07-15 07:36:28

我一直认为这是一个登山者的比喻。 你在登山途中在山上放一个尖峰的地方。 如果钉子粘住了,那就可以走那条路。

I always considered it to be a mountain climber analogy. Where you put a spike in the mountain on your way up. If the spike sticks, then it's ok to go that way.

沒落の蓅哖 2024-07-15 07:36:28

因为它与众不同,就像图表中的尖峰一样。 例如,CPU 使用率激增。

Because it's out of the ordinary, like a spike in a graph. E.g. A spike in CPU usage.

神经暖 2024-07-15 07:36:28

术语文件具有以下条目:

spike v.

  1. 通过引入强制产生特定结果的(有时是临时的)装置来击败选择机制。 这个词被用于多个行业; 电话工程师指的是通过插入一个销钉来将继电器保持在关闭或打开状态来尖峰继电器,铁路工人指的是尖峰轨道开关以使其无法移动。 在编程环境中,它通常指临时更改,通常用于测试目的(与永久更改相反,永久更改称为硬连线)。

  2. [边界技术用语]原本相当恒定的图表中的可见峰值(例如,线路电压突然激增、电路中逻辑线路上出现意外的短“高”)。 黑客经常利用这一点来突然增加一些数量,例如系统负载或网络流量。

The Jargon File has the following entry:

spike v.

  1. To defeat a selection mechanism by introducing a (sometimes temporary) device that forces a specific result. The word is used in several industries; telephone engineers refer to spiking a relay by inserting a pin to hold the relay in either the closed or open state, and railroaders refer to spiking a track switch so that it cannot be moved. In programming environments it normally refers to a temporary change, usually for testing purposes (as opposed to a permanent change, which would be called hardwired).

  2. [borderline techspeak] A visible peak in an otherwise rather constant graph (e.g. a sudden surge in line voltage, an unexpected short "high" on a logical line in a circuit). Hackers frequently use this for a sudden short increase in some quantity such as system load or network traffic.

德意的啸 2024-07-15 07:36:28

它被称为尖峰,因为它贯穿系统的所有层。 这就是他所说的建筑原型的意思。

It is called Spiking because it slices through all layers of the system. That's what he means when he says Architectural Prototype.

梦中的蝴蝶 2024-07-15 07:36:28

我相信这是一种工程表达。 尖峰是一种临时解决方案,您在制定永久解决方案之前先尝试看看它是否有效。 铁路工程师谈论在道岔上安装道钉:将道钉插入道岔中,使其无法移动。

I believe it is an engineering expression. A spike is a temporary solution, something you try out to see if it works, before you make the permanent solution. Railroad engineers talk about spiking a track switch: inserting a rail spike into the switch, so it cannot be moved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文