Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

YAGNI and DRY

Two acronyms that have been seeing a lot of action at work recently are YAGNI and DRY. They’re great principles to go by in any case, but in a pair programming environment they take on a whole new level of utility.

You Ain’t Gonna Need It states that you should always implement things when you actually need them, never when you just foresee that you need them. This is great for controlling feature creep; the moment one of us says “we might need that later” the other says “YAGNI” and we can move right along.

Don’t Repeat Yourself is one of the tips from The Pragmatic Programmer, a book which is every bit as good as people say it is. It states that Every piece of knowledge must have a single, unambiguous, authoritative representation within a system—whenever we spot something that is duplicated and can be considered a “piece of knowledge” we frequently refactor it straight away.

One of the most interesting things about pair programming is that introduces a complete reliance on communication in to something that it generally a solitary activity. Guidelines like the two listed above extend the vocabulary that can be used in such communication, speeding up development and making tough decisions easier to quickly resolve.

This is YAGNI and DRY by Simon Willison, posted on 9th December 2003.

View blog reactions

Next: Nasty new IE vulnerability

Previous: Hacked for Spam

5 comments

  1. I've also seen YAGNI expanded on python-dev as the (faintly withering) phrase "Yet Another Great New Infrastructure?".

    James Kew - 9th December 2003 08:50 - #

  2. Only tenuously related, but there was a question on University Challenge last night along the lines of "In Internet terms, used as a disclaimer before a comment, what does 'IANAL' stand for?". The guess was "I am not a loser".

    Phil Wilson - 9th December 2003 09:44 - #

  3. Close:

    IANAL
    I Am Not A Lawyer

    I think in Net terms a "loser" has something to do with the initials AOL :-)

    Michael - 9th December 2003 14:36 - #

  4. Phil: In other words, IANAL == "This is my amateur legal advice. If it backfires, don't have me fined for practicing without a license."

    Joe Grossberg - 9th December 2003 19:58 - #

  5. I can't wait to be sitting across the room from you guys when you start speaking in acronyms.

    Wilson - 10th December 2003 22:37 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/12/09/yagniAndDry

A django site