• Programming, WTF 20.10.2009 3 Comments

    I love a medical school that gives online tests (quizzes, maybe?) and evaluates the results through JavaScript.  I especially love when it uses this logic to do it:

    if(correct) return true;
    else {
      if(guess < 2) {
        alert("That is not correct.");
        guess = guess + 1;
        return false;
      } else {
        alert("You have guessed incorrectly, but may move on.");
        return true;
      }
    }

    I hope my (hypothetical) surgeon works the same way.  “You’ve removed three organs.  None of them were right, but you can send him home now anyway.”