YAGNI

from Wikipedia, the free encyclopedia

YAGNI is an acronym and stands for You Aren't Gonna Need It , in German: "You won't need it". It describes a principle of Extreme Programming (XP), which states that functionality should only be implemented in a program when it is clear that this functionality is actually needed.

background

Contrary to this approach, attempts are often made in practice to prepare programs for possible future change requests using additional or more general ( generic ) code . The underlying consideration is that changes are more time-consuming to implement later than to anticipate them now.

It often turns out later that this additional effort was unnecessary because the originally expected requirement never actually came about in the intended form. Instead, requirements often arise that were not foreseen during the original development and whose implementation is not supported and often even hindered by the code, which should actually facilitate changes.

YAGNI thus primarily leads to leaner, simpler code and thus enables later requirements to be implemented cost-effectively. Other considerations behind YAGNI are:

  • Targeted use of working time to implement the currently required functionality means that it is implemented more quickly and often better. This increases the satisfaction of the requester more than the implementation of functions that have not yet been requested.
  • The implementation of not yet requested functionalities can lead to the fact that further unsolicited functionalities appear to be useful to the implementers and are also implemented. This usually leads to undesired or incorrect functionalities being implemented.
  • The implementation of functionalities not yet required favors the anti-pattern feature creep and bloatware .
  • Functionalities that are not yet required are implemented based on requirements that have not been analyzed or have not been analyzed well. The implementation of these functionalities is therefore not or at least less easily testable, therefore contains more errors and corresponds less to the actual requirements than the implementation of currently desired functionalities.
  • Functionalities that are not yet required must be debugged, documented and supported. This in turn ties up resources that are missing for the development of the required functionalities.

YAGNI is one of the principles behind the XP technology of "Implement the simplest possible solution that works" ("do the simplest thing that could possibly work" [DTSTTCPW]). The use of the YAGNI principle is intended to be combined with other XP principles such as ongoing refactoring , automated module tests and continuous integration .

See also

literature

  • Ronald E. Jeffries, Ann Anderson, Chet Hendrickson: Extreme Programming Installed (=  The XP Series ). Addison-Wesley Longman, Amsterdam 2000, ISBN 978-0-201-70842-4 , pp. 190 (English, google.com [accessed on August 15, 2013] 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.).
  • Giancarlo Succi, Michele Marchesi: Extreme Programming Examined (=  The XP Series ). Addison-Wesley Longman, Amsterdam 2001, ISBN 978-0-201-71040-3 , pp. 208 (English, google.com [accessed on 15 August 2013] "XP says 'do the simplest thing that could possibly work' because 'you aren't gonna need it'.").

Web links

Individual evidence

  1. Ronald E. Jeffries, Ann Anderson, Chet Hendrickson: Extreme Programming Installed (=  The XP Series ). Addison-Wesley Longman, Amsterdam 2000, ISBN 978-0-201-70842-4 , pp. 190 (English, google.com [accessed on August 15, 2013] 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.).
  2. ^ A b Giancarlo Succi, Michele Marchesi: Extreme Programming Examined (=  The XP Series ). Addison-Wesley Longman, Amsterdam 2001, ISBN 978-0-201-71040-3 , pp. 208 (English, google.com [accessed August 15, 2013] "XP says 'do the simplest thing that could possibly work' because 'you aren't gonna need it'.").
  3. ^ Stephen R. Schach: Object-oriented & classical software engineering . 8th edition. Mcgraw-Hill Higher Education, 2010, ISBN 978-0-07-337618-9 , pp. 58 (English, google.at [accessed on August 15, 2013] “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).”).