I think the real test of a developers skill is to ask them to code something for you. As a developer myself, i would fail any whiteboard interview because most of the problems I solve aren't because of solutions I've come up in my head, they are because I knew what to search on Google to find the solution. And to anyone who thinks this makes a bad developer, round up a group of 20 developers and ask them how often they use Google searches to solve problems they encounter. The difference between good developers and bad developers is not if you can solve every problem on your own, it's having the skills to know what to search when you encounter a problem. Us developers are over-glorified web searchers with a simple understanding of the language we are developing in.
Also, debugging code is harder. Any idiot can write something that occasionally works with some limited simple input and doesn't need to scale or do much error handling or recovery or cooperate with the OPS guys and their designs in any way. If you hire a guy who can code but not debug what he wrote, you're in big trouble sooner or later.
Give em a fizzbuzz with pathological parenthesis which mess it up, or half a fizzbuzz and ask them to finish it. Or give them a mortgage amortization calculator or similar with an obvious fencepost/off-by-one error (this is almost more of a spreadsheet problem than a real programming problem, but...). This is almost too stereotypical of a classroom task, but give them an OO design of a simulation of an elevator (literal, not an analogy) and ask him to add another floor to the elevator design, or add a fire dept override keyswitch, or maybe implement those door sensors so it doesn't move if any doors are open. Given a really crude simple importer for CSV text files, make it smarter so it can handle embedded commas inside quotes. Here's a crude simple roman numeral to decimal translator which handles I and V, now either add X or add prefix notation or whatever its called where IV = 4 not 6. Here's the worlds dumbest prime number checker which tests all positive integers smaller than the test number for divisibility... your task is make it faster.
You'd like to think so, but what I'm saying is that isn't the case.
> Give em a fizzbuzz with pathological parenthesis which mess it up, or half a fizzbuzz and ask them to finish it.
I ask them to write regular FizzBuzz and they can't. :(
You could be running into people with bad attitudes. I'll blame youthful indiscretion or whatever, but one really bad interview I was in, I couldn't believe I took a day off work and drove half way across the state to interview for what amounted to a ridiculous low entry level position (bait and switch) so I started flirting with the cute HR lady and talked ham radio antennas for an hour with my future bosses boss because if they wasted my time I was going to waste theirs. Well, kids have never been known for excessive professionalism, I wouldn't do that now but I wouldn't get caught in a bait and switch either. So I guess what I'm getting at is do they look smoking hot pissed off or more confused?
I agree that whtieboard interviews aren't good indicators of programming ability, and we employ other methods of figuring that out.
But the first test is to write a loop that prints the numbers 1 through 100 in your language of choice.
If you can't do that, you haven't been coding for 5 years.
And of course good programmers use Google. That's not the point.
The key to fizzbuzz is to make the decision for a number x, whether to map it to itself or fizz or buzz or fizzbuzz. Given a function which does thatm, just map it over whatever list of integers you want. Still no loop.
Modern functional programming style does not generally write loops; that job is left to the compiler. Python does allow one to write loops, but it is fairly well known that doing so causes your code to run slower because you are fighting against the compiler and the underlying VM.
That's exactly what we do. I say "please get on your computer and write a loop to print the numbers 1 through 100 in your language of choice" and they fail to do it.