Live data from Hacker News

Facebook Lost a Great Engineer

medium.com

51–60 of 64 posts

Re: Facebook Lost a Great Engineer

#51
post #35

Is it possible that the look of distain on his face when the interviewer asked him to solve a puzzle indicated that he wasn't a good fit for their "puzzle culture"? I don't think it's fair to conclude he didn't get the FB job due to his failure to write a square root function. The funnier part is that this question isn't a puzzle (but does perhaps indicate how well the interviewee has internalized mathematics). I sus…

I actually did solve the square-root function problem, but I suspect too quickly because I did it from rote memory.

I am fairly objectively the sort of programmer they would want in the sense they seemed to be selecting on.

> This article is obviously somewhat over-stated. However, good programmers are aware of what they know and what they don't know, and maintaining a sense of imposter syndrome forever is somewhat counter-productive.

Re: Facebook Lost a Great Engineer

#52
"which merges two sorted arrays without allocating any additional memory. Aside from having no real-world value, it's not actually possible, and his solution code clobbered most of the data in the first array."

This is referring to me.

The author has misrepresented the truth.

(1) The problem does not state that you may not allocate additional memory; only that the memory allocated must be constant relative to the size of your input.

(2) Given #1, this problem is absolutely possible.

(3) The problem explicitly asks you to merge the two arrays "in place". If by "clobbered" you mean changed, then that means that by definition one of the arrays will be "clobbered". We can certainly have a separate conversation about whether modifying structures in place is a good coding practice, but it is generally more efficient and highly widespread in non-functional languages.

I'm sure it wasn't purposeful, but I'm disappointed that the author misrepresented our conversation to make a point. Separately:

(4) This problem is extremely applicable to real-life programming IMHO. It does not use any esoteric data structures. It does not use any complicated algorithms. All you need to do is iterate through two arrays at the same time. A great majority of candidates have solved this problem.

In general I agree with this post's thesis. Facebook's general philosophy with interviews is to allow each interviewer to ask whatever questions they want, and the consequence is a variance in the type of questions getting asked. However, based on internal conversations I know that Facebook is trying to move away from "puzzle" questions by explicitly "retiring" a number of questions that we consider to be unproductive.

Re: Facebook Lost a Great Engineer

#53
Tyler, I have two things to say about this.

1°) I think you don't get it: when you're Facebook, Google or any other company receiving and interviewing thousands of candidates for a job, you're having a different hiring strategy than a small startup. Their strategy is "hiring a bad programmer costs us more than rejecting a good one". So they tend to reject good programmers, but they mostly reject bad programmers. In the end: they only hire good programmers, and that's what matters. In contrast, startups are having the "it costs us more to reject a good programmer than to hire a bad one" strategy. So they hire more easily, most of the time, even if in the end they hire average/bad programmers, they don't care.

2°) I was interviewed for a front-end job at facebook, and I didn't get in. I think I'm not the best programmer around, but I'm okay, and I would do a great job at facebook. And just so you know : my first interview question was way way way harder than any of your questions. I think those puzzles are a good way to spot good programmers amongst thousands of good/average/bad programmers. I'll give you a really simple example: find the highest number in an array. You can find it using several different ways, but if you just go through the whole array, you might be a good programmer, but the next person I'd interview might be one too, and he will find it with a much lower complexity. I'd hire him. Simple as that.

Bottom line — here's the question I was asked at facebook : you have a matrix of letters, and you have to find all the words you can do with it. For a front-end/product design job. And I'm not posting an article saying they suck at hiring.

Re: Facebook Lost a Great Engineer

#54
post #32

Earlier quoted context omitted.

In my honest opinion, the way it can be improved is exactly the way my interview last Friday went: I walked in, and did the introductions. I had two programming problems to solve, but these weren't puzzles. The two questions were fairly simple, that used a lot of basic features of the language they use in this shop. The first question I couldn't remember the exact function names in the standard library (it's PHP, the…

I see "culture fit" mentioned so much, but I'm never sure what it actually means. There are many things it could mean, some OK and some downright immoral. So purely for my elucidation, what does culture fit mean to you in this situation?

To me, it's about how my personality meshes with that of the team; How my approach to problems correlates with their expectations. Does that make sense?

Re: Facebook Lost a Great Engineer

#55

Well, the OP statement "write a function which merges two sorted arrays without allocating any additional memory. Aside from having no real-world value, it’s not actually possible" seems strange. Ok, any real-world usage might be applicable only in embedded systems which is a fairly narrow domain. Still, it is a small (easy to describe) problem that can be used to see how the applicant does problem solving for proble…

The issue is merging the arrays, not sorting them. How do you MERGE two arrays without allocating a new one that is big enough to contain them both? If all you need to do is print what the result of the merge would be then sure, a solution does exist.

Merge them in-place - if the inital array A had 400 items and array B 600 items, then put the sorted first 400 items in original array A and the last 600 items in array B.

For any practical purpose that's as good as a contiguous array, and in embedded systems you might even make so that the initial two arrays are already contiguous in memory.

Re: Facebook Lost a Great Engineer

#56
post #33
post #13

Earlier quoted context omitted.

It looked like it was a simple L-system to me... V : 1 2 ω : 1 P : (11 -> 21) (2 -> 12) (1 -> 11) I think that matches the information given in the question. Would that be an "incorrect answer"?

According to wikipedia[1], the sequence goes 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, ... [1] http://en.wikipedia.org/wiki/Look-and-say_sequence

The whole point is that the provided data supports many different completely valid sequences - unless that specific 'look-and-say' is very common in the company problem domain, there are multiple valid answers.

That's an issue with any sequence-style problems.

Re: Facebook Lost a Great Engineer

#57
post #54

Earlier quoted context omitted.

I see "culture fit" mentioned so much, but I'm never sure what it actually means. There are many things it could mean, some OK and some downright immoral. So purely for my elucidation, what does culture fit mean to you in this situation?

To me, it's about how my personality meshes with that of the team; How my approach to problems correlates with their expectations. Does that make sense?

It does and that's what I generally understood it to mean. The problem to me is that its so vague that it serves as a blanket justification for denying someone employment based on "gut feeling" or other basically discriminatory practices. It seems like it can also include "is willing to be in the office 12 hrs a day because he has no home life". No one would actually codify this in writing, but I have a feeling these are the types of filters that fall under "culture fit".

Some will (largely correctly) say that if that's the filter they use against me then I wouldn't want to work there in the first place. The problem is that it allows these types of discrimination to feel justified because we all discuss them under the euphemism "culture fit" instead of calling them exactly what they are: blatant discrimination. Personally I think if you have a filter that you would use to disqualify someone, you should be willing to state it plainly.

Re: Facebook Lost a Great Engineer

#58
post #52

"which merges two sorted arrays without allocating any additional memory. Aside from having no real-world value, it's not actually possible, and his solution code clobbered most of the data in the first array." This is referring to me. The author has misrepresented the truth. (1) The problem does not state that you may not allocate additional memory; only that the memory allocated must be constant relative to the siz…

This is a slightly awkward friendship you have with the author of the post.

Re: Facebook Lost a Great Engineer

#59

Tyler, I have two things to say about this. 1°) I think you don't get it: when you're Facebook, Google or any other company receiving and interviewing thousands of candidates for a job, you're having a different hiring strategy than a small startup. Their strategy is "hiring a bad programmer costs us more than rejecting a good one". So they tend to reject good programmers, but they mostly reject bad programmers. In t…

Without any other information, how can you possibly implement max() without going through the whole array?

Re: Facebook Lost a Great Engineer

#60
post #58
post #52

"which merges two sorted arrays without allocating any additional memory. Aside from having no real-world value, it's not actually possible, and his solution code clobbered most of the data in the first array." This is referring to me. The author has misrepresented the truth. (1) The problem does not state that you may not allocate additional memory; only that the memory allocated must be constant relative to the siz…

This is a slightly awkward friendship you have with the author of the post.

Don't worry, I promise we're actually homies ;)

We talked it through and he removed the part that bothered me. I'm actually gonna hang out with him tonight...

Post reply on HN