"Here at Company X," Jay Smith writes, "we have a senior programmer who, through the years, has developed a terrifying combination of complete code control issues and an image with the owners that makes his decisions right (despite real life implications)."

"This is the programmer who hates to use freely available libraries like STL, boost, or any third party API that could make his (and his team's) world simpler. He rewrites data structures per project, drags around a custom XML parser when others would suffice, reinvented the wheel so many times he may actually may own the patent by now. He has such code ownership problems, if you propose a solution that doesn't involve his code, hissy fits ensue complete with resultant silence treatment.

"Despite the fact that he is a very competent, experienced programmer, he chooses to stick to his current methods of, if I didn't write it, it's not good enough. Coupled with his current sense of urgency (his project is to be demoed soon), this means he's rushing implementation, and without thought to what he's actually doing."

"All that said," wrote Jay, "it came as no surprise that I would find the following code amidst his project."

int    Utilities_CompareDouble(double P, double Q)
{
    _asm
    {
        fld P
        fld Q
        FCOMIP   ST, ST(1)   ;23
        fstp Q
        jc LESS
        and ah,20h
        Jnz EQUAL
        mov eax,0C00002h ;Greater
        jmp EXIT
EQUAL:
        mov eax,0C00001h
        jmp EXIT 
LESS:
        mov eax,0C00003h
EXIT:
    }
}

Jay continues, "I get that he wants rewrite everything, but seriously? This was the original version that was checked-in. "

int StringUtil_Compare(const char *left, const char *right)
{
    int result = 0;

    if(!strcmp(left,right))
        result = 1;

    return result;
}

"Needless to say," Jay added, "perusing through his code during a build is a sure fire way to get a quick chuckle."