"At my company, the powers-that-be determined that, because we rejected a lot of job candidates, my group was ineffective at hiring new employees,"Kendall writes, "thus, the responsibility of hiring new developers was shifted to a group much more proficient at hiring: human resources."

"That has been going about as well as you might expect, and to make a long story short, we were told to handle any 'knowledge gaps' with training. And thus, one of the very first training jobs I give to new employees is to develop a method that translates Roman Numbers to Decimal Numbers. Most struggle with the challenge, but one new hire actually managed to solve the problem:

public string rom2num(string r)
{
    if (r == "I") return "1";
    if (r == "II") return "2";
    if (r == "III") return "3";
    if (r == "IV") return "4";
    if (r == "V") return "5";
    if (r == "VI") return "6";
    if (r == "VII") return "7";
    if (r == "VIII") return "8";
    if (r == "IX") return "9";
    //
    // Snipped LOTS of "code" here
    //
    if (r == "MMVIII") return "2008";
    if (r == "MMIX") return "2009";
    if (r == "MMX") return "2010";
    if (r == "MMXI") return "2011";
    return "E";
}

Kendall continues, "when I asked him why the method returns a decimal number as a String, he gave me a disbelieving look and said 'For returning the error indicator, of course.'"

"I can only hope that the powers-that-be will determine that we are ineffective at training and shift the responsibility of teaching programmers to program to corporate training."

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!