Live data from Hacker News

My Job Interview at Google

catonmat.net

31–40 of 114 posts

Re: My Job Interview at Google

#32
post #16

What are the likely reasons that he did not get hired? Seems like a brilliant programmer, but for whatever reason that wasn't enough.

I'm curious too. I've enjoyed his blog posts ever since they first appears on Hacker News.

Re: My Job Interview at Google

#33
Worry not, take that as an opportunity. I'm sure you're a talented hacker. I've been reading your articles and I guess you like to learn a lot on your own. Match made in heaven for a startup guy. I sense that had you been employed by Google you might have left it after some time to start something on your own. Why not now :)

Re: My Job Interview at Google

#34
post #27

Earlier quoted context omitted.

They ask common questions as a proxy for experience in those fields. If you work with something daily, you will end up memorizing certain facts even if you don't consciously try to. It follows, then, that if you don't have those facts memorized, you haven't been working with that technology daily.

I stopped memorizing syntax a long time ago. It's been a few years and an the only thing I can recall about C's pointer syntax is ^ and & but the specifics are long gone. Not that long ago I had to look up the conditional shorthand (expression)? true: false in java etc. I have used around 12 different languages and I try and forget the stuff I am not using or I will mix and match syntax that does not work for the lan…

It's actually * and &. ;-)

Don't interview for positions in languages you've forgotten, then, or brush up and re-learn stuff before the interview. It's like riding a bike...it comes back to you.

Not being able to remember pointer syntax is a serious problem if you're being hired to program in C. I can understand why they'd want to weed out anyone who can't get that, particularly given how many candidates they have.

Re: My Job Interview at Google

#35
post #27

Earlier quoted context omitted.

I stopped memorizing syntax a long time ago. It's been a few years and an the only thing I can recall about C's pointer syntax is ^ and & but the specifics are long gone. Not that long ago I had to look up the conditional shorthand (expression)? true: false in java etc. I have used around 12 different languages and I try and forget the stuff I am not using or I will mix and match syntax that does not work for the lan…

It's actually * and &. ;-) Don't interview for positions in languages you've forgotten, then, or brush up and re-learn stuff before the interview. It's like riding a bike...it comes back to you. Not being able to remember pointer syntax is a serious problem if you're being hired to program in C. I can understand why they'd want to weed out anyone who can't get that, particularly given how many candidates they have.

lol, thanks. I could have said x[i] is the same as ^(x + i) and really thought that was the correct syntax. The problem is I have used enough languages and dialects that I really can't brush up on it all. I just say if it's been five years, let me break out my cheet sheet for that stuff.

PS: Ok, if it was really just a C job of course I would focus on that.

Edit: Dammit it is like riding a bike. I have been having C flashbacks to horrible old code. O Malloc how do I hate the let me count the ways.

Re: My Job Interview at Google

#36
Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7."

First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

Re: My Job Interview at Google

#39

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

The elegant solution escapes me for now, but you could treat the odds and evens from the 1-5 function as a biased bit stream, apply a von Neumann corrector and then use the resulting stream.

Re: My Job Interview at Google

#40

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

Execute f 7 times, add all numbers, call that x. Then you do mod(x,7)+1, and you get a random number between 1 and 7. If the original function was unbiased, this one is going to be unbiased too.
Post reply on HN