News for hackers. Stuff that matters.
Re:Array Iteration Interview Problem by knowtheory on Wednesday August 01, 2012 @08:43PM (#4326582)
> My background is mainly in embedded systems programming. My main concern when I code is for speed and efficiencey, both in runtime and in memory consumption.

Do you specify this to your candidates when they write their code?

This is the thing that annoys me most about interview programming questions. If you don't give me constraints, I am going to implement a naïve version of your requirements, because you have not given me any additional criteria by which you are going to judge my code.

Knowing things about what sorts of inputs the method has to expect (should I assume that i'm going to encounter a billion elements or not?) is really important to judge correctness of fit, or whether you're just wasting your time thinking about cases you'll never encounter.

Re:Array Iteration Interview Problem by mbrameld on Wednesday August 01, 2012 @08:45PM (#4326589)
Part of being a good developer is teasing the constraints out of the customer. You're never going to be handed a perfect requirement. If you're not given constraints don't get annoyed, simply ask about them.
Re:Array Iteration Interview Problem by bunderbunder on Wednesday August 01, 2012 @09:25PM (#4326723)
As one of my colleagues likes to complain, the hardest thing in the world to find is programmers who try to make sure they're giving you what you want instead of just giving you what you asked for.
Re:Array Iteration Interview Problem by jazzychad on Wednesday August 01, 2012 @08:52PM (#4326612)
Precisely. I also say, "This is a very open-ended question in which I am intentionally vague on some points. Ask me about information you want or points you need clarified."

Like I said, I have no desire for them to create the "perfect, correct" solution; but I do want to know how they think about a problem and what questions they ask in the face of deficient information. I proactively encourage them to do so, so I am not trying to trick them into failure or anything.

Re:Array Iteration Interview Problem by sanderjd on Wednesday August 01, 2012 @09:31PM (#4326733)
A problem with entirely made-up domain-less questions like this is that any additional constraints are equally as arbitrary as the question itself, and thus difficult to probe for in the same way that someone would probe a customer for constraints to real problems.

It seems like you're very interested in people asking questions like "how big might the array be" or "what order of time can you afford to wait for the answer to this", to which you might answer "a billion" or, "as little as possible", but those questions are very different and less meaningful than questions like "how many users will this system have", and "how much time can users of this system afford to wait for a response", even though the answers may be the same.

Re:Array Iteration Interview Problem by knowtheory on Wednesday August 01, 2012 @08:55PM (#4326625)
Then that's fair enough.

I have to say, I respond quite differently to "I have a problem I'm trying to solve" vs something like "I need this algorithm implemented", and a lot of the way these programming challenges are presented always come off to me as the latter, and as a result, contrived.