You heard it here first

October 23, 2008 at 8:43 pm 1 comment

If you are into programming you may have come across the acronym YAGNI, which is used when you are doing stuff more out of geekiness than to provide a real added benefit. For instance your boss tells you to provide a driver to read data from .wav files and you set up a generic framework that allows you to hook-in all kinds of implementations : .mp3, .ogg, … . You think this is awesome, but after a couple of years the only driver the clients still really need is the .wav file driver, which you already have of course. So the framework turned out to be YAGNI.

However, there is an opposite of YAGNI, namely WANIFALT.

Suppose you would have written the .wav driver as a straightforward piece of code, not having the capability to easily integrate other formats. Then after a while, you’re told to provide support for .ogg files. And off you go, writing a completely separate non-orthogonal driver to support .ogg. And then you need to do the same for .mp3. As formats are added, the codebase’s complexity explodes. Finally, another developer, who can no longer bear to witness this, refactors the drivers into a generic framework, with different subclasses for different formats. Now that’s WANIFALT : We Already Needed It For A Long Time.

Of course, Murphy’s Law applied to these concepts makes sure that if you apply YAGNI, you will need to resort to WANIFALT eventually. And if you are thinking WANIFALT, it actually turns out to be YAGNI.

Advertisements

Entry filed under: Command Line.

Daily DRY tip Bright red links do not invite clicks

1 Comment Add your own

  • 1. Peter  |  November 24, 2008 at 1:26 pm

    Good old you speaking 😉
    Shouldn’t we go for lunch again one of these weeks?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Categories


%d bloggers like this: