In general, pair programming helps us write high quality code in an effective manner, but still there are times that a pair of programmers go off on a tangent, working on something that ultimately winds up being unnecessary. At this point, hopefully there's a coach around to ask the YAGNI question:
"what are the chances that You Aren't Gonna Need It ?"Agile stresses simplicity - developing what's needed now, and leaving tomorrow's features till the customer actually asks for them - within reason, obviously. Why? Now that customers have freedom to rearrange their priorities every week or so, it's amazing how many new "urgent" features appear, and others just drop off the bottom of the list. It's a relief, actually - teams know their time is being well used, that they are creating the most valuable customer features.
What if we built everything, both for today's features and to accommodate tomorrow's features, and then all of tomorrow's features became obsolete due to a competitor's new product? Some Agilists call this "inventory": code the end-user doesn't benefit from yet, but which must be maintained anyway, contributing to the bloat and unmaintainability of the app. And keep in mind, tests must be built for this extra code, time must be spent testing, and the tests must be maintained... hmmm, perhaps waiting till tomorrow isn't such a bad idea.
But we can't always catch ourselves, and the coach can't be everywhere at once. Fortunately, Darren Smith has created Yagni, the Development Assistant, designed to address just this gap. Yagni works within the IDE to monitor a developer’s work and provide warnings and advice about bad practices and code smells, just like Microsoft's Clippy.
Perhaps in the future we'll see a TAGRI Documentation Assistant added to Word that will help us to stop writing so much useless documentation. ;-)
Community comments
I only wish
by Dan Bunea,
Re: I only wish
by Alex Popescu,
Re: I only wish
by Deborah (Hartmann) Preuss,
Re: I only wish
by Dan Bunea,
avoiding bad clients
by Deborah (Hartmann) Preuss,
I only wish
by Dan Bunea,
Your message is awaiting moderation. Thank you for participating in the discussion.
I would desperately need the two tools. For about 2 months we joined a much larger company in implementing a ASP.NET system, that wil be used in schools in a EU country.
First, the YAGNI, could be usefull as they think that n-tier, means that you use stored procedures to load data into datasets, in the business layer you transfer the data into business object trees. The amount of rendundance in classes is enormous :(
Then for this project, which has if it were written with NHibernate or an ORM about 15 domain objects, more then 200 word documents, each from 50 to 400 pages. This is a project on which they've been working for a year.
I tried desperately to show them that the only value in software is running tested features, only then other things like documentation, which should be barely sufficient, but it seems that in this project there are more non programmers then programmers.
A thing against me is that they have "magic" sellers, that do sell large amount of documentation and the time to write them, to the client, and charge them heavily for it. And they only have F500 clients ...
Re: I only wish
by Alex Popescu,
Your message is awaiting moderation. Thank you for participating in the discussion.
Unfortunately, I really don't think YAGNI would bring something to such a project/developers. Just a few clicks to disable it :-). But a good technical leader would probably be a lot more usefull.
But is this maximizing the stackholders profit? Because if they are "magic" sellers than I guess they will be able to sell better documentation that is not taking a lot of time to be written. I am not sure if this project will require updates in the future, but if it will, than you will be facing a possible problem: updating the documentation and providing it to the clients for smaller amounts of money, because it is only an update.
Re: I only wish
by Deborah (Hartmann) Preuss,
Your message is awaiting moderation. Thank you for participating in the discussion.
I'm working on this problem - documentation refactoring. Stay tuned :-) --deb
Re: I only wish
by Dan Bunea,
Your message is awaiting moderation. Thank you for participating in the discussion.
About YAGNI, the architecture was done of course first, BDUF, and was outdated in 2 weeks :) And a big chunk of code was written "to enable future changes" and was thrown away anyway.
Yes, they could sell better documentation, however the problem is that since they sell, and there's profit, they don't see anything wrong with their process and feel quite offended if you come and try to tell them that there's a better way, even if you come with facts and figures as I did.
Anyway, we'll avoid this client in the future. I do want to enjoy my work, and there are always others that can give us that :)
avoiding bad clients
by Deborah (Hartmann) Preuss,
Your message is awaiting moderation. Thank you for participating in the discussion.
Now, this is something we don't hear enough.
Life is too short to waste it on clients who mess with the team and don't care to change this behaviour. I know that Industrial XP and other groups do a client assessment clients, to see if their culture even makes it worth going in to do agile work.
We should all have lists (at very least, in our heads) of what kind of clients we do / don't want to work with.