甚麼是 spike code?

「spike」這個術語來自敏捷開發社群,其「官方」定義是:

Create spike solutions to figure out answers to tough technical or design problems. A spike solution is a very simple program to explore potential solutions. Build a system which only addresses the problem under examination and ignore all other concerns. Most spikes are not good enough to keep, so expect to throw it away. The goal is reducing the risk of a technical problem or increase the reliability of a user story's estimate.

When a technical difficulty threatens to hold up the system's development put a pair of developers on the problem for a week or two and reduce the potential risk.

簡單地說,就是開發軟體專案時,常常會碰到一些自己不太確定的技術或需求,如果不寫個小程式親自實驗看看,很難確定到底合不合用,也不敢直接用在真正的專案裡。

這種實驗性質的小程式,有可能寫成單獨的範例,也有可能是掛在目前的應用程式裡面(做成隱藏的功能)。若是後者,為了避免影響 production code 的正常運作,通常會利用版本控制系統的分支(branch)功能來做適當的隔離。就如 Jeremy 所說的:Don't check in spike code......into the trunk

不過,這些簡單的小實驗或範例其實也有保存的價值。某種程度上,它們反映了程式設計師當時的想法、企圖、或學習的過程,將來也許有機會再回頭參考。而且這些範例通常很簡單,拿來做教學範例,或進一步擴展成更有用的程式,也都有些幫助。無論再小(除了 hello world 那類)的程式,當時都花了腦筋寫,用完即丟不免可惜,不如給它們找個適當的地方安置(例如放在專案的 spikes 或 experiments 目錄下),方便自己或其他團隊成員日後參考。
============
麻煩的是,這個 spike 到底要怎麼翻譯啊?
spike => 實驗?
spike code => 實驗程式?還是更囉嗦的「實驗性質的程式碼」?
Copyright © 2012. Huan-Lin 學習筆記 - All Rights Reserved
Powered by Blogger
Template Design by Cool Blogger Tutorials
Published by Templates Doctor