Brainbench perl test?

David Cantrell david at
Tue Aug 28 22:15:27 BST 2012

On 28/08/2012 21:50, Simon Wistow wrote:
> On Tue, Aug 28, 2012 at 08:41:14PM +0200, Joel Bernstein said:
>> It's a red flag of lack of clue if a prospective employer tries to use 
>> this to weed out candidates.

It's possibly a red flag that some numpty in HR is trying to show how
important they are.  If you were to just reject all companies that have
HR numpties then you'd reject lots of good employers and would miss out
on lots of interesting projects.

> 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);
>   }

At $employer[-3] we had Java programmers with years of experience on
their CV come for interview, which included an open book programming
test with access to t'interweb and plenty of time, who didn't manage to
open and read a file.  It is now over a decade since I last wrote any
Java and I can't remember how to do it.  But it took me *15 seconds* to
find sample code online.

For perl hiring, we had what I think was a great test.  And now that
they no longer exist, I can tell you what it was!

* write a HTML pretty printer that will take an HTML document and
  format it all nicely indented.  It should gracefully handle malformed
  input documents, eg missing end tags, badly nested tags etc.
* for bonus points, have it apply [list of transformations] if requested
  via command line arguments

because of the, umm, creatively fucked-up world that is HTML, this is
very much an open-ended problem, and you can see how good someone is
simply by how far they get.

We would, of course, then go through candidates' code with them, talking
about how they might improve it given more time, what other approaches
they considered and so on.  Apparently my solution fucked with peoples'
heads.  I blame MJD, because IIRC I'd just recently inhaled HOP.

David Cantrell | Minister for Arbitrary Justice

  Longum iter est per praecepta, breve et efficax per exempla.

More information about the mailing list