YAGNI

Gojko Adzic points to this photo taken at QCon San Francisco 2008 by John Grae. It’s a slide featuring YAGNI, the Development Assistant, the programmer’s answer to “Clippit”, a.k.a. “Clippy”:

yagni_development_assistant_qcon_slide
Photo by John Grae.
Click the photo to see its Flickr page.

YAGNI, short for “You Aren’t Gonna Need It” is a development maxim that suggests to programmers that they shouldn’t add features or functionality to applications that aren’t necessary at the moment, but might be in the future. YAGNI has the DRY (“Don’t Repeat Yourself”) Principle has a cousin and among its ancestors are Occam’s Razor and the KISS Principle (as in “Keep It Simple, Stupid” and not “I Wanna Rock and Roll All Night (and Party Every Day”).

YAGNI, the Development Assistant comes from Bunk and Rambling, a blog by Darren Smith, where he put it forth as an IDE feature request back in May 2006, when he wrote:

While pair programming helps you to write high quality code in an efficient manner there are times that a pair of programmers will end up going off on a tangent and working on something that ultimately ends up not being necessary. To counter the unbridled enthusiasm that usually causes this to occur I give you Yagni, the Development Assistant.

YAGNI is meant for developers who believe strongly in test-driven development, so here’s how it would hypothetically pop up if you tried to create a class and started entering non-test methods first:

YAGNI, the Development Assistant: "It appears that you are creating a class without a unit test. Would you like to * discard code? * create unit test?"

I’ll leave it to other people to argue over whether or not you always have to have unit tests. 

Here’s another notice from YAGNI:

YAGNI, the Development Assistant: "This development spike appears to be going too long. Would you like to * discard code? * go longer?"

And finally, what I feel is YAGNI’s most important message – a warning that you’re in danger of embarking on a long, “let’s reinvent the wheel” project:

YAGNI, the Development Assistant: "It look like you're trying to write a framework. Would you like to: * discard code? * find an open source framework instead? * find a new job?"

Since YAGNI’s not likely to appear in any IDE soon, you, your pair programming partner or whoever does code reviews with you will have to play its role for the foreseeable future.

{ 1 comment }

Salmagundi for Tuesday, October 21, 2008

by Joey deVilla on October 21, 2008

Like Being on a Deserted Island

The Lord of the Flies from "The Lord of the Flies"

Evan “First Blogger, then Odeo, now Twitter” Williams says “Starting a company is like landing on the shore of a deserted island”. The first question that came to mind was “Is that a regular deserted island or a special Lost-style deserted island?”

The simile is apt. Earlier this year, I was in a start-up that was pretty much like Gilligan’s Island or the one in Lord of the Flies.

Geeks vs. Suits

The techie view of a company vs. the business view

In the blog pl patterns, Jonathan Tran writes about Techies vs. The Business, in which he compares the ways techies and suits look at the same business:

For technical people, they know computers. They know software. Given the right resources, they can make a computer do anything — anywhere, anytime. Their deep-rooted belief is that passive income can be achieved by writing software once (a fixed cost) and distributing it to millions who each pay a fee (variable income).

For business people, they know cashflow. They know the symbiotic relationship between employees and business owners. And in this day and age, there will always be people looking for jobs. Given the right resources, they can employ people to do anything — anywhere, anytime. Their deep-rooted belief is that passive income can be achieved by creating a repeatable business process once (a fixed cost) and teaching it to thousands who each execute the process (bringing in variable income).

What technical-minded and business-minded people are doing is essentially the same. What differs is their belief in what scales.

Future Creep

Zapp brannigan from "Futurama"

Over at 37signals’ blog, Jamis Buck says Beware of Future Creep, warning us about the dangers of adding infrastructure to your products in preparation for features that may or may not be added later. It’s a variation on the YAGNI (You Ain’t Gonna Need It) principle.

{ 0 comments }