跳至內容

YAGNI

維基百科,自由的百科全書

YAGNI是英文 「You aren't gonna need it」 的縮寫,一般認為屬於軟件工程方法極限編程。YAGNI 原則指出,程式設計師應該在面臨確鑿的需求時,才實現相應功能。[1]

在 YAGNI 的實踐中,建議配合單元測試持續整合代碼重構;以避免產生難以維護的代碼(技術負債)。

參考文獻[編輯]

  1. ^ Extreme Programming examined, Giancarlo Succi, Michele Marchesi, 2001, 569 pages, webpage: Books-Google-VSCh, "XP says 'do the simplest thing that could possibly work ' because 'you aren't gonna need it'."