Brainbench perl test?

Uri Guttman uri at stemsystems.com
Tue Sep 4 17:25:57 BST 2012


On 09/04/2012 08:03 AM, Mr I wrote:

>>
>> I've literally had people who were "Senior" programmers (whatever that
>> means) who, when given the instructions "Given that fib(n) is equal to
>> fib(n-1) + fib(n-2) write a fib function in any language" didn't even
>> get to the
>>
>>    sub fib {
>>      my $n = shift;
>>      return fib($n-1)+fib($n-2);
>>    }
>>

>>
> IMHO this is a typical example of an awful question!
>
> It requires additional knowledge of the problem domain NOT asked by the
> interviewer.Your assumption is that the candidiate knows:
>
> a) the fibonacci sequence
> b) mathematically how to calculate (included recurrence)
>

why do they need to know it? they are given the formula!!

and they can do a linear version if they don't know recursion.

and knowing recursion is a good coding test to filter out the wannabes 
from the serious coders.

> It's such a flawed question.
>
> You're not testing the candidates knowledge of maths you're testing their
> knowledge of programming.

and how to code given an algorithm. very legit.

> The question does not allow you to assess whether the candidate is freezing
> due to their lack of knowledge in mathematics or in programming.

what math? this is trivial math. if you are a coder with such a limited 
exposure to the world to not be able to handle this (and you are given 
the formula!!), then you are not worth hiring. also exposure to fib is 
very very wide. you have to be living under a rock to not have heard of it.

>
> It's equivalent to asking you to write a function ved(n, m) that implements
> the 16 sutras* and uses them to return the result. A task that maybe easily
> done by many an Indian programmer yet many in this group would struggle
> with.
>
>

way off target. the fib solution is 2-3 lines in recursive and about the 
same in linear. not a lot of code or brain busting work.

> A "good" question should reference a closed problem domain with a clearly
> defined task (e.g. create a maze in a 6 by 6 grid, sort a pack of single
> faced cards, etc). That way you can assess the candidates reasoning,
> approach and coding (hopefully).
>

and if they can't code fib given the formula, you think they can code a 
maze or a multikey sort?? wow.

uri


More information about the london.pm mailing list