出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2025/06/28 05:56 UTC 版)
YAGNI[1] (You aren't gonna need it[2][3]) とは、エクストリーム・プログラミング(XP)から生まれた原則であり、「プログラマは、それが実際に必要となるまで機能を追加しない方が良い」というものである[4]。直訳すると「あなたはそれを必要でなくなるだろう」、意訳すると「そんなの必要ないって」などという意味で、他の表現として"You aren't going to need it" (YAGTNI) [5][6]や"You ain't gonna need it"[7]というものもある。
YAGNIは、XPのプラクティスである"do the simplest thing that could possibly work"(DTSTTCPW、うまくいく方法のうち最もシンプルなものでやれ)の背後にある原則である[3][1]。これは、継続的リファクタリング、継続的自動単体試験、継続的インテグレーションなど、いくつかの他のプラクティスと組み合わせて使用されることを意図している。YAGNIが他のプラクティスのサポートに依存しているのは、XPの本来の定義の一部である。
^ abObject-oriented & classical software engineering, Schach, Stephen R. (2007). 618 pages, p., webpage: Book-Google-hWwh, quote: "Two acronyms now associated with extreme programming are YAGNI (you aren't gonna need it) and DTSTTCPW (do the simplest thing that could possibly work)."
^Extreme Programming Installed, Jeffries, Ronald E.; Ann Anderson, Chet Hendrickson (2001). 265 pages, p. 190, webpage: Books-Google-dIsC, quote: "YAGNI: 'You Aren't Gonna Need It.' This slogan, one of XP's most famous..., reminds us always to work on the story we have, not something we think we're going to need."
^ abExtreme Programming examined, Succi, Giancarlo; Michele Marchesi, 2001, 569 pages, webpage: Books-Google-VSCh, quote: "XP says 'do the simplest thing that could possibly work ' because 'you aren't gonna need it'."
^ Lindstrom, Lowell; Carmen Zannier; Erdogmus, Hakan, eds (2004). Extreme Programming and Agile Methods – XP/Agile Universe 2004: 4th Conference on Extreme Programming and Agile Methods. Lecture Notes in Computer Science. Berlin: Springer. p. 121. ISBN3-540-22839-X
^ Fowler, Martin; Kent Beck (8 July 1999). Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 431 pages, p. 68, webpage: BGoogle-1M.
ISBN978-0201485677. Quote: "you aren't going to need it".
^ Poppendieck, Mary; Tom Poppendieck (2003). Lean Software Development: An Agile Toolkit, p.59, webpage: BGoogle-hQ. Quote: "Kent Beck, Extreme Programming Explained, Chapter 17, uses the acronym YAGNI (You Aren't Going to Need It) for this practice and explains its rationale."
^ Olsen, Russ (2007). Design Patterns in Ruby, p.13, webpage: [1].
ISBN9780321490452. Quote: "This design principle comes out of the Extreme Programming world and is elegantly summed up by the phrase You Ain't Gonna Need It (YAGNI for short)."