Live data from Hacker News

Facebook Lost a Great Engineer

medium.com

41–50 of 64 posts

Re: Facebook Lost a Great Engineer

#41
post #25

Earlier quoted context omitted.

> Or did they actually expect someone to work it out on the spot ? My hope is that they'd hope a candidate would be able to identify the connection to run length encoding within the pattern. Why do these puzzles emerge at big companies? It looks like a sort of institutional power trip emerges: "if you want to work with us, you need to be real good, and these are the sorts of problems we want you to think we deal with…

I think Cletus gave a good answer to why these questions are used in interviews in this post: http://news.ycombinator.com/item?id=5264510 In short, if you can't write a simple FizzBuzz program, then you are probably not a good developer. Questions like these are good for being a quick way to separate programmers from those who cannot program at all. But I agree - as someone who sucks at puzzles under pressure, questi…

FizzBuzz is a legitimate litmus test for a candidate. It probably becomes a bit gauche once you get a bit of experience, however. In that case, I'd expect some sort of domain-specific technical question with some hand-holding to get the candidate talking. The idea is to coax the candidate into the problem.

Re: Facebook Lost a Great Engineer

#42
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

Aye, but the L-system still fits given the amount of data shown in the question. So is the L-system incorrect, because there's no way to disambiguate the sequence given the data?

Re: Facebook Lost a Great Engineer

#43

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.

Here's a solution that merges in place without any sorting: https://gist.github.com/Mononofu/5029975

The basic idea is to use the (unused) beginning of array b as swap space for the beginning of array a. This swap space needs to be shifted around, so it's of course O(n^2). Still, it was fun to write.

If you have termcolor installed ('sudo easy_install termcolor' on ubuntu), you'll see the arrays a and b as well as the swap space highlighted in color for each step. Example: http://dl.dropbox.com/u/2135523/2013022517.png

Re: Facebook Lost a Great Engineer

#44
Rephrase this as "Facebook Lost a Great Developer" and it begins to make sense, especially if Facebook was actually looking for a "Great Engineer".

> I would fire any developer who chose to re-implement standard library functions.

Who writes the standard library functions?

> never parse HTML without a proper HTML parser

Who writes the parsers?

On merging arrays in-place:

> Aside from having no real-world value, it’s not actually possible

It is possible, and has value when dealing with large data sets, which I'm sure is a common issue at Facebook. Here's another way to look at it: "Given two sorted 0.5 terabyte arrays on a terabyte drive, and 1 gb of memory, merge the two arrays without an additional drive."

There's no shame in not knowing or caring about things like this (it takes all kinds), but what the poster does (and seems to be good at) just may not be what Facebook was looking for.

> At the scale of Facebook, I’m exactly the sort of engineer I’d want many of.

Many possibly, but not only.

Re: Facebook Lost a Great Engineer

#45
I hate puzzles too, but that's primarily because I never know the answers :) On a serious note though, it is quite possible that companies use puzzles as a screening technique because they are not looking for you. Specifically, they are looking for not you.

Think about it, a big company needs an employee that would join them and work for at least 18 months in order to pay back the costs of hiring, but preferably stay for 3-4-5 years... as many as years as possible, if this is a good hacker we are talking about. Hiring someone who's likely to leave in 6 months is counter productive for a large company, and puzzles is one way to keep you away.

You'd have to ask someone who was at Facebooks and Googles in their early days and see if the hiring was based on puzzles. I suspect in those times a lot of decisions were made in much similar ways to how you'd want to do it now. Puzzles are not the answer, and large companies would probably agree with you too, but it's a tool that seems to work best for them and it's scalable to achieve a consisten outcome over a long term horizon. Precisely what large companies need.

Re: Facebook Lost a Great Engineer

#46
You did not get the job because of your attitude.

"...I realize I’m a pretty well-rounded and high-performing developer/engineer/architect. At the scale of Facebook, I’m exactly the sort of engineer I’d want many of...."

In my opinion there are at least three no-hire red flags attached to this statement.

Re: Facebook Lost a Great Engineer

#47
post #42
post #33

Earlier quoted context omitted.

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

Aye, but the L-system still fits given the amount of data shown in the question. So is the L-system incorrect, because there's no way to disambiguate the sequence given the data?

I think you're right on the money

Your major problem would be finding an interviewer who knows what's an L-System

Edit: you should add the rule 111->31, so it may not be an l-system because there are infinite rules? (1111->41), etc

Or we limit it up to digit 9

Re: Facebook Lost a Great Engineer

#48
post #32
post #20

I understand that these questions can be ridiculous at times. But I think it is worth pointing out 2 things: 1) They may work well for a subset of applicants for a subset of companies. This, to some, is verification that these sorts of problems are a good way of narrowing down the applicant pool. Hence why they're used. 2) From Facebook (or any other employer)'s perspective, it's an incredibly hard job determining wh…

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?

Re: Facebook Lost a Great Engineer

#49
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…

Yeah, I think there's definitely an ego/butthurt attitude here I wouldn't put up with.

Don't get me wrong, I think everyone needs to have a certain confidence on their abilities and expertise, but it works both ways: when hiring for our startup we'd look for honesty and humble acknowledgment of the candidate's shortcomings/lack of expertise.

I wouldn't fail you for not knowing what the Newton's method for finding square roots is, but I will fail you for thinking it's irrelevant or not caring. If you don't care about my requirements in an interview, I don't think you'll do much better with actual work.

Re: Facebook Lost a Great Engineer

#50
post #43

Earlier quoted context omitted.

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.

Here's a solution that merges in place without any sorting: https://gist.github.com/Mononofu/5029975 The basic idea is to use the (unused) beginning of array b as swap space for the beginning of array a. This swap space needs to be shifted around, so it's of course O(n^2). Still, it was fun to write. If you have termcolor installed ('sudo easy_install termcolor' on ubuntu), you'll see the arrays a and b as well as th…

Yep. I did say that that solution exists ^^. I just said that you couldn't do it without creating something to hold the merged result. Your solution does allocate a buffer to hold the merged result: `self.array = self.a + self.b`

I wasn't saying you can't sort arrays in place (quicksort). I was saying you can't merge them in place. Somebody has to grow.

Post reply on HN