Interview questions gone wrong...
-
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringFuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
I wouldn't have gotten that either. :doh: I'll have to remember it.
-
Fuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
x % 2 == 0
is probably what they were expecting. Good luck! Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
Alvaro Mendez wrote:
x % 2 == 0 is probably what they were expecting.
:confused: How will that help determine if a number is a power of 2? Powers of 2 are 1,2,4,8,16,32...
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringIf that is of some comfort to you: I screwed up a simple binary search in an interview once.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
-
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringFuzzychaos wrote:
They asked for a test to check if a number is a power of 2
My answer would have been, why are you testing to see if a number is a power of 2?
Fuzzychaos wrote:
Anyone have other mixed up interview questions?
I think, anyone that asks me to interview, I would say, "um, thanks, but I'd rather interview YOU and YOUR programmers" which I've done, not explicitly, but most people don't know how to interview, and it is SO easy to get them to talk about themselves. And programmers of course love to complain, so the "what do you like about this job, and what do you hate about it" is an awesome interviewee question. ;) Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith -
Fuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
x % 2 == 0
is probably what they were expecting. Good luck! Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
Actually that was my answer, which was of course wrong :(
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn Engineering -
Fuzzychaos wrote:
They asked for a test to check if a number is a power of 2
My answer would have been, why are you testing to see if a number is a power of 2?
Fuzzychaos wrote:
Anyone have other mixed up interview questions?
I think, anyone that asks me to interview, I would say, "um, thanks, but I'd rather interview YOU and YOUR programmers" which I've done, not explicitly, but most people don't know how to interview, and it is SO easy to get them to talk about themselves. And programmers of course love to complain, so the "what do you like about this job, and what do you hate about it" is an awesome interviewee question. ;) Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh SmithSo true! :-D
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn Engineering -
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn Engineering -
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringBy the way...
Fuzzychaos wrote:
Had an interview over the phone today.
Fuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
How do you say that over the phone?
-
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringFuzzychaos wrote:
Anyone have other mixed up interview questions?
"Have you ever had problems with a co-worker?" Yeah, just don't answer that one. Definitely don't launch into long stories. :-o
---- Scripts i’ve known... CPhog 1.8.2 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
-
Fuzzychaos wrote:
They asked for a test to check if a number is a power of 2
My answer would have been, why are you testing to see if a number is a power of 2?
Fuzzychaos wrote:
Anyone have other mixed up interview questions?
I think, anyone that asks me to interview, I would say, "um, thanks, but I'd rather interview YOU and YOUR programmers" which I've done, not explicitly, but most people don't know how to interview, and it is SO easy to get them to talk about themselves. And programmers of course love to complain, so the "what do you like about this job, and what do you hate about it" is an awesome interviewee question. ;) Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh SmithMarc Clifton wrote:
My answer would have been, why are you testing to see if a number is a power of 2?
Easy, for mathematical factorization like Mersenne primes. You change your algorithm if it is a power of two +/-1.
"I know which side I want to win regardless of how many wrongs they have to commit to achieve it." - Stan Shannon
-
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringI guess it sort of depends on the type of programming you will be doing, but seriously, folks, when was the last time you had to do that in a program? I've been writing code for 25 years. I'll be polite: this is a bs question. If someone asked me that question over the phone, I'd have a hard time not laughing. I think I would respond with, "could you give me an example of actually using such a silly question?" Am I the only one here thinking this?
Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW. My other son commutes in an M1A2 Abrams
-
I guess it sort of depends on the type of programming you will be doing, but seriously, folks, when was the last time you had to do that in a program? I've been writing code for 25 years. I'll be polite: this is a bs question. If someone asked me that question over the phone, I'd have a hard time not laughing. I think I would respond with, "could you give me an example of actually using such a silly question?" Am I the only one here thinking this?
Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW. My other son commutes in an M1A2 Abrams
It was for embedded systems development on a mobile device job interview.
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn Engineering -
It was for embedded systems development on a mobile device job interview.
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn Engineering -
Alvaro Mendez wrote:
x % 2 == 0 is probably what they were expecting.
:confused: How will that help determine if a number is a power of 2? Powers of 2 are 1,2,4,8,16,32...
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)Nishant Sivakumar wrote:
How will that help determine if a number is a power of 2? Powers of 2 are 1,2,4,8,16,32...
Oops, perhaps he meant multiple of 2. :-O At least, that's what I understood. :~ Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
-
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too. Needless to say I didn't get the job failing the technical questions. Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringMan, all my recent interviews have been what are your strengths/weakneses? I actually had one guy who admitted he hadn't interviewed anyone in about 5 year. So I got out of tought questions. (Man I wish those guys would call me back with an offer!) :badger:
-
Man, all my recent interviews have been what are your strengths/weakneses? I actually had one guy who admitted he hadn't interviewed anyone in about 5 year. So I got out of tought questions. (Man I wish those guys would call me back with an offer!) :badger:
i like that wanky one about biggest weakness - i give them the "oh you mean hwo i always work too hard" with the eyerolling and p*ss takign then i tell them that my biggest weakness is that i tend to speak my mind. "why is that a weakness?" "because sometimes i don't bother preparsing it, so if you don't want to hear what i have to say, dont hire me" works well in nz, australia and the UK though Dunno how that would go down in america land- but i'm not in Amexica ;) - suspect i might get away with it coz i'm not a local Bryce
--- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids books :The Snot Goblin, and Book 2 - the Snotgoblin and Fluff
-
It was for embedded systems development on a mobile device job interview.
Jeremy Pemberton-Pigott
A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation :-D Quote by: Jeremy Pemberton-Pigott
New Dawn EngineeringFuzzychaos wrote:
It was for embedded systems development on a mobile device job interview.
Whatever it was meant for, unless you are un-employed, you'ld be happy not to work for them: I can't see how can be so important the ability to determine if a number is the power of two; I can find tons of sample in dozens of languages just goggling, if I ever needed it. In my opinion, the most important thing in a developer is not how to solve such a small problem, but how to properly design an application, so that it's stable, easy to correct and expand and possibly performant (but this may vary, depending on the target). Looks like yor interviewer is (or was) a coder, not a programmer. Good luck for next time!
Marco Turrini
-
By the way...
Fuzzychaos wrote:
Had an interview over the phone today.
Fuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
How do you say that over the phone?
Right bracket, x, logical and, not, right bracket, x, binary and, right bracet, x - 1, left bracket, left bracket, left bracket ;)
Pablo Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
-
I guess it sort of depends on the type of programming you will be doing, but seriously, folks, when was the last time you had to do that in a program? I've been writing code for 25 years. I'll be polite: this is a bs question. If someone asked me that question over the phone, I'd have a hard time not laughing. I think I would respond with, "could you give me an example of actually using such a silly question?" Am I the only one here thinking this?
Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW. My other son commutes in an M1A2 Abrams
I would only see it being valid if it was for something along the lines of game programing or some sort of math intinsive software.
Pablo Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
-
By the way...
Fuzzychaos wrote:
Had an interview over the phone today.
Fuzzychaos wrote:
Should have been (x && !(x & (x - 1))).
How do you say that over the phone?