in reply to Evil Interview Questions
Take a look at the following short snippet of code. There are some problems with it. Can you point out the problems and explain them?
I include syntax errors, programming logic errors, some really bad style elements and a couple of debatable style problems. Some of them are really obvious, but others are very subtle. It gives the good communicators a chance to show how well they can explain things, and the knowledgeable Perl programmers a chance to show off. At the same time it doesn't put anyone on the defensive, because there are a few easy-to-spot errors.
Another open-ended, conversation-starting question I like: write (or describe how you would write) code that performs some specified task, without using particular perl operators or functions. I asked one question like this during our last round of interviews -- manipulate a given array without using for/foreach/while/until -- and was pleasantly surprised to get several different correct answers. When I wrote the question, the keyword I was fishing for was "map", because a lot of beginners seem intimidated by it or completely unaware of it.
Joe
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Evil Interview Questions
by kyle (Abbot) on Feb 10, 2008 at 06:15 UTC | |
by Nkuvu (Priest) on Feb 11, 2008 at 18:03 UTC |