Live data from Hacker News

Steve Ballmer's incorrect binary search interview question

blog.jgc.org

211–220 of 257 posts

Re: Steve Ballmer's incorrect binary search interview question

#211

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…

I've experienced something very similar in the same field. It's honestly frustrating when you're fully prepared and qualified, yet the process feels more like a trivia game than a genuine evaluation of your skills and experience. As others have pointed out, this kind of behaviour is a clear sign of a toxic culture. What's even more absurd is that it should be the exact opposite. If they're looking to grow their team or replace someone, they should be seeking out someone who's even better than anyone they currently have.

When they nitpick or push for irrelevant details just to find a reason to say 'no,' it's a massive red flag. It shows they're not really interested in innovation or solving the real problems, like the endless production failures we've already helped other companies overcome. Honestly, in situations like that, the best thing you can do is apologise for wasting their time and walk away. But I get it when they have the job in your area, it's tempting to tolerate the nonsense. Still, it’s a good reminder that sometimes, dodging that bullet is actually a blessing in disguise, even though you are unemployed and running out of money, as I was at the time.

Re: Steve Ballmer's incorrect binary search interview question

#212
I know no one asked for it, but here's a slightly simplified version of this script in Python:

    from itertools import count
    from statistics import mean

    INITIAL_PAYMENT = 5  # dollars paid if first guess is correct, minus 1 for each incorrect guess
    RANGE = range(1, 101)  # the range of numbers to guess from

    def simulate_guess(target):
        low = min(RANGE)
        high = max(RANGE)
        for bad_guesses in count():
            match guess := (low + high) // 2:
                case _ if guess  target:
                    high = guess - 1
                case target:
                    return INITIAL_PAYMENT - bad_guesses

    average_payout = mean(map(simulate_guess, RANGE))
    print(f"\nExpected value per game: ${average_payout:0.2f}")

Re: Steve Ballmer's incorrect binary search interview question

#213
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…

No it doesn't, it's quite clear that Ballmer can be choosing adversarially. The point is that even if Ballmer chooses randomly and the interviewee plays optimally given this, the game still has a negative expectation value, and that is enough to be sure the game is a loser for the interviewee. The post never answers the question "so what is the real expectation value", which is a more difficult question. But I think…

right but as posed the EV is positive if ballmer picks randomly so you have to go into consideration of the adversarial case

Re: Steve Ballmer's incorrect binary search interview question

#214

Earlier quoted context omitted.

> How on earth does that indicate if a junior frontend dev can do their job or not? Playing devil's advocate, maybe a junior frontend dev that doesn't trust that they understand what someone is asking for and pushes back on bits that should be obvious will perform better (in some contexts?) than one that doesn't. For a junior role in particular, though, it really doesn't seem like that should be the threshold and it…

I hear what you’re saying, but really, this is a stupid question and a waste of everyone’s time. Instead you could give a real big report that has insufficient information or that contains a red herring to an improper assumption. The interviewer could then measure if the candidate properly pushed back, exposed an improper assumption and asked relevant clarifying questions. Like one would do at the actual job exhibiti…

> really, this is a stupid question and a waste of everyone’s time

Yeah, I think I agree. I was just responding to (what I saw as) sentiment that it was entirely unrelated to performance, which seems to overstate the case.

> Could you image how idiotic you’d sound beginning by asking is it a real car?

Tbh, "willing to sound like an idiot to double check assumptions" is probably something worth selecting for! I don't think that saves this question, though.

Re: Steve Ballmer's incorrect binary search interview question

#215
If Ballmer asks me this question then I would obviously take it - expecting and hoping to lose. I would then guess the worst possible answers just so I’ll have a story to tell my grandkids how a billionaire fleeced me out of a few bucks while deciding the trajectory of my career. /s

Re: Steve Ballmer's incorrect binary search interview question

#216
post #208

Earlier quoted context omitted.

The way I read it:they inserted the manager as a litmus test AGAINST aggression / toxic culture. Kind of like when a psychology test is given, the __thing__ they're trying to measure is always one level removed / abstracted to avoid subjects gaming the system. I suppose deceptive practices in interviews don't bode well, but I could see the argument given the interviewee could be deceptive (something that this site co…

I think the point is that deliberately trying to piss someone off and annoy them is a super childish and ridiculous thing to do and is indicative of a place I wouldn't want to work. Interviewing is already stressful and terrible enough without deliberately being antagonized. Most people are not going to go off on someone doing this, they're just going to be turned off by the entire process and decline to go forward t…

those adjectives describe the minimum of what id expect a worker to be able to handle if hes being paid the big bucks

Re: Steve Ballmer's incorrect binary search interview question

#217
I once had a colleague who had a favourite interview question, it had something to do with graph data structure and would always ask the question, many times candidate would reply and get rejected, strangely enough after a while all those candidates who replied got rejected. So we all gathered around him to work through what questions he was asking. We got to this question, and working with him on this question for a while we realised his solution to his own problem was wrong.

Turns out he was using this one question to reject people his whole career.

It was a humbling experience to all of us, to recheck everything before we asked questions. Most of the candidates you interview are perfect hires. Some times its you who is wrong.

Re: Steve Ballmer's incorrect binary search interview question

#218
post #134

Earlier quoted context omitted.

They don't know what the interviewer wants to hear. There are places where every admission of not knowing something is held against you.

If the employer would hold that against you, it's not a place I'd want to work. Not sure about you.

FAANGs are notoriously famous for having one bad feedback rule. That is, if even one interviewer feels you didn't answer their question they reject you.

So it looks like all the top paying places interview this way.

Re: Steve Ballmer's incorrect binary search interview question

#219
post #218

Earlier quoted context omitted.

If the employer would hold that against you, it's not a place I'd want to work. Not sure about you.

FAANGs are notoriously famous for having one bad feedback rule. That is, if even one interviewer feels you didn't answer their question they reject you. So it looks like all the top paying places interview this way.

I guess part of what they're paying for is your tolerance of this BS then. Only you can decide if you think it's worth it.

Re: Steve Ballmer's incorrect binary search interview question

#220

Earlier quoted context omitted.

> How on earth does that indicate if a junior frontend dev can do their job or not? Playing devil's advocate, maybe a junior frontend dev that doesn't trust that they understand what someone is asking for and pushes back on bits that should be obvious will perform better (in some contexts?) than one that doesn't. For a junior role in particular, though, it really doesn't seem like that should be the threshold and it…

I hear what you’re saying, but really, this is a stupid question and a waste of everyone’s time. Instead you could give a real big report that has insufficient information or that contains a red herring to an improper assumption. The interviewer could then measure if the candidate properly pushed back, exposed an improper assumption and asked relevant clarifying questions. Like one would do at the actual job exhibiti…

Not just that, but the person said they did ask the interviewer what kind of car it was and what it was used for, at which point any reasonable person would explain it was a toy!

That interview question is basically, "We lied about an imaginary situation and were disappointed you failed to accuse us of lying mid-job interview."

Post reply on HN