Live data from Hacker News

I had to give a wrong answer to get the job (2017)

dewitters.com

371–380 of 409 posts

Re: I had to give a wrong answer to get the job (2017)

#371

Earlier quoted context omitted.

Years ago the did an experiment in Germany (I know, a one time test with 2 cars/drivers is more or less anecdata). The task was to drive from Duesseldorf to Munich. Two identical cars, two very experienced drivers. one was told to go as fast as possible without breaking speed limits on the way (we don't have a general speed limit on the German Autobahn (highway)) tthe oother ro drive at a relaxed 120 km/h were possib…

Counter anecdata. I monitor my heartrate (along with other relevant statistics like speed, distance, elevation, and barometric pressure) while engaged in activities like mountaineering. Even when I'm not physically straining myself but just carefully traversing an exposed face, I don't consider a raised heartrate there 'less healthy' in and of itself because it's a side-effect of the excitement I'm feeling, and that…

[deleted]

Re: I had to give a wrong answer to get the job (2017)

#372
post #259

I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…

I bet they weren’t as dumb as you think and you were passed on for being stubborn and drunk on ego. Of the many scenarios where amortized complexity is not okay, code in a tight loop where predictable performance is key, e.g. code running game logic, jumps immediately to the top of the list. The fact that you were unable to incorporate this into the conversation makes me suspect you were more interested in putting on…

If they were not dumb, they would've explained him why amortized complexity is not suitable measure for their application.

If they were not dumb, they would definitely understand what he was saying and not sit clueless.

Re: I had to give a wrong answer to get the job (2017)

#373

Earlier quoted context omitted.

If your data structure is immutable, then an array is always faster than a linked list.

Immutable doesn't necessarily mean unchanging in the context of data structures. An immutable data structure can support adding, removing, and/or changing the data but the way it does it is in such a way that once data is created it isn't modified until it is completely unused and unreferenced. So an immutable data structure has the benefit that data stays the same and stays the same in memory so it can be shared whe…

Isn't that a persistent DS and I thought OP mistook it for immutable-at-memory-level data structure.. like an array you create once but read many times from..

Re: I had to give a wrong answer to get the job (2017)

#374
post #162

I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…

In game dev, that one copy might cause a frame drop. Even if amortized over time the frame rate would be slightly higher, the occasional dip might make it unplayable. Of course, arrays have better cache locality, but they didn't ask about that. They were probably looking for a linked list with a small array in each node, which gives more constant write performance and less cache misses on read.

If they had the clue what they were asking about, wouldn't they have corrected GP? "No dude we can't have that worst case here in game dev!!". But they asked about algo complexity and couldn't recognize GP was talking about amortized complexity, something sounds wrong.

Re: I had to give a wrong answer to get the job (2017)

#375
post #261

Earlier quoted context omitted.

Haha amazingly there’s a chance I interviewed you, or you interviewed with my company when we were first rolling this out, or another company was also using the same question. I remember the idea was to make the analog like one of those analogs that didn’t move continuously but ticked at every sixty second interval. So it never needed to be in between minute ticks. Lots of us didn’t fully understand the question when…

For the record. Most analog clocks have smooth motion for minute and hour (for the precision of the gearing). Its the second hand that ticks.

Interesting, the one I have moves the minute hand about 5 times per minute or so, rather than being continuous.

Re: I had to give a wrong answer to get the job (2017)

#376

I was once asked to write a function that, given the time, draw an analog clock. Given the nature of the position I was applying for, this wasn't an unreasonable question. I wrote something on a whiteboard. What followed was the most surreal discussion I've had in an interview. My function took into account the seconds, minutes and hour for the hour hand, and so on. Just like a normal clock would. The interviewer ins…

Ugh. This reminds me of when I interviewed with Google some years ago. It's a somewhat long and boring story, but basically, it was a distributed map-reduce problem. I clearly stated my assumptions and asked for clarification/confirmation so we could disambiguate. The interviewer and I were very clear what he was asking and what I would be answering. So I proceed to answer the question, describing what I was doing an…

But everyone loves FAANG

Where would you want to work?

Re: I had to give a wrong answer to get the job (2017)

#378
post #259

I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…

I bet they weren’t as dumb as you think and you were passed on for being stubborn and drunk on ego. Of the many scenarios where amortized complexity is not okay, code in a tight loop where predictable performance is key, e.g. code running game logic, jumps immediately to the top of the list. The fact that you were unable to incorporate this into the conversation makes me suspect you were more interested in putting on…

I'll add the really correct but stubborn answer. It's a game, why are we allocating memory?

Working in for example Unity I need to not ever allocate anything per frame if I can help it (and then knowing other gotchas such as that foreach and/or getting the .Count on a list will also cause memory to be allocated).

Re: I had to give a wrong answer to get the job (2017)

#379

Earlier quoted context omitted.

Exactly this. When I interview people, I also consider it a HUGE red flag if I can't get the interviewee to say "I don't know" at some point.

This may be a little naive, but what if your expertise runs out before theirs? It’s not unthinkable that a candidate has more depth in a field than you do. I remember asking a friend once if he could answer any Tolkien question, and he answered that he couldn’t answer everything, but the stuff he couldn’t answer, I didn’t know the right questions for.

> what if your expertise runs out before theirs?

I'm always hopeful that the person I'm interviewing is more capable than I, and they very often are. But there's an interesting thing: the more expert a person is, the more willing they tend to be to say "I don't know" (often rapidly followed by informed speculation and a comment about how they would find out). Combining that with the fact that true experts usually prefer to operate at the limits of their knowledge means it's not hard to get such a candidate to say "I don't know".

It's certainly not necessary to operate at the same level as a person to get them to operate at the limits of their knowledge and ability. In fact, relatively inexperienced people have a knack for asking those "naive" questions that lead into very deep pools.

Edit: I should also mention that my interview style is not in the form of a quiz. It's a conversation. I think that makes a difference as well.

Re: I had to give a wrong answer to get the job (2017)

#380

There's not a lot of context given about the behaviors exhibited in this interview, but as many others here have said, red flags abound in this anecdote. > But the problem was, that this guys manager was sitting next to him. If he didn’t know, I would totally humiliate him in front of his boss. So either he would stick to his guns and refuse the correctness of my answer, to save face. Or he needed to agree that he wa…

So I worked there for a few months, and the team and team lead were awesome. But the manager and whole management team not so much. It was a very political environment where the team lead and anyone at that or higher level needed to cover their asses with emails etc.

So it was actually good that I didn't raise this issue.

One thing I remember at that place was that the team lead was on holiday, and the manager took over. But some release went wrong because the manager made some fault. He was able to turn this story around that the team lead messed up right before his holiday, and that he, the manager, had to step in to fix the situation. Oh boy.

Post reply on HN