How to answer the questions
Ovid
publiustemp-londonpm at yahoo.com
Thu Feb 23 19:04:05 GMT 2006
--- Andy Armstrong <andy at hexten.net> wrote:
> On 23 Feb 2006, at 09:22, Peter Hickman wrote:
> > The original code wouldn't have done that.
>
> So I see. I have to admit I assumed the original test was flawed - so
>
> I guess I didn't get the job :)
>
> We could do with knowing whether ordering was significant too.
For the record, this is why we told candidates they were free to ask
all of the questions they wanted. We were certainly interested in the
answers, but we also wanted to know how they arrived at the answers.
Some folks are careful not to discard information, so they ask if order
is important, how to handle duplicates and even whether or not sort an
array in place was appropriate.
A perfectly fine answer for the first answer was "nested loops are
often slow". Some variation of that would be great.
The answer for the second question should involve some questions, but
for a reasonably smart candidate, I'm not going to reject them for
automatically reaching for a hash/grep solution (though just "assuming"
the requirements is bad).
The reason I wouldn't reject them out of hand for automatically
reaching for a hash/grep solution is that so few candidates answered
the first question, let alone got to the second.
In short, answering the questions should reveal how you think about
problems. That's the real answer, not the specifics of the solution.
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
More information about the london.pm
mailing list