Live data from Hacker News

A Wretched Google Interview Experience

symbo1ics.com

51–60 of 359 posts

Re: A Wretched Google Interview Experience

#51

Just playing, but "If you have n servers that take requests, and server Sᵢ can take a request every tᵢ seconds, and you need to distribute requests to them as efficiently as possible, how do you do it?" can be done very easily in Go. You have a shared channel which contains the pending requests, and a goroutine per server that simply loops doing: read from the shared channel, perform the request, wait for the sleep p…

Not to throw water on your thought process, but the abstraction you describe is hardly unique to Go. It's called a "semaphore", and has been pretty well described and implemented for several decades now.

Re: A Wretched Google Interview Experience

#52
post #33

Does anyone know a good answer for the RealTimeCounter question?

- have a counter for every bigger interval asnd the last timestamp If the timestamp is same second as last increment everything, if not increment where appropriate and rotate everything else to 0. What am i missing?

My reading of the API is that getCountInLastSecond returns the count from the last billion nanoseconds, not the count from the previous second bucket (as the clock ticks).

So when he mentions he can't bound memory, it's because he can't easily discretize the counters.

Re: A Wretched Google Interview Experience

#53
post #6

So, did you not sign the NDA where you agree not to discuss the content of the interviews, or are you just throwing caution to the wind here?

"If you have something that you don’t want anyone to know, maybe you shouldn’t be doing it in the first place"

Re: A Wretched Google Interview Experience

#54

Just playing, but "If you have n servers that take requests, and server Sᵢ can take a request every tᵢ seconds, and you need to distribute requests to them as efficiently as possible, how do you do it?" can be done very easily in Go. You have a shared channel which contains the pending requests, and a goroutine per server that simply loops doing: read from the shared channel, perform the request, wait for the sleep p…

Yes, but how does Go do it.

Google is probably more interested in hiring people who can answer that rather than your answer.

"There's a library for that" is a great answer for 99.9% of businesses out there, but google's problems aren't that of the 99.9%. (Nor in fact are they in the 99.9% of the remaining 0.1%)

Re: A Wretched Google Interview Experience

#55

Just playing, but "If you have n servers that take requests, and server Sᵢ can take a request every tᵢ seconds, and you need to distribute requests to them as efficiently as possible, how do you do it?" can be done very easily in Go. You have a shared channel which contains the pending requests, and a goroutine per server that simply loops doing: read from the shared channel, perform the request, wait for the sleep p…

And that solution is isomorphic to the one the interviewer was looking for, where you put the requests in a priority queue keyed by their finish time and pull out the next one that'll be done. The only difference is that the priority queue in question is hidden in Go's scheduler.

The reason interviewers ask these questions is so they get a sense of whether you'd be able to implement Go, starting from first principles. (Or actually, it's because before Go many servers and load-balancers were written in C++ using async callbacks, and so this is a very pragmatic question that comes up a lot in real-world usage.)

Re: A Wretched Google Interview Experience

#58

I think this is very unfortunate. I've seen a lot of good candidates get rejected for no obvious reasons. The lack of communication seems driven I think by the sheer deluge of the number of resumes/interviews going on at Google, and what appears to be, a reliance on temps and contractors as part of the process. I had a friend who interviewed at Google, who is an excellent software engineer I've worked with for years,…

Why don't more people walk out of interviews? Especially if someone set you up to fail, quite literally: interviewing for the wrong job. It's a waste of my time, it's a waste of your time as a company. On top of that, if you're going to throw out dickish comments like the article states (paraphrase: "ask your friend, he'll know the answer"), I wouldn't stick around. Is that the atmosphere at the company? Agree or dis…

"Why don't more people walk out of interviews?"

They freak out. I got blacklisted at a cellphone company for doing that a couple decades ago. I found that out via a friend on the inside. Basically I was looking for, and applied to get a lab bench job (basically a spectrum analyzer / communication analyzer jockey, beneath my ability, but it was an exciting growing company etc) and they wanted me to be a junior roving field tech, basically I'd help the real field techs carry heavy stuff into the building and then (literally) mow the lawn while the real tech worked. And I went to school for X years to run a lawnmower... uh huh...

If you think its mortifying for the candidate, imagine how the HR rep looks when you walk out, thus making a fool out of them. Note that I wasn't sarcastic or caustic or anything when I left, after all, I had lots of friends / acquaintances on the inside and telecom is a very small world. Lots of hand shaking and "you have a nice facility here but I'm not interested in the position" and so on. I got word from my inside contacts that the HR girl was fuming with rage and swore after I made a fool of her by walking out, that my resume would never pass her desk again in any capacity, etc.

Companies are always doing stupid stuff, just hopefully not too often, and they're at least partially interested in how you'll respond. So imagine you work there and someone in upper management makes the worlds dumbest presentation to the division, they're terrified you're going to laugh at them and walk out.

When I was younger and (even more) stupider, stuck at an interview I decided I didn't really want, I started flirting with the attractive HR staffer, which didn't work out, but it was fun at the time. Times were different back then, now a days politely asking a woman out at work would probably get you fired or arrested.

Re: A Wretched Google Interview Experience

#59
To counter some of the negative sentiment here, I had a great interview experience at Google. The only big negative was that the whole process took 5 months. But every step involved was very organized and the people were professional and thoughtful. The in-person interviews were also great and the questions were all appropriate. I did not take the offer for personal reasons at the time, but the process was great (except for those 5 months). As with all big companies though, there is a bit of luck of the draw involved, as the other stories in this thread show.

Re: A Wretched Google Interview Experience

#60
post #11

From those questions, it sure seems like their interview process is aimed at choosing among recent grads whose resumes are all essentially the same "B.S. Computer Science from School X".

That's what they tell people too. It's great if you just graduated from a formal CS program because the algorithms stuff is fresh in your brain. Whereas working 5-10 years in a boring bigcorp, doing CRUD apps will kinda make you more "dumb"

I hate this so much. The interviewer must realize how strange this is when he/she has to brush up on questions they're about to ask a candidate for a similar position to their own.
Post reply on HN