in reply to Stop with the interview questions already

The company I work for has a standard Perl question that they ask developers. And when they asked me this question, I quickly dashed off a solution, which fell apart as soon as they asked me to explain it (awkward). I dropped that approach and did it another way, and was able to prove or explain that it would work. Phew.

I imagine that this question has leaked out, and there may have been applicants who have written the perfect response based on that advance knowledge. I seriously doubt that advance knowledge helped them. Any further exploration into Perl knowledge would clearly have left them high and dry.

I don't believe that software development is in a place now where you can 'fake it till you make it' -- you have to be able to have decent chops and be able to hit the ground running. You have to eat, live and breathe software.

Cheating on interview questions is going to be a waste of time for both the underqualified employee and for the frustrated employer who has to downgrade and/or terminate the employee. That's not a good outcome.

But to get back to the original interview question -- if you're a developer, you should be familiar enough with binary, octal, decimal and hex, and with numbers in general, that you can do all sorts of cool tricks with numbers.

Alex / talexb / Toronto

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

1. Thanks to abell, I have finally fixed this pounds/kilograms mixup after two weeks. Can I blame dyslexia? I can? Sorry, my mistake.

  • Comment on Re: Stop with the interview questions already

Replies are listed 'Best First'.
Re^2: Stop with the interview questions already
by Jenda (Abbot) on Aug 31, 2009 at 13:55 UTC

    "Dividing by 2 without using the divide function?". Sure, you write a function that converts the number to a string of "0"s and "1"s, then you chop() off the last digit and then you write a reverse conversion function. Or no? ;-)))

    P.S.: I once faked it till I made it. Kinda. I was "borrowed" by my employer to another company temporarily as a "MS SQL professional". I've seen it for the first time about two days before that. They never found out and everyone was happy. I learned what I needed as I went along. It's about 12 years ago.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Stepping aside from this heavy discussion to a lighter moment ;) ... I guess an interview question like "How do you divide by 2 without using the divide function?" is probably not intended to test your knowledge but to test other desirable skills/qualities, and the way you answer it would tell something about your personality. Perhaps there is a wittier answer to it than the obvious "multiply by half" or the dull "not possible".

      Reminds me of this incident ... my brother was once asked this question towards the end of an interview for a programmer job,
      Q.: What is the probability of picking a red ball from a bag containing equal number of red and blue balls?
      A.: 0.5
      Q: Ok. How would you increase the probability of picking a red ball from the bag?"

      Without going into the theory of probability to explain that there wasn't a fair way to do so, he just replied jokingly, "Paint one of the blue balls red".

        I think the "divide by 2 without divide function" was meant to test whether the person knows about bit shifts. Bit shifting and bit masks are often overlooked and often very useful. And I am not speaking about microoptimizations by replacing division operators by bit shifts.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.