Wednesday, May 27, 2009

A short introduction to SOLID and DRY for the heads down dev

CodeProject - SOLID and DRY

“No, this isn't a commercial for deodorant.

It's funny how many developers become so entrenched in their company and projects that they seldom venture outside to see what is going in the bigger world of Information Technology. I see this often in my interviews: a senior developer has worked a company for several years, quickly rose to the top and is the "go to" guy and now is ready to be an "architect." The only problem is that they only know how to work on their VisualBasic 6.0 system and think the best architecture is pulling everything as ADO XML and using stylesheet transformations to drive the application (I say this tongue-in-cheek because this is a framework I worked with and implemented in my past).

My point is that sometimes we get stuck in what works for our system and it works well, but it's not always the right or best solution and we need to constantly challenge ourselves as software engineers (or whatever we call ourselves today) to stay on top of what's out there.

I decided to post this article in my C#er : IMage blog because I feel SOLID and DRY are very sound principles for software development and yet I constantly see people tripping over these concepts.

Let's tackle DRY first:

Don't Repeat Yourself

SOLID is an acronym for:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion

…”

Like Jeremy mentions it’s very easy for us to get stuck in a rut. When our paycheck depends on us being heads down dev’s, working to solve the latest emergency, implementing “must have now” feature requests and juggling people issues, we sometimes find it hard to break out and look at the forest instead of the trees. And we’ve all been burned a little by the hype rush. How many methodologies, practices, procedures, etc, etc have we seen come and go? We have stuff we need to do today, to solve “this” issue, to make this customer happy, to pay the bills and keep our jobs…

So do we give up? Just keep our heads down and code?

Only if you want that rut to become your professional grave.

Our industry is so young and moving so fast, you HAVE to keep your mind open. We are all growing with it, learning and pretty much making it up as we go. We’re all running this race, but remember it’s a marathon and not a dash. We’re all in the same boat. Well we can be in the same boat, unless you give up, jump out and just look to tread water. That might make sense now, this year and next… but 10 years from now? 20?

I’m not saying you don’t have to jump on every bandwagon. No one has time for that. I’m just saying look at them with an open mind and see if there’s anything that can help. I’d bet there’s a thing here, a technique there that can help you in your “today” world. You’ll find it amazing how adding a little here and there can build up over time. You just have to look with a mind that’s open to change…

As for being burned by past hype’s? Remember failure isn’t bad, it’s how we grow. In many cases, we learn more by failure than success. Stand up, brush yourself off and then try something different.

 

Wow… That touched a nerve didn’t it? Think I was preaching at you? Heck in reading it over, this was more for me than you! LOL Now I have to print this out and read to to myself while looking in a mirror.  :p

In any case I’ve been watching the SOLID space for a bit now and like what I see. I like the acronym and the concepts. Now to see what I can grab for my today world… ;)

Plus an article with an opening line like that deserved a second look… LOL

No comments: