in reply to Evil Interview Questions

I'd decline any job offered by an organisation that asked these questions. The first couple were OK, but after that, you're just trying to catch the applicant out with trick questions involving code that they'd be sacked for if they used it in production code.

I'd leave the interview with the impression that you're just trying to show the others on the interview panel how much better you were than the applicants

Replies are listed 'Best First'.
Re^2: Evil Interview Questions
by talexb (Chancellor) on Feb 10, 2008 at 05:53 UTC
      I'd decline any job offered by an organisation that asked these questions.

    Mmmm .. and they'd probably be OK with that, because how you answer the answer (or walk out of the room) is part of your answer.

    An interview happens on many levels -- there's the basic, "Hi, How are you, ..." level, there's the technical level, and there's also the meta-technical level. For me, the meta-technical level is the most interesting -- sure, you know how something clever works, but can you explain it to someone so that they understand? And why was it necessary to do it that way? Can you explain your thought processes out loud as you go, so that your interviewers 'get' how you approach a problem? (In my most recent interview, I proposed a solution to a regex problem, was asked to explain it, started my first sentence, said out loud -- "Wait -- that won't work", paused, then proposed a second, different solution. Apparently, that approach works.)

    This meta-behavior also helps them understand how you may well behave when you get stressed our doing too many things -- My response used to be to bark at people (don't get into that habit -- it upsets them), but now I look them in the eye and say "I'm in the middle of an emergency right now -- is your problem more urgent?" and wait for them to explain. I make a point to follow up a few minutes later, once my emergency is over, and deal with their emergency.

      The first couple were OK, but after that, you're just trying to catch the applicant out with trick questions involving code that they'd be sacked for if they used it in production code.

    I really don't think anyone gets the boot as a result of a code review. It has to be a combination of many factors, all pointing to the breakdown of the employer/employee relationship.

    There shouldn't be any 'tricks' involved in interviews -- it's an exploration into whether there's a the basis for a good relationship, based on mutual compatibility. But if someone has (unwisely) labeled themselves as a 'Perl guru', I guess they should expect a few of these tough questions.

    Alex / talexb / Toronto

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

Re^2: Evil Interview Questions
by Porculus (Hermit) on Feb 10, 2008 at 13:57 UTC

    Did you read the whole post? In the interview, the questions were posed as starting points for discussion, not as a pass/fail trick quiz. And that completely changes how I for one react to them. I'd say there are plenty of valid reasons for finding out what a candidate thinks about code like these examples!

    My reaction to an interview along these lines would be:

    1. Answer the questions.
    2. Discuss why tricky code like that is bad, how I would refactor it, when and why I might choose to document rather than refactor, and the value of coding standards in preventing such code being written in the first place.

    I'd make my decision on whether it was a place I wanted to work based on how the discussion went, not the questions themselves; and I'd hope the interviewer would judge me likewise.

Re^2: Evil Interview Questions
by Withigo (Friar) on Feb 20, 2008 at 07:17 UTC
    I would be worried about hiring anyone for a perl job where at least some specific perl questions like this were not asked.
    Consider:

    1) perl gives you enough rope to "hang yourself from several trees while blowing your own foot off with it"

    2) for those who can swim to the surface of programming language agnosticism, there's a justifiable reason for perl having the stereotype of being a "write once language"--it's called the swiss army chainsaw for good reason.

    3) in the real world, that of businesses, deadlines, changing requirements and general idiocy will force all of us at some point down the slippery slope of committing bad code, designs or architecture decisions, so at least try to minimize these flaws as an act of charity towards the poor sap who will end up maintaining your code.

    A good perl programmer should be aware of a small handful of "bad perl idioms" and related gotchas, or at the very least be aware of the the dichotomy between perl's blessing and curse: the flexibility of the language comes with a cost--you have to be careful with what you do or you can hang yourself with bad code. (Of course this is countered by the rewards gained by the smart use of tricks in the language.)
    Someone who would walk obviously isn't interested in any of the above, and I'd also think twice about taking on a developer who isn't generally interested in puzzles related to programming languages themselves.