Confusion at work

Warning: This is highly technical, and highly geeky. If you read WTF Daily for fun, then you might enjoy the following.

I received a new assignment today. In light of the fact that I was going to be more or less at loose ends for a day or three, I was assigned to help the quality assurance automation system.

The testers on my team are understaffed by about 3.5 people. So, they managed to recruit myself and one of the management types to do some converting work. You see, there’s an entire test framework that was written for a product that just shipped (call it Redwood). That test framework was originally written for the product I’m now working on (call it BigFish).

For the last five months or so, BigFish was more or less ignored, while all time and effort was heaped on Redwood. Now that Redwood product is shipped, they want to move all the work they did on the test framework back over to BigFish.

Unfortunately, the framework for BigFish was in use by other teams while Redwood was under development, so there’s been some divergent changes. Which is why I’m here.

I’m going to share a snippit of code with you, so you understand my frustration.

[csharp]

interface IHasControls

{

     IControls Controls;

} ;

class SomeClass : IHasControls

{

     public IHasControls Controls

    {

        get { return this; }

     }

}

class Consumer

{

      SomeClass class;

       void Foo()

       {

       class.Controls.Controls.DoSomething();

       }

}

[/csharp]

 

Does anyone else see my frustration here??

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  1. Oh man, that’s fantastic code. Why have one layer when you can have TWO?

  2. Andrew says:

    It gets worse!

    I have since discovered that this was not, in fact, a nonsensical, one-time mistake.

    This is a Pattern.

    Now, I’m all for interface-based design when appropriate. I love COM. Don Box is a my hero.

    When you place the interface is the SAME SOURCE FILE that compiles into the SAME ASSEMBLY in such a way that any dependent assembly has to be recompiled WHENEVER THE SOURCE CHANGES EITHER WAY — what, precisely, am I gaining? I still need a reference to the class in order to get access to the interface that’s implemented by the class… My brain’s hurting.

  3. Gabe says:

    Hey, at least the framework is “lightweight”.