CarrotBoy



  • At my previous consulting position I was asked to look into why another contractor's (We'll Call Him CarrotBoy) program was giving sporadic errors.

     First some history...

     While the general code for that job was a mess, this area of our code was pretty decent. We had 3-4 Base classes each inheriting and branching out to give a strong and flexible framework that would eventually bring unity to all of the new code that was being rewritten.

     The consultant who had designed and built most of the framework had recently left. His last two weeks however had been given completely devoted to CarrotBoy to get him up to speed to learn the framework. CarrotBoy seemed to only need 30 minutes of that two weeks though (he must be really good thought some of the employees...)

    Fast forward one and half months later...

     CarrotBoy was removed from most of the work as the release deadline loomed and I was volunteered to pick it up and figure it out. Somehow through shear luck and a lot of extra hours, I was able to finish the parts of the incomplete framework and get something running.

     However the crucial piece, CarrotBoy's filewatcher, was still not working correctly after 2 months of development. So I begin to look into the code.

     Chunks (read as 50+ lines at a time) were just commented out code because he did not understand how to implement parts of the framework. When I asked him why this was so... he quickly explained that those parts were not needed, and the code worked fine without it. He figured he had optimized it. (All that I could picture are those people who take apart stuff, put it back together and always have extra parts left over... must not need them huh?)

     Several hours into my code analysis I found this gem:

    Public Override Void ReadConfiguration()
    {
     //
     //
     // Do Nothing - Use Base Class
     //
     //
    }

    I checked, the base class method was not abstract, so this was just completely unneccessary.

    In the end I asked the project manager if I could just start over, 3 days later I had scrapped the old code and rewritten the project using the correct framework implementation. Strangely the errors all went away...



  • So it begs the question... Why "CarrotBoy"?



  • @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

     I knew I should have included that... but did not want to be long winded. CarrotBoy was his named dubbed by one of the guys that sat by him, as CarrotBoy would spend 3 hours each day chomping on carrots to the annoyance of people for 2-3 cubicles around. The name stuck.



  • I once had someone like that sitting next to me.  Thar person was also less skilled at programing and thhe ate a lot of graham crackers.  GREAT content please post more.



  • @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

     

    umm, no it doesn't.  It leads to the question Why "CarrotBoy"?



  • @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

     

    umm, no it doesn't.  It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".



  • @PSWorx said:

    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

     

    umm, no it doesn't.  It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No.  It leads to the question, "Why 'CarrotBoy'?".

     

    (I'm not actually sure on that, but it's still fun.)
     



  • @vt_mruhlin said:

    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't.  It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No.  It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



  • @dhromed said:

    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't.  It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No.  It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"



  • @nobody said:

    @dhromed said:
    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't. It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No. It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"

    No. It leads to the question: “Why ‘CarrotBoy’?”.

    Actually, quote marks are inappropriate anyway, as the speaker is the one originating the question.

    It leads to the question: Why “CarrotBoy”?



  • @Random832 said:

    @nobody said:
    @dhromed said:
    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't. It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No. It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"

    No. It leads to the question: “Why ‘CarrotBoy’?”.

    Actually, quote marks are inappropriate anyway, as the speaker is the one originating the question.

    It leads to the question: Why “CarrotBoy”?

    Wrong.  The question is independent of the speaker.  The speaker is making no claim that the question is his own.

    It leads to the question: "Why 'CarrotBoy'?".

    or if the speaker were questioning...

    It leads me to question why "CarrotBoy"?



  • @Random832 said:

    @nobody said:
    @dhromed said:
    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't. It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No. It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"

    No. It leads to the question: “Why ‘CarrotBoy’?”.

    Actually, quote marks are inappropriate anyway, as the speaker is the one originating the question.

    It leads to the question: Why “CarrotBoy”?

    Finally, it leads to the question: why “CarrotBoy”?

    Iterative design rules. 



  • @Strider said:

    Wrong.  The question is independent of the speaker.  The speaker is making no claim that the question is his own.

    Doesn't matter. He's the first, last, and only to voice it, therefore it is his, verbally if not ideaically. This is known as the "who smelt it, dealt it" principle of attributive linguistics.



  • @Strider said:

    @Random832 said:
    @nobody said:
    @dhromed said:
    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't. It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No. It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"

    No. It leads to the question: “Why ‘CarrotBoy’?”.

    Actually, quote marks are inappropriate anyway, as the speaker is the one originating the question.

    It leads to the question: Why “CarrotBoy”?

    Wrong.  The question is independent of the speaker.  The speaker is making no claim that the question is his own.

    It leads to the question: "Why 'CarrotBoy'?".

    or if the speaker were questioning...

    It leads me to question why "CarrotBoy"?

    Not quite: "It leads me to question, why 'CarrotBoy'?"
     
     
    PS: Who ate my left margin?


  • @matthewr81 said:

     Chunks (read as 50+ lines at a time) were just commented out code because he did not understand how to implement parts of the framework. When I asked him why this was so... he quickly explained that those parts were not needed, and the code worked fine without it. He figured he had optimized it. (All that I could picture are those people who take apart stuff, put it back together and always have extra parts left over... must not need them huh?)

     Several hours into my code analysis I found this gem:

    Public Override Void ReadConfiguration()
    {
     //
     //
     // Do Nothing - Use Base Class
     //
     //
    }

    Someone should have shown him:

     

    Public Override Void ReadConfiguration()

    {

        /*********

    </code></p><p><code>&nbsp;&nbsp;&nbsp; Do Nothing - Use Base Class
    

        ********/

    }

     He could have doubled or tripled his productivity!



  • Lots of IDEs give you the ability to just highlight a block of text, and click a button that comments it out.  In my experience, that always generates a bunch of single-line comments.

    If the code you're trying to comment out has multi-line comments within it, you have to do extra fun to make sure the */s line up.

     



  • @Faxmachinen said:

    @Strider said:
    @Random832 said:
    @nobody said:
    @dhromed said:
    @vt_mruhlin said:
    @PSWorx said:
    @campkev said:

    @Sunstorm said:

    So it begs the question... Why "CarrotBoy"?

    umm, no it doesn't. It leads to the question Why "CarrotBoy"?

    Um, no, it doesn't. Actually, it leads to the question "Why 'CarrotBoy'?".

    No. It leads to the question, "Why 'CarrotBoy'?".

    (I'm not actually sure on that, but it's still fun.)

    Not quite. It leads to the question: "Why 'CarrotBoy'?"



    You are wrong. It leads to the question: "Why 'CarrotBoy'?"

    No. It leads to the question: “Why ‘CarrotBoy’?”.

    Actually, quote marks are inappropriate anyway, as the speaker is the one originating the question.

    It leads to the question: Why “CarrotBoy”?

    Wrong.  The question is independent of the speaker.  The speaker is making no claim that the question is his own.

    It leads to the question: "Why 'CarrotBoy'?".

    or if the speaker were questioning...

    It leads me to question why "CarrotBoy"?

    Not quite: "It leads me to question, why 'CarrotBoy'?"
     
     
    PS: Who ate my left margin?

    Not quite: "It leads me to question: WHY, CarrotBoy?"



  • @vt_mruhlin said:

    Lots of IDEs give you the ability to just highlight a block of text, and click a button that comments it out.  In my experience, that always generates a bunch of single-line comments.

    If the code you're trying to comment out has multi-line comments within it, you have to do extra fun to make sure the */s line up.

     Huh? The WTF here is that he overrode the base class function but did nothing, and was then running the function as base.ReadConfiguration. If he had left it alone the inheritance would have let him just call ReadConfiguration....


Log in to reply