You ain't gonna need it

From Wikipedia, the free encyclopedia
  (Redirected from You Aren't Gonna Need It)
Jump to: navigation, search

"You ain't gonna need it" or “You aren′t gonna need it”[1] (acronym: YAGNI) is the principle in extreme programming that programmers should not add functionality until it is necessary.[2] Ron Jeffries writes, "Always implement things when you actually need them, never when you just foresee that you need them."[3]

[edit] Rationale

According to those who advocate the YAGNI approach, the temptation to write code that is not necessary at the moment, but might be in the future, has the following disadvantages:

  • The time spent is taken from adding, testing or improving necessary functionality.
  • The new features must be debugged, documented, and supported.
  • Any new feature imposes constraints on what can be done in the future, so an unnecessary feature now may prevent implementing a necessary feature later.[clarification needed]
  • Until the feature is actually needed, it is difficult to fully define what it should do and to test it. If the new feature is not properly defined and tested, it may not work correctly, even if it eventually is needed.
  • It leads to code bloat; the software becomes larger and more complicated.
  • Unless there are specifications and some kind of revision control, the feature may not be known to programmers who could make use of it.
  • Adding the new feature may suggest other new features. If these new features are implemented as well, this may result in a snowball effect towards creeping featurism.

[edit] See also

[edit] References

  1. ^ "You Arent Gonna Need It". C2 wiki. http://c2.com/xp/YouArentGonnaNeedIt.html. Retrieved 2011-12-6. 
  2. ^ Lowell Lindstrom; Carmen Zannier; Erdogmus, Hakan (2004). "Extreme Programming and Agile Methods". XP/Agile Universe 2004: 4th Conference on Extreme Programming and Agile Methods, Calgary, Canada, August 15–18 (Lecture Notes in Computer Science). Berlin: Springer. p. 121. ISBN 3-540-22839-X. 
  3. ^ Ron Jeffries. "Practices". X Programming. http://www.xprogramming.com/Practices/PracNotNeed.html. Retrieved 2007-11-07. 
Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages