Live data from Hacker News

My Startup Job Interview

blog.galler.io

71–80 of 108 posts

Re: My Startup Job Interview

#71
post #4

What was the closed form expression for the number of rabbits?

I'll give it a try...

The number of rabbits at the (i+1)'th step is equal to the number of rabbits at the i'th step minus that one rabbit which is /maybe/ being eaten. And the "maybe" I think can be quantified as the probability the Troll has to find a rabbit at the i'th step. So:

R_(i+1) = R_i -1 * P(Troll finds a rabbit)

And now we have to calculate the probability of the event "Troll finds a rabbit" (i'll call it event A). There are 2 cases: * the Troll falls into a black hole (btw, i'm gonna assume the blackholes teleport to any cell with uniform probability); * the Troll does not fall into a black hole;

I'm going to call these two events B and not(B).

So:

P(A) = P(A given B) + P(A given not(B))

Well, P(A given B) is the probability that Troll is being teleported to a cell with a rabbit in it, that is number of rabbits over number of cells: R_i / (nm)

P(A given not(B)) is the probability that Troll will step on a rabbit in a nearby cell which is: rabbits' density over 8: R_i / (8nm)

So:

R_(i+1) = R_i - ( R_i/nm + R_i/8nm ) = R_i * ( 1 - 9/8nm ) = ... iterating ... = R_0 * ( 1 - 9/8nm )^i

R_0 being the initial number of rabbits. I'm not sure all this is correct, but that formula confirms the following intuitions: * The number of rabbits is monotonically decreasing at every step; * The bigger the grid, the slower the decrease.

edit: The closed formula would be:

int numOfRabbits(int numOfSteps) {

    if (numOfSteps == 0) return R_0;

    else return R_0 * (1 - 9/8nm)^(numOfSteps-1);

}

Re: My Startup Job Interview

#72
post #27

Earlier quoted context omitted.

[deleted]

You sound like a real blast to hang out with. Perhaps we can exchange telephonic-network details and beep at each other on the phone. That is, if your protocol handshake is functioning in a timely fashion. My buffer has strict timeout definitions of two signals and then I will reset the network line, wait for the dial tone, and try again precisely 15:00 standard earth minutes later. Please encode any further communic…

[deleted]

Re: My Startup Job Interview

#73
post #2

A guy in a shirt, a guy in a polo, and an Asian lady. Why not a lady? Not calling you racist, but it is interesting how the race of non-whites seems to be included in some manner like it is always relevant. Why not mention the race of the two other people? Is it less relevant? You only mention the lady once. What role did she play in the situation? Just curious.

It's story telling; trying to tell a good story with the use of certain specific descriptions the author feels reflect the environment. The use of 'Asian Lady' invokes imagery of a stoic, calculating, strictly business and slightly mysterious entity, which may or may not exercise some large degree of control over the situation.

Re: My Startup Job Interview

#75
post #2

A guy in a shirt, a guy in a polo, and an Asian lady. Why not a lady? Not calling you racist, but it is interesting how the race of non-whites seems to be included in some manner like it is always relevant. Why not mention the race of the two other people? Is it less relevant? You only mention the lady once. What role did she play in the situation? Just curious.

That actually stood out to me as well, but I disagree with the others that the detail was meaningless. Of course, the detail we choose to convey has very specific meaning, sometimes unintentionally. The point of "asian lady" does paint a specific picture, but to me it conjures an image of an older, motherly/grandmotherly image (no one refers to a woman in their age/social/cultural group as 'lady' these days). The point was likely to describe a very unusual group of people: "Two Daves, one in a T-shirt, and an [old] Asian lady". The lack of racial details of the Daves indicates that they're the typical archetype of a young startup programmer. They could essentially be any race, so it didn't matter to point it out. The asian lady was meant to be the oddball, so that specific detail was necessary to paint that picture.

Re: My Startup Job Interview

#76
post #44

Earlier quoted context omitted.

Uh, then count me among those who don't get it.

Me too. Just after reading redfhendrix comment that I actually realized "Oh... indeed". I read it first as a description, not satire.

No, I really don't get it. It doesn't seem that unlikely to me that some goofballs somewhere would actually push interview code to production, I have come pretty close to that situation myself. (Not saying it's a good idea, just that it could happen)

Re: My Startup Job Interview

#77
post #2

A guy in a shirt, a guy in a polo, and an Asian lady. Why not a lady? Not calling you racist, but it is interesting how the race of non-whites seems to be included in some manner like it is always relevant. Why not mention the race of the two other people? Is it less relevant? You only mention the lady once. What role did she play in the situation? Just curious.

It's story telling; trying to tell a good story with the use of certain specific descriptions the author feels reflect the environment. The use of 'Asian Lady' invokes imagery of a stoic, calculating, strictly business and slightly mysterious entity, which may or may not exercise some large degree of control over the situation.

[deleted]

Re: My Startup Job Interview

#78
post #72

Earlier quoted context omitted.

You sound like a real blast to hang out with. Perhaps we can exchange telephonic-network details and beep at each other on the phone. That is, if your protocol handshake is functioning in a timely fashion. My buffer has strict timeout definitions of two signals and then I will reset the network line, wait for the dial tone, and try again precisely 15:00 standard earth minutes later. Please encode any further communic…

[deleted]

[deleted]

Re: My Startup Job Interview

#79
post #5
post #2

A guy in a shirt, a guy in a polo, and an Asian lady. Why not a lady? Not calling you racist, but it is interesting how the race of non-whites seems to be included in some manner like it is always relevant. Why not mention the race of the two other people? Is it less relevant? You only mention the lady once. What role did she play in the situation? Just curious.

Good storytelling. One quick detail per person sends the reader on the path to creating their own imaginary picture.

I do understand that. It is a good technique to use. But my question is: Why mention the fact that the lady was Asian, when she is not mentioned again in the story? I feel that providing the extra detail without further involving the character takes away from the story. What does the Asian lady do in the scenario? Does her being Asian somehow influence? People from some Asian countries are very polite and reserved. Did that influence the interview in some way?

Its as if I wrote the following:

John, Mike, and a white man sat down in my table. We all talked about our trip to Disney Land. Dinner was fine, except for the fish. It was over cooked. Mike sent it back to the kitchen, and they prepared another one. Afterwards, we went to the local arcade. Where a mean game of Galaga was played. John, as always, had the high score. I was not as lucky. The score was affected by my bad sleeping habits. Ever since starting this new job, I simply cannot fall asleep as easily as before.

Post reply on HN