• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

YAGNI

 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wondering what the heck Barry's latest "XP-Speak" meant, I found the following at http://xp.c2.com/YouArentGonnaNeedIt.html and posted it here because I like the scenario underneath, not to mention the very last bit of advice.

YouArentGonnaNeedIt (often abbreviated YAGNI) is an ExtremeProgramming practice which states:
"Always implement things when you actually need them, never when you just foresee that you need them."
--------------------------------------------------------------------------------
A scenario from RonJeffries explains the practice:
You're working on some class. You have just added some functionality that you need. You realize that you are going to need some other bit of functionality. If you don't need it now, don't add it now. Why not?

"OK, Sam, why do you want to add it now?"
"Well, Ron, it will save time later."
Unless your universe is very different from mine, you can't save time. You can only do less. So you are saying:
"We will be able to do less later (at the cost of doing more now)."
Unless your project is very different from mine, you already have too much to do right now. Doing more now is a very bad thing when you already have too much to do.
Unless your mind is very different from mine, you have a non-zero chance of not needing it after all, or of having to fix it before you even need it, when you refactor the class for some other reason. If either of these happens, you have completely wasted your time, in addition to giving yourself more to do right now, when you least needed more to do.

"But Ron, if I do it now I'll know how to do it, and later I might not."
"So, Sam, you're telling me that this class you're writing is so complex that even you won't be able to maintain it?"
Keep it simple. If you need it, you can put it in later. If you don't need it, you won't have to do the work at all. Take that day off.
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All the credit goes to Mike Matola for the clout with the RolledUpNewspaper

From the last nitpick I could add DTTCYAGNI (Don't Tell The Customer YAGNI) and RTFAR (Read The Fine Assignment Requirements ) !!
[ January 21, 2003: Message edited by: Barry Gaunt ]
reply
    Bookmark Topic Watch Topic
  • New Topic