You Ain't Gonna Need It
"You ain't gonna need it" or “You aren't gonna need it” (acronym: YAGNI) is a principle of extreme programming (XP) that states a programmer should not add functionality until it is deemed necessary. Ron Jeffries writes, "Always implement things when you actually need them, never when you just foresee that you need them."
YAGNI is a principle behind the XP practice of "doing the simplest thing that could possibly work". It is meant to be used in combination with several other practices, such as continuous refactoring, continuous automated unit testing and continuous integration. Used without continuous refactoring it would lead to messy code and massive rework. Continuous refactoring in turn relies on automated unit tests as a safety net and continuous integration to prevent integration problems.
YAGNI is not universally accepted as a valid principle, even in combination with the supporting practices. The need for combining it with the supporting practices, rather than using it standalone, is part of the original definition of XP. It was never claimed that standalone YAGNI was a good idea.
Read more about You Ain't Gonna Need It: Rationale
Famous quotes containing the word gonna:
“Youre gonna take the rap and play along. Youre gonna make every exact move I tell you. If you dont, Ill kill you. And Ill promise you one thing, it wont be quick. Ill break you first. You wont be able to answer a telephone or open a door without thinking This is it. And when it comes, it still wont be quick. And it wont be pretty.”
—Geoffrey Homes (19021977)