Hacker News new | ask | show | jobs
by spamizbad 5387 days ago
4 candidates, 2 passed FizzBuzz. Oddly, the two that failed had a Masters in CS (albeit no BS in CS).

Of those that passed: one had Masters in Library Science looking to change careers. The other was a fresh out of college CS major from Illinois State.

Next batch, I think we'll add another trivial question: count the number of vowels (a, e, i, o, u) in a string.

2 comments

  <?php

  $string = "aeiouxabcd";
  $checkfor = array('a','e','i','o','u');
  $count = 0;

  for($x = 0; $x < strlen($string); $x++) {
    if(in_array($string[$x], $checkfor)) {
  	 $count++;
    }
  }

  echo $count . "\n";
Am I hired? Or do I lose cool points for PHP?
Every time FizzBuzz problems come up among engineers, people race to solve them and post their answers, then compete to see who can write increasingly more nifty answers for a question which does not seek niftiness at all.

I'm all for intellectual gamesmanship, but these are our professional equivalent of a doctor being asked to identify the difference between blood and water. You can do it. We know. Demonstrating that you can do it is not the point of the exercise. We do it to have a cheap-to-administer test to exclude people-who-cannot-actually-program-despite-previous-job-titles from the expensive portions of the hiring process.

    <?php
    echo strlen(preg_replace('/[^aeiou]/i', '', 'hello world'));
You lose the cool points for not using a regex, I'm afraid.
I've been involved in a lot of interviewing/recruiting especially of recent graduates. I don't have hard numbers, but it seems to me that the candidates who have masters degrees tend to do worse.
It wouldn't surprise me, I suspect a fair amount of Masters students are studying for a Masters not because they want to further their education, but rather because they want to avoid going into the real world because they know they're not good at programming.