I've got a hammer - Give me some nails

by Erik Lane 5. September 2006 15:34

If you're a developer you've heard something along these lines:  When people get a new hammer they start to see everything as a nail.  Basically we try to apply our new found knowledge even when its not really needed or appropriate.  I've done it and I'm sure you've done it too.  Hrm..that new design pattern I read about can be used here I'm sure.  I don't know how yet; but I know it will work!

Funny stuff.  David Hayden has a good blog post on Over-Architecting that touches on some similar points.  I like how he references YagNi because whenever I see that I always chuckle.  It's true most of the time and yet it's still funny.  He has a lot of good points but this one I liked the best:

“Only if absolutely necessary and based on in-your-face requirements do you add classes and behaviors to loosely couple your layers and partitions. Do you really need a factory, service locator, registry, etc. that returns an interface or can you couple directly to the class? Is there a requirement sitting in front of you now that justifies it? How long would it take you in ReSharper to extract the Interface, find usages, and replace the class with an interface if the need actually arises in the future? What is the chance of that need actually arising?“

I need to continue to practice this along with TDD so I'm only building what needs to be built according to the requirements.  Period.

Giddy Up!

Tags:
Comments are closed