You ain't gonna need it

From CSSEMediaWiki
Revision as of 05:41, 14 October 2009 by JaninaVoigt (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You ain't gonna need it, or short YAGNI, suggests to programmers that they should not add functionality until it's necessary.

Ron Jeffries, one of the 3 founders of Extreme Programming Software Development Methodology, states: "Always implement things when you actually need them, never when you just foresee that you need them." According to him you often will hear yourself saying: "We are going to need..." Just resist that impulse and stick to the essential functionality.

The benefits

  • Chasing fewer bugs. Nothing is more of a pain than chasing bugs through code that isn't even executing - lots of dead ends!
  • It keeps the cognitive load down when looking at strange code. It self-documents because, by it's very existence, it honestly declares what the software actually does
  • Dead code is not part of the integration-testing loop, so in a test-driven process, it's not valid code. It also tends to fall behind requirements.


"The best way to implement code quickly is to implement less of it. The best way to have fewer bugs is to implement less code."[xp]

Conflicts

Personal tools