Instead of complaining about how unfair the test is, consider it a challenge (although judged on this post, it looks like you've failed already). Give it your best shot. Approach it with humour.

Ten years ago, when I was hiring C/Pascal developers, I used the company-supplied programming test to winnow out the candidates. One of the questions asked the applicant to write a bubble sort in C.

I know, I can hear you saying "But the bubble sort's the least efficient!" and you can tell me it's O(n^2) in the worst case. Yes, I know that.

But that's not the point. Nor is it pertinent to point out that Linux/Unix has a sort command. I specifically asked for a bubble sort.

I really liked one applicant, but he'd coded up a quicksort solution. I was impressed, and I typed it in and it compiled and ran flawlessly. But I didn't hire him, because I'd specifically asked for a bubble sort.

An interview is a contrived social situation: when you're asked to do something in a particular way, my strong advice is to just do it the way the interviewer asks. Follow up with clever alternatives later.

Sometimes they're interested in your answer, and sometimes they just want to see how you react. Like asking how many golf balls fit into a station wagon. Of course it's a ridiculous question. Do you complain about it, or do you start with a joke about what a great prank that would be, then come up with some rough approximation?

So why the bubble sort? Because I can describe the algorithim quickly, and the code (two nested for loops) can be dashed off in about five minutes.

And the candidate who wrote that great quicksort routine? I didn't hire him - I knew that if I hired him and then gave him specific instructions to do something a particular way, he'd probably do it 'more efficiently' and therefore incorrectly for the required task, then he'd have to do it again, making us both unhappy with the outcome.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds


In reply to Re: Need crash course in PERL! by talexb
in thread Need crash course in PERL! by cbrackin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.