为什么 TDD 会出现“尖峰”? 叫做“尖峰”?
测试驱动开发人员指的是一种快速、探索性的调查,其中涉及编写代码以查看其是否有效,即峰值。
你知道他们为什么想出这个词吗?
更新: 肯特·贝克 (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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
Ward Cunningham 在 WardsWiki 上写道(参考 Kent Beck):
Kent Beck 在更好的 Smalltalk 指南中写道:
Ward Cunningham writes on WardsWiki (referring to Kent Beck):
Kent Beck writes in Guide to Better Smalltalk:
恕我直言,“尖刺”一词与将钉子钉入木板有关。
是的..就是这里
IMHO the term spike relates to driving a nail through a plank.
Yup.. here it is
我一直认为这是一个登山者的比喻。 你在登山途中在山上放一个尖峰的地方。 如果钉子粘住了,那就可以走那条路。
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.
因为它与众不同,就像图表中的尖峰一样。 例如,CPU 使用率激增。
Because it's out of the ordinary, like a spike in a graph. E.g. A spike in CPU usage.
术语文件具有以下条目:
spike v.
通过引入强制产生特定结果的(有时是临时的)装置来击败选择机制。 这个词被用于多个行业; 电话工程师指的是通过插入一个销钉来将继电器保持在关闭或打开状态来尖峰继电器,铁路工人指的是尖峰轨道开关以使其无法移动。 在编程环境中,它通常指临时更改,通常用于测试目的(与永久更改相反,永久更改称为硬连线)。
[边界技术用语]原本相当恒定的图表中的可见峰值(例如,线路电压突然激增、电路中逻辑线路上出现意外的短“高”)。 黑客经常利用这一点来突然增加一些数量,例如系统负载或网络流量。
The Jargon File has the following entry:
spike v.
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).
[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.
它被称为尖峰,因为它贯穿系统的所有层。 这就是他所说的建筑原型的意思。
It is called Spiking because it slices through all layers of the system. That's what he means when he says Architectural Prototype.
我相信这是一种工程表达。 尖峰是一种临时解决方案,您在制定永久解决方案之前先尝试看看它是否有效。 铁路工程师谈论在道岔上安装道钉:将道钉插入道岔中,使其无法移动。
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.