CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Raymond Lewallen

Framework Design, Agile Coach, President Oklahoma City Developers Group, Microsoft MVP C#, TDD, Continuous Integration, Patterns and Practices, Domain Driven Design, Speaker, VB.Net, C# and Sql Server

How to make a complete fool out of yourself

Its easy.  Just do what I did.  First, turn off your brain.  Then tell somebody that adapters and dependency injection work in similiar fasions.  Have that somebody tell 10 of their friends, and then each of those 10 people tell 10 more people and so on.  But don't stop there.  Then tell that person that facades and templates behave the same.  Repeat the whole tell your friend have them tell their friend thing.

Ok, so now that you look like a complete and utter idiot, turn your brain back on.  Go back and read the conversation, think about who was talking here, realize it was you, go puke in the toilet and then bury your head in the sand in embarassment.

I've never had an episode of complete brain malfunction like that before in my life.  You ever just have something snap in your head, like something turned back on and say to yourself "What?  Huh?  Wait a minute, what did I just say?"

Just for clarification, adapters and DI do not behave the same.  At all.  Adapters "adapt" from interface A to interface B.  DI is a custom implementation plug-in like behavior pattern.

Also, subconsciously, I meant to say that adapters and facades behave in similiar but obviously seperate fasions.  Facades provide unified interfaces (this is where template crossed my mind because you often used facades to unify multiple template interfaces, at least I do) and adapters, again, adapt interfaces from one to another.  Why random misfirings occurred in my brain and those 3 simple, one line explanations came out all wrong, I may never know.

Please tell me that I'm not the only one to have done something this stupid and embarassing.  Please.  Share your quick stories here so I won't feel alone.



Comments

Jeremy D. Miller said:

Raymond,

If that's as bad as it gets, I don't think you've got too much to worry about.  The one's that bug me are when you give another developer some advice that ends up leading them down a cul de sac.

# February 19, 2007 10:16 AM

Damien Guard said:

I once found myself wondering why I couldn't specify static members on an interface...

[)amien

# February 19, 2007 10:18 AM

Karthik said:

I once suggested instantiating a new XmlSerializer on almost all of our data driven transactions using XML.  

# February 19, 2007 10:28 AM

Eric Wise said:

The best one for me is spending 3 hours troubleshooting why something wasn't working in production when I hadn't pushed the latest build.

# February 19, 2007 10:31 AM

Raymond Lewallen said:

Jeremy,

Fortunately, that is as bad as it has ever been for me.  Everybody has their moments, and this one was my worst.  I couldn't believe what I had just said after I finally realized it.  But you are right, leading developers down "cul de sacs" is a worse scenario.  I just feel awful about that conversation though, but getting it out and admitting to it makes me feel better :)

# February 19, 2007 10:44 AM

Raymond Lewallen said:

Damien, LOL I think I've actually done that myself!

# February 19, 2007 10:46 AM

Ayende Rahien said:

Damien,

That is not a stupid question, it is a valid one.

C++ is getting this, it is called constraints.

I would dearly love to be able to have static members on an interaface, because you can then do this:

public interface IFoo

{

 static IFoo Create();

}

public class Bar<T> where T  : IFoo

{

  IFoo foo = T.Create();

}

# February 19, 2007 2:21 PM

Raymond Lewallen [MVP] said:

An extension of this , how many of you would have spent more than 5 seconds debugging why this won't

# February 19, 2007 3:13 PM

Arjan Zuidhof said:

I just spent a couple hours debugging a very weird and unexpected error. Turned out the problem was in a source file where a specific string is replaced with working code at runtime. I put a comment somewhere containing that exact string (duh). Because this source is retrieved from an external repository and dynamically compiled into an assembly after parsing, it took some deep spelunking to find this......

# February 20, 2007 3:20 PM

TrackBack said:

http://ayende.com/blog/archive/2007/02/19/how-to-make-a-complete-fool-of-yourself.aspx
# March 19, 2007 3:09 PM

TrackBack said:

http://weblogs.asp.net/bsimser/archive/2007/02/19/asp-net-2-0-1-bil-0.aspx
# March 19, 2007 3:09 PM

TrackBack said:

http://jasonmeridth.com/blog/
# March 19, 2007 3:13 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Raymond Lewallen

Working primarily in the public sector during his career, Raymond has designed and built several high profile enterprise level applications for all levels of the government. Raymond now works as a solutions architect for EMC. Raymond is an agile coach, Microsoft MVP C# and also president of the Oklahoma City Developers Group and Oklahoma Agile Developers Group. Raymond spends a lot of his time learning and teaching such things as Test Driven Development, Domain Driven Design, Design Patterns and Extreme Programming practices and principles, to name a few. Raymond is also an advocate of Alt.Net. Raymond is primarily a framework guy, so don't ask him anything about UI :) Check out Devlicio.us!