Software Architecture Principles by Bruce Lee – 5

Don’t indulge in any unnecessary, sophisticated moves. You’ll get clobbered if you do– Bruce Lee

This lesson from Bruce Lee reiterates the concept that everything should be as simple as possible to get the job done (remembering that our job may take a little longer than a sparring match – but then again may not).  I’ve been clobbered by my own (or other people’s) use of unnecessary over engineering/sophistication.  I recall working on some code that clearly was written by someone who had learned LINQ / lambda expressions and sure enough they did things like the following:

private void ExecuteSomething()

{

ExecuteSomething(x => {/*NOP*/}, false);

}

 

internal void ExecuteSomething(Action<SomeDTO> actionToPerform, bool update)

{

}

 

This was not only wasteful but also difficult for other developers (and me) to follow.  This was only complicated by the fact that this took place in a web application and caused a lot of thread jumping.  Don’t get me wrong, I love lambdas, but there is a time and place for everything.  This code was reaching and ultimately was off balance.  Unfortunately, by the time I saw it the original author was gone and I was the one who was clobbered.

About these ads

About danrosanova
I am a Senior Software Architect with the Systems Integration practice at West Monroe Partners and author of the book Microsoft BizTalk Server 2010 Patterns.

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

Follow

Get every new post delivered to your Inbox.

Join 282 other followers

%d bloggers like this: