Saying YAGNI to YAGNI?

I was reading a very interesting post this morning: http://codebetter.com/blogs/james.kovacs/archive/2008/03/13/using-yagni-responsibly.aspx

and I want to start by saying that I whole-heartedly agree with James at the heart of the matter. YAGNI, when intelligently applied, is not just an excuse to do stupid simplistic things. But that got me thinking (again) that YAGNI itself is probably an inadequte piece-of-jargon-turned-tool that encourages some people to use it "unintelligently". My motto is that if something isn't providing consistently good results, then there's probably something wrong with it, so here's the gist of my thoughts:

I think the problem with YAGNI is that as a concept, it works more like a binary switch. It encourages people to think in Yes or No options and concentrate on a single vector of a multi-dimentional problem. By "intelligently" applying YAGNI, the focus should really be on providing the most effective and efficient (i.e. simplist) solution that can solve the problem given all the goals that must be met. This is not a "yes I need it", or "no I don't" question - it's a question that begs us to consider a range of alternatives and evaluate them based on (not just complexity) but R.O.I, maintainability, and likelyhood of change and stability, among other factors. At this point, some agilists might argue that we're trying to do too much design upfront by taking all this into account, but most of these factors can be very quickly assessed in a matter of minutes on a "good enough" basis, which is really in keeping with the spirit of Agile, IMO. YAGNI is just a simple(istic) way of terming it, but perhaps it's too simplistic and encourages us to evaluate only one vector (complexity) of the problem that really has other dimensions that need attention. I honestly think it hurts the process to give jargon undo weight. A person who uses YAGNI intelligently is actually taking those other factors into account, so perhaps YAGNI as a concept is just putting too much focus in one area for those who are more prone to simply use the jargon at face value as opposed to "intelligently" applying a tool, which is starting to make me wonder if it's actually a good tool to begin with.

posted @ Thursday, March 13, 2008 1:53 PM

Print

Comments on this entry:

# re: Saying YAGNI to YAGNI?

Left by Eduardo Miranda at 3/17/2008 1:46 PM
Gravatar

I agree 100% with you. I dislike YAGNI for the same reasons.

I wrote a post while ago (unfortunattely, it's in Portuguese) talking about this. If you use YAGNI to extreme, you end up with a ASP spagethi code, because that is all you "need" to implement the features in the first place.

eduardomiranda.net/.../yagni.aspx

# re: Saying YAGNI to YAGNI?

Left by robtx at 3/17/2008 2:36 PM
Gravatar

Eduardo, I know what you mean, but I would be tempered in criticizing YAGNI completely. I think the term pushes people to quickly dismiss valid solutions because (when misused) it leads people to look at complexity to the exclusion of any other factor. Perhaps a better way to look at YAGNI is to use it like a "smell", similar to code smells. Just because a piece of code has a warning smell, doesn't mean it's invalid, but it's a good indicator to that it needs to be looked at. But since YAGNI is often used at face value with no real examination rather than a "smell", I am beginning to question whether a simple YAGNI (as a formalized tool) is a good thing, or because it can be misleading and too often misused, would a different formalized tool be in order?

By the way, I can read Portuguese, and you have an excellent blog! :-)

# re: Saying YAGNI to YAGNI?

Left by Eduardo Miranda at 3/24/2008 5:00 PM
Gravatar

Hey, that's is unsual, a Portuguese reader!

Your comment:



 (will not be displayed)


 
 
 
Please add 5 and 7 and type the answer here:
 

Live Comment Preview: