# YAGNI - "You Aren't Gonna Need It"

**URL:** https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042
**Category:** programming
**Created:** [March 23, 2015, 4:06pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042 "2015-03-23T16:06:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [March 23, 2015, 4:06pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042/1 "2015-03-23T16:06:48Z")

</div>

**YAGNI**

> **[You aren't gonna need it](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it)**
>
> "You aren't gonna need it" (acronym: YAGNI) is a principle of extreme programming (XP) that states a programmer should not add functionality until deemed necessary. XP co-founder Ron Jeffries has written: "Always implement things when you actually need them, never when you just foresee that you need them." Other forms of the phrase include "You aren't going to need it" and "You ain't gonna need it". YAGNI is a principle behind the XP practice of "do the simplest thing that could possibly work" (D...

This is a concept I’m familiar with and only recently have been starting to consider more with the code I’ve been writing. However, it was only today that I realized that there was this acronym (YAGNI) associated with it… you know, TIL and all that.

I’ve been much more conscious of code complexity lately, and this approach goes well with keeping it simple (KISS). The less code you have, and the more focused it is, the easier it is to deal with in your project, both in editing/maintaining and debugging.

So, something to think about if you’re not doing it already. Extra features are nice, but if they’re not needed, do you need to add them? Maybe you will later, but its better to do it then since the requirements for your project may have changed by then as well.

---

<div class="post-metadata">

### Author: ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)
#### Post date: [March 23, 2015, 8:12pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042/2 "2015-03-23T20:12:20Z")

</div>

Concepts and quotes that invoke them - like YAGNI - can be appealed to so one can examine the temperament of their thinking.

Action speak louder than words.  
The pen is mightier than the sword.

* * *

It’s tricky communicating with people who seem to have been recently appealing to an opposite concept.

---

<div class="post-metadata">

### Author: ![prg9](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@prg9](https://forum.kirupa.com/u/prg9)
#### Post date: [March 24, 2015, 5:26pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042/3 "2015-03-24T17:26:42Z")

</div>

I find the exact opposite a lot more entertaining, of course not as practical, ideal or encouraged however. 😜

How To Write Unmaintainable Code  
[https://www.thc.org/root/phun/unmaintain.html](https://www.thc.org/root/phun/unmaintain.html)

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [March 24, 2015, 6:23pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042/4 "2015-03-24T18:23:06Z")

</div>

> [@prg9](#):
>
> How To Write Unmaintainable Codehttps://www.thc.org/root/phun/unmaintain.html

I’ve read something like this before - not the same one, but something very similar. Its fun to see how much you recognize seeing in practice (not that I’m pointing any fingers, Flash Player codebase…)

edit: I like this one:

```auto
for(j=0; j<array_len; j+ =8)
{ 
total += array[j+0]; 
total += array[j+1]; 
total += array[j+2]; /* Main body of 
total += array[j+3]; * loop is unrolled 
total += array[j+4]; * for greater speed. 
total += array[j+5]; */ 
total += array[j+6]; 
total += array[j+7]; 
}

```

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [March 25, 2015, 7:21pm UTC](https://forum.kirupa.com/t/yagni-you-arent-gonna-need-it/588042/5 "2015-03-25T19:21:47Z")

</div>

This would have been good advice for me. I often found myself planning and coding for every eventuality rather than actually writing the program I had originally intended.
