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.

This entry was posted in Generalities. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

8 Responses to How to make a complete fool out of yourself

  1. 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……

  2. 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 where T : IFoo
    {
    IFoo foo = T.Create();
    }

  3. rlewallen says:

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

  4. rlewallen says:

    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 :)

  5. ewise says:

    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.

  6. Karthik says:

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

  7. Damien Guard says:

    I once found myself wondering why I couldn’t specify static members on an interface…

    [)amien

  8. jmiller says:

    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.

Leave a Reply