Live data from Hacker News

Steve Ballmer's incorrect binary search interview question

blog.jgc.org

161–170 of 257 posts

Re: Steve Ballmer's incorrect binary search interview question

#161
post #129

Earlier quoted context omitted.

It would not be shocking to find out a cocky interviewer posed a brainteaser while leaving out a fundamental assumption, then judged an answer as incorrect because it violated that unspoken assumption - I can imagine Ballmer saying "no actually, you have to start with a guess of 50, everyone knows that."

Ah, the B type developer. Knows enough to find exciting and interesting problems but doesn’t know how to distinctly separate a type C (who can’t solve the problem at all) from a type A ( who knows the problem in and out and knows “it depends”). Not all that different to me from midlevel dev who learns about concurrency/metaprogramming/etc and starts using it as a tool for everything. Just enough to be dangerous.

They like to pretend their asking high level system design questions while actually quizzing candidates on esoteric low-level details.

Re: Steve Ballmer's incorrect binary search interview question

#162

I recently interviewed for a senior level role for a complex domain (payments), this is an area I have more than a decade of experience. The interviews went flawlessly because I know payments inside out, not just in US but in UK and most EU jurisdictions. The funny bit is that the role being senior, influencing, soft communication skills and managing conflict are even more important than the subject matter expertise…

That SME guy sounds like an asshole, but I used to have an interview technique where I’d ask increasingly specific and low level questions about the candidates area of expertise until it got to the point where I’d be pretty confident they wouldn’t know the answer off the top of their head. I wasn’t adversarial or rude about it, I just wanted to find out if they were comfortable saying “I don’t know”, because not know…

I've been on the other side of that table. The interviewer stated in advance that the questions would get harder until I couldn't answer anymore, and that's OK because he wanted to see where my knowledge stopped. That clarity made it much more fun than stressful. I felt alright saying "I think the answer is X, but it could possibly be Y, and here's what the different implications would be".

But for the luvagod, please state that up front. It wouldn't have been nearly so fun, or informational for the interviewer, if I'd felt like I was failing a quiz.

Re: Steve Ballmer's incorrect binary search interview question

#163
Slowly and for the span of many years I've come to realize that binary search is an amazing problem solving tool, specially on systems that are too big and complex to debug.

For example, recently a colleague had a problem with a rendering tool for Figma, of which we don't have the source code. The tool would take too long exporting a specific design. The team mate tried changing things randomly for days to no avail. Each try would take hours and sometimes crashed the browser.

The solution I gave him was to remove half of the elements and check how that affects the exporting time. Then keep repeating for the groups that still failed. In a matter of hours he found the element that caused a seemingly infinite loop.

Re: Steve Ballmer's incorrect binary search interview question

#164

Earlier quoted context omitted.

I don't know why you'd make this comment... I find it hard to believe you're actually stupid enough to not understand the implicit "(i.e. is your expected profit greater than 0)". If you answered like this in an interview I would definitely not give you the job. I did actually interview someone once who was like this - "How would you do this?" "Well you shouldn't do it. I think you should do this other thing.". He di…

I would be concerned if senior stuff wouldn’t speak up and bring up possible technical issues. That’s like half of their value.

Yes... But not in a technical interview when that's clearly not being asked of you.

Re: Steve Ballmer's incorrect binary search interview question

#165
I believe what Ballmer wanted to hear are clarifying questions.

Eg. Can I stop at any time? If yes, I will stop before I go into the negative. If I cannot stop but must continue the game until I guessed the right number, I will most likely lose money. Then go into a simple computation of XY terms where X is the probability and Y is the payout or loss for maybe a dozen terms.

Re: Steve Ballmer's incorrect binary search interview question

#166

I recently interviewed for a senior level role for a complex domain (payments), this is an area I have more than a decade of experience. The interviews went flawlessly because I know payments inside out, not just in US but in UK and most EU jurisdictions. The funny bit is that the role being senior, influencing, soft communication skills and managing conflict are even more important than the subject matter expertise…

That SME guy sounds like an asshole, but I used to have an interview technique where I’d ask increasingly specific and low level questions about the candidates area of expertise until it got to the point where I’d be pretty confident they wouldn’t know the answer off the top of their head. I wasn’t adversarial or rude about it, I just wanted to find out if they were comfortable saying “I don’t know”, because not know…

Remember that you are talking to humans, they are flexible. You were being adversarial. If you could explain them in advance what you were trying to "read between lines", I'm pretty sure most/all of them would have changed their answers. So what you were supposing that was unfixable/permanent, apparently is fixable within 1 minute (of explanation).

Re: Steve Ballmer's incorrect binary search interview question

#167

I recently interviewed for a senior level role for a complex domain (payments), this is an area I have more than a decade of experience. The interviews went flawlessly because I know payments inside out, not just in US but in UK and most EU jurisdictions. The funny bit is that the role being senior, influencing, soft communication skills and managing conflict are even more important than the subject matter expertise…

That SME guy sounds like an asshole, but I used to have an interview technique where I’d ask increasingly specific and low level questions about the candidates area of expertise until it got to the point where I’d be pretty confident they wouldn’t know the answer off the top of their head. I wasn’t adversarial or rude about it, I just wanted to find out if they were comfortable saying “I don’t know”, because not know…

> because not knowing something is an everyday part of technical work, but not being comfortable saying it can be big source of issues.

I'm honestly never afraid to say those words, if someone doesn't want to hire me because I said it, I dodged a bullet. I'll go where the devs and leads are sensible people.

Re: Steve Ballmer's incorrect binary search interview question

#168
post #10

The article implies that the interviewee assumes that the number is being chosen randomly, when Ballmer could actually be choosing adversarially. However, if the interviewee assumes that Ballmer is being adversarial, then you can pick a different value as your initial guess, which causes the probabilities to shift. Even the OP assumes that the interviewee will start guessing with 50, but, because of the way binary se…

You have 31 positive payout guesses (1 $5, 2 $4, 4 $3, 8 $2 and 16 $1) leaving 69 other numbers with zero or negative payouts. You don't want to have gaps larger than three between your positive guesses, but there are 32 gaps for a total of 96 possibilities, or an excess of 27 over the numbers you need to cover.

It seems like a lot of possibilities and I think you can get away with a minimum gap size of one, but let's assume you do 5 3-gaps at 1, 25, 50, 75, and 100 and 2-gaps everywhere else. So start with 51, then 26 and 76. Then go up or down 12, then 6, then 3. If you have a gap of two you flip a coin, if a gap of three you pick the middle one.

Or if you have them write down the number and you think it has double-digits you could put your 4-gaps below 20. Start with 53 and go up or down 24, 12, 6, and 3 (unless it is below 20, then it is multiples of four.) 59 would pay you a dollar.

Your starting guess could be anywhere from 37 to 64 without paying out more than a dollar, but if you start with an extreme, then low odd numbers and high even numbers will have a negative payout. However, I think you can still randomize sufficiently starting with 38 and 63, e.g. 63-31-15-7-3-1.

Re: Steve Ballmer's incorrect binary search interview question

#169
post #29

"Should you accept to play this game?" Absolutely yes. I like games. The purpose of games is to have fun. This seems like a fun game for like the first $20, a sum I can afford to play a fun game for 10 minutes. Then at the end, I get to say "I once lost $20 to Steve Balmer playing binary search", which is a fun sentence I can dine out on, and is worth more than $20 to me. I feel like perhaps this is why MS under Balm…

I don't know why you'd make this comment... I find it hard to believe you're actually stupid enough to not understand the implicit "(i.e. is your expected profit greater than 0)". If you answered like this in an interview I would definitely not give you the job. I did actually interview someone once who was like this - "How would you do this?" "Well you shouldn't do it. I think you should do this other thing.". He di…

This is greyed out, but I tend to agree with the sentiment that there’s a right way and a wrong way to approach these “EV” questions. OP was a bit harsh with the stupid comment, and for SWEs EV understanding is not usually a critical thing, but ultimately you’re being asked about the probability and the ability to make good decisions. Trading firms make use of this when hiring traders (most famously Jane Street and also SIG); The thinking is that if someone makes bad decisions with toy games, and their thought process is not analytical, they’re going to make for a bad trader, not making good decisions with millions of dollars on the line. A good example of something that would rule out a trader is: You can flip a coin, if you win you get $1m, if you lose you lose $1m. Would you play? The EV is zero, but the question is about bankroll management and disaster avoidance. As an individual the downside risk of a $1m loss (usually) significantly outweighs the upside of a $1m gain.

Re: Steve Ballmer's incorrect binary search interview question

#170

Earlier quoted context omitted.

That SME guy sounds like an asshole, but I used to have an interview technique where I’d ask increasingly specific and low level questions about the candidates area of expertise until it got to the point where I’d be pretty confident they wouldn’t know the answer off the top of their head. I wasn’t adversarial or rude about it, I just wanted to find out if they were comfortable saying “I don’t know”, because not know…

I've been on the other side of that table. The interviewer stated in advance that the questions would get harder until I couldn't answer anymore, and that's OK because he wanted to see where my knowledge stopped. That clarity made it much more fun than stressful. I felt alright saying "I think the answer is X, but it could possibly be Y, and here's what the different implications would be". But for the luvagod, pleas…

I like that idea, and I may need to steal it. I have this tendency of asking candidates questions, and if I feel like they’re demonstrating very strong knowledge then I may toss them a few extremely obscure questions for bonus points, but I never expect candidates to get them right.

But this up-front approach of setting expectations seems like a better way to go.

Post reply on HN