Live data from Hacker News

That time when I failed the Microsoft interview

ochagavia.nl

221–230 of 324 posts

Re: That time when I failed the Microsoft interview

#221
post #90

My favourite interview question that I received was when I was asked to write code that would serialize/deserialize a binary tree and was told it was fine to use "any programming language". They received a crash course in the power of Haskell ADT and `deriving (Show, Read)`.

https://aphyr.com/posts/340-reversing-the-technical-intervie...

I like the next blog post even more: "Hexing the technical interview" [1]

[1] https://aphyr.com/posts/341-hexing-the-technical-interview

Re: That time when I failed the Microsoft interview

#222

Once long ago when I interviewed at Apple I was asked the classic "fork in the road, two guys, one always tells the truth and one always lies" riddle, with complete earnestness as far as I could tell. Possibly the single worst interview question I've ever been asked. Of course I told the interviewer I'd heard it before and then gave the correct answer. In my case we just ended up chatting about previous experience in…

I have no idea and want the answers: Boat + bowling ball = level stays the same? Ball roll = the constant gradient is quickest?

Boat + bowling ball => level drops.

1) Imagine pushing the boat down into the lake, displacing water. The level would go up.

2) Imagine the ball instead of being in the boat, is attached under the boat by a rope. Same thing. (Imagine it magically moving through the bottom of the boat - it has no impact on the boat or water level).

3) Imagine you cut the rope. The ball will fall, and the boat will bob up. Water level goes down.

Re: That time when I failed the Microsoft interview

#223
My most interesting interview experience, but as interviewer not interviewee, was when we interviewed someone by phone and could hear a friend of the candidate whispering answers to him. He was not offered a job. We should have offered it to the mystery voice person.

Re: That time when I failed the Microsoft interview

#224

> You have 12 marbles and a balance scale. One of the 12 marbles is inconsistent with the others, meaning it could be heavier or lighter than its peers of normal weight. You are allowed to use the balance scale exactly 3 times to identify which of the 12 marbles is irregular AND determine whether it is heavier or lighter than normal. I also got this riddle, in 2015. I couldn't solve it. Tbh, I think it's a terrible q…

Probably explains why Microsoft hasn't made a good product in...as long as I can remember. It's all shibboleths and gate-keeping.

A lot of people rave about VS Code. Also, TypeScript. Also, open source re-write of C# (Project Roslyn?). All excellent products.

Re: That time when I failed the Microsoft interview

#225
post #81

Just don't ask brain teasers when you conduct an interview; I believe they give no valid signal at all, and I also believe Microsoft does not ask them anymore. The coding questions that require an "aha!" moment are very similar to brain teasers, and should also be avoided. When I conducted interviews for FAANG, I asked somewhat simpler coding questions, something around DFS and/or topological sorting (without calling…

> The coding questions that require an "aha!" moment are very similar to brain teasers, and should also be avoided. I remember an MS interview I failed in 2015 or thereabouts: As part of the interview, they asked "how would you find the kth element from the end of a singly-linked list in the shortest time", and they strongly implied that size() followed by counting forward was not what they were looking for, and that…

The interviewer probably learned the trick with two pointers and wanted to see you implement it, for no real reason. This question, just like it's well-known sibling question "check if the linked list has a loop", has absolutely no practical applicability; no one will ever want to find k-th element from the end of the linked list, it's just not the right data structure for this kind of task: it's better to use an array or a double linked list if you need to do this operation often.

Re: That time when I failed the Microsoft interview

#226
post #60

Earlier quoted context omitted.

>It’s an information theory question similar How would you approach it from an information theoretic sense?

In the initial state there's 24 (12 * 2) different possibilities: The marble you're looking for is one of 12 and it's either lighter or heavier. By using a balance scale there's 3 possible outcomes (left side is heavier; right side is heavier; same weight). This means that for your last (third) weighing you'll have to have reduced the problem down to 3 (or fewer) different possibilities. If there's 4 or more there's…

Now that you spell it out, I guess this just binary search. You need O(log n) weighings because each weighing splits the search space in half. So I was wrong it’s not an information theory question, it’s just comp sci algorithms. I got my college classes mixed up (it’s been 14years)

Re: That time when I failed the Microsoft interview

#227
post #132

Once long ago when I interviewed at Apple I was asked the classic "fork in the road, two guys, one always tells the truth and one always lies" riddle, with complete earnestness as far as I could tell. Possibly the single worst interview question I've ever been asked. Of course I told the interviewer I'd heard it before and then gave the correct answer. In my case we just ended up chatting about previous experience in…

Here a few additional teasers, - How many golf balls fit into the plane - How many gas stations exist in country (or alternative version with city ) - How many turns do you have to go on a gum machine until colour comes out? Naturally they all evaluate properly the skills required for the job, and other professions get asked the same kind of stupid questions. Unless it is for a position I really, really want, or are…

Having had to estimate peak user traffic patterns, bandwidth usage, etc. for continent-scale services, Fermi estimation questions (https://en.wikipedia.org/wiki/Fermi_problem) are excellent questions for people working at the largest scales. Even if the guessed inputs or formula for the estimate are imperfect, being able to bang out an approximate formula that can brought out for discussion with peers and refined into something that can be agreed upon as a target is extremely valuable. It's not a useful skill for everyone but for those aspiring to be more than a mere coder, it's worth knowing.

Re: That time when I failed the Microsoft interview

#229

Earlier quoted context omitted.

> I totally suck at meetings where the goal of the meeting is to make sure that everyone feels like their voice is being heard. Those are the worst. No, I don’t feel like I need to let Bob feel heard. Bob wants to create a nightmarish stack involving ElasticSearch and Kafka for a problem that grep and a flat text file could realistically handle. I have already explained to Bob that his solution is unnecessarily compl…

But is your solution scalable? Resilient against injection attacks? What about o11y? Is literally anyone besides you going to be running these searches? If so, you're going to want to put a UI around it and that means thinking about scalability, data sanitization, and o11y. Maybe Bob knows something about the scope of the problem that you don't? Look mate, software is business and business is marketing. If your solut…

It is not my responsibility to teach critical thinking and a CS degree to Bob, nor is that in my job description. If Bob can successfully convince our boss and finance team that his solution is necessary, then so be it; I will continue banging my head into the wall.

A real anecdote: I once had to explain to other software engineers, during a retro, that the aggregate bandwidth their queries demanded for the result set was far in excess than that of the DB’s capabilities.

“This would’ve required 230 Gbps, assuming the DB could’ve fulfilled it.”

“That’s more than a typical top-of-rack switch.”

“It’d be like filling 69 Blu-Ray discs every minute.”

“Ohhhhh.”

The switch analogy may have gone over their heads, admittedly, but the fact that 230 Gbps on its face didn’t sink in is distressing. Entirely too many devs don’t understand any fundamentals, and as such they can’t do basic back-of-the-envelope calculations, and we wind up with Bobs.

Post reply on HN