Why are TDD 'Spikes' called 'Spikes?
Asked Answered
T

7

49

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!

Tenaille answered 30/10, 2008 at 12:14 Comment(0)
R
49

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.

Randarandal answered 30/10, 2008 at 13:11 Comment(0)
B
11

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

Beau answered 30/10, 2008 at 12:40 Comment(0)
T
7

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.

Thine answered 30/10, 2008 at 12:24 Comment(1)
That's an interesting analogy and I like it, but most climbers would call them a piton, and pitons have been out of fashion on nearly every established climbing area for probably 30ish years (since the advent of camming devices). =PSand
E
2

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

Empiricism answered 30/10, 2008 at 12:16 Comment(0)
R
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.

Randarandal answered 30/10, 2008 at 12:33 Comment(0)
P
2

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

Pinnati answered 1/9, 2014 at 16:29 Comment(0)
R
1

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.

Randarandal answered 30/10, 2008 at 12:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.