Sunday, October 14, 2007

The KISS (Keep It Simple and Stupid) principle. Part I - Wacky Interview Questions

In IT industry, taking someone's interview is like taking revenge... well... at least for people who sometime somewhere got humiliated and embarrassed by the questions asked by an interviewer. People actually don’t think twice before asking a question. Most interviewers ask question simply because they 'want to ask something' and not because 'they have something to ask'. One of my colleagues used to open a book, get the basics cleared before going out to take an interview. I remember a "trying to be cool but look like a fool" type guy who asked me how to implement stack using queue (Why would you do that Jerk?) ... anyway, That was his way to test the logic...but here is the funniest of all incidences...
A so called geeky guy was interviewing one of my friends. The geeky interviewer probably was a C/C++ expert and was a guy who can play with bits and bytes and do system programming everyday. The interviewer asked my friend a very simple question (which by the way was a geeky question according to him). The question was,

"How will you write a piece of code that will return a positive number when u pass a negative number to it and vice versa?"

This geeky C++ maestro was expecting a rather complex answer to the question. An answer that would probably include process of converting number into a bit array and shifting the bit array to its left...process carry...blah .. Blah ... Blah .... When he got the answer from my friend, he was stunned... the answer came in split second and was like a new invention for the interviewer... the answer was,

"Sir, multiply that number by -1”

Excellent answer my friend. Probably you should have told him a few other ways as well. Something like (i= -i) and I m pretty sure that he would have died in his chair by then.

2 comments:

Manodeep said...

First post and very well written. I think we should continue this thread to add more Interview Questions :D

Like one funniest question ever asked: Tell me the number of ways to Close Notepad application. I personally knew 5
1) "X" button
2) Alt + F4
3) File -> Exit
4) Task Manager -> Kill Process
5) Right Click on task bar -> Close

The guy said there was one more way to do it and the answer was "Shutdown your PC". :-| Can u beat that?

Anonymous said...

Well said.