• Neil (unregistered) in reply to Vlad Patryshev
    Matt:
    This smacks of someone who had too much math and not enough sense. The "beauty" of integers is that you can define an almost-infinite sequence of them recursively with only the postulates of "one" and "plus". So, naturally, that's how he tested whether the input was a member of the set of integers.
    Better still, use "zero" and "increment". I won't bother linking to the Peano postulates for obvious reasons, akismet.
    Vlad Patryshev:
    Regarding foreigners and phone interviews, one of my favorite phone questions is "can you write a regex that checks if parentheses are correct in an arithmetic expression?" - and I know the right candidate when they start laughing. Mostly it happens if you call a candidate in Poland; they have an excellent education there. (Disclaimer: I've never even been to Poland.)
    That would be due to their experience with Reverse Polish notation.
    Mikey:
    Clocks use Roman Numerals? Well I'll be darned....

    AFAIK most pedants consider IIII more correct (as in that's what Julius Scissors would have used), but the convention these days is IV.

    Although clocks use IIII for four, they still prefer IX for nine.
    Bill C.:
    TRWTF is how did the prime candidate ever graduate from electoral college?

    And that test of integrity, that should be illegal.

    Well we got to test the prime candidate's integrity at least.

  • Fernando (unregistered) in reply to Phil
    Phil:
    My submission included both implementations with an explanation of each including a reference to Applied Cryptography which I thought would impress them (it turned out the interviewer hadn't heard of Bruce Schneier despite being in the crypto field, wtf!)

    Does anyone know what algorithm Phil's talking about? (not that I doubt him, I'm just curious)

  • Bill C. (unregistered) in reply to Neil
    Neil:
    Bill C.:
    TRWTF is how did the prime candidate ever graduate from electoral college?

    And that test of integrity, that should be illegal.

    Well we got to test the prime candidate's integrity at least.
    Yes, but that's the slippery edge of a fall into a very slippery hole. One thing leads to another and you find yourself testing the integrity of a president. That's why it should be illegal.

  • Jerome (unregistered)

    I don't know if it's too late t comment on this...

    But as a general rule, for me, if someone shows up for an interview and seems extremely nervous/edgy/fidgety, I assume they are high. (From personal experience. I am a recovering addict.)

    In my case it was meth, but anybody coming across like that could be high on meth, coke or crack.

    When he asked to be excused, that would have ended the interview immediately. (Don't want junkies taking hits in our company toilet, thank you very much.)

  • Norman Diamond (unregistered) in reply to Jerome
    Jerome:
    I don't know if it's too late t comment on this...
    Not too late, and I hope it's not too late for you to learn something from this.
    Jerome:
    But as a general rule, for me, if someone shows up for an interview and seems extremely nervous/edgy/fidgety, I assume they are high. (From personal experience. I am a recovering addict.)
    Some of us are better at programming than at telling good stories for interviews, so we get nervous/edgy/fidgety when we are not high. Unless you count the caffeine for which we drink tea, coffee, cola, etc.
    Jerome:
    When he asked to be excused, that would have ended the interview immediately. (Don't want junkies taking hits in our company toilet, thank you very much.)
    One of my heart medicines is a diuretic. You would end the interview not because of my heart issue but because of your prejudicial assumption. You're not alone; WTF bosses are half of this site.
  • SomeGuy (unregistered) in reply to Norman Diamond
    Norman Diamond:
    One of my heart medicines is a diuretic. You would end the interview not because of my heart issue but because of your prejudicial assumption. You're not alone; WTF bosses are half of this site.

    You're old and have a bad heart? Well, you're eliminated (no pun intended...though unintentional puns are sometimes better) anyway due to other prejudices.

  • (cs) in reply to Phil
    Phil:
    Anyway, Boris failed miserably but I wanted to have a rock solid case against hiring him as others in the company were keen to get him in regardless so that's why I gave him a second chance. What's missing from the story is that after my response to his second submission, he asked if the work would be billable; that was when we asked him (nicely) to please go away.

    I find it's a better policy not to hire anyone if anybody raises a red flag on the candidate. As our result, our engineering team is rock solid.

  • AlexH (unregistered)

    Is it just me, or does Boris's "checkInteger" go into an infinite recursion when $Number is -0.5?

  • Rachel (unregistered) in reply to chubertdev

    "Yeah, I'm pretty duff."

    FTFY! ;)

  • Teagan42 (unregistered) in reply to MightyM

    Please tell me this is sarcasm...

    if not, then you need to realize that he is only checking if the number is evenly divisible by 2, 3, 5, and 7 - if it's not then it's PRIME. Given that 121 is not divisible by 2, 3, 5 or 7 his program would return "PRIME" but 121 is COMPOSITE (11 * 11 = 121)

  • UNPAREMINUE (unregistered) in reply to Kasper
    Comment held for moderation.

Leave a comment on “The Prime Candidate”

Log In or post as a guest

Replying to comment #:

« Return to Article