I've only hired tens of people, and while that is not a massive sample size, I'm still astonished by the simple questions we ask that people get stuck on. The one that continues to shock me:
"In any language of your choice, write a function that takes an array of ints and returns the sum of those ints (If you use a language such as php do not use array_sum)"
I'm just looking for something like:
function sum($ints) {
$sum = 0;
foreach($ints as $i) {
$sum += $i;
}
return $sum;
}Then we follow up with something like: "lets say your input array contains [4,-7,0], walk me through the code"
And we finally ask "talk to me about some things that could go wrong at runtime that might cause issues with this function". Expecting people to talk about overflows (maxint?) or if its a dynamic language like php, checking for non-integer values.
I estimate that around 50% of people get ruled out during the "coding" exercise mentioned above. It is astonishing that these people even apply for developer jobs.