Why are TDD 'Spikes' called 'Spikes?

前端 未结 7 1579
梦谈多话
梦谈多话 2021-02-01 12:55

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

An

相关标签:
7条回答
  • 2021-02-01 13:36

    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.

    0 讨论(0)
  • 2021-02-01 13:36

    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.

    0 讨论(0)
  • 2021-02-01 13:37

    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.

    0 讨论(0)
  • 2021-02-01 13:41

    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

    0 讨论(0)
  • 2021-02-01 13:53

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

    0 讨论(0)
  • 2021-02-01 14:01

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

    0 讨论(0)
提交回复
热议问题