the "no good Perl jobs"/"no good Perl programmers" myth
Zach Vonler
zvonler at gmail.com
Mon Aug 7 21:08:58 BST 2006
On 8/7/06, Dirk Koopman <djk at tobit.co.uk> wrote:
> I have lost count of the number of times people (including me) have
> asked on here for some concrete examples of "how to test" and only got
> some vague hand/willy waving as a result.
Back in February, Ovid posted this as part of a similar discussion:
-- Begin quoted --
Imagine we're building an app and it turns out to be slow. We've
profiled the code and reduced the problem down to this:
foreach my $alpha ( @alphas ) {
foreach my $beta ( @betas ) {
if ( $alpha == $beta ) {
push @results, $beta;
}
}
}
1. What is a likely reason for the performance problem?
2. How might we speed it up?
Even though the applicants are allowed to ask any questions they want
I've been dismayed to discover that most applicants cannot answer the
first questions and those who can are often stumped by the second.
Heck, if you've never used Perl, the problem itself should be clear,
even if a "Perlish" solution is not (sort @betas and do a binary
search, anyone?)
-- End quoted --
I've used that same question (in Java) for evaluting candidates
several times since then and believe it to be very useful. I have had
conversations last up to 45 minutes about just this problem, as it can
easily veer off into data structures, time and space complexity,
debugging, etc.
I add an additional wrinkle, which is that I usually comment the
method with something like "Determine the intersection of two sets"
and declare the method as "public List intersection(List a, List b)".
It's interesting to see which people take the comment and name as
gospel, and which ones approach them suspiciously.
Later,
Zach
More information about the london.pm
mailing list