Live data from Hacker News

Facebook PHP Source Code from August 2007

gist.github.com

51–60 of 99 posts

Re: Facebook PHP Source Code from August 2007

#51

One way to look at this is to say "Hah, how shameful." The other way to look at this is to say "Hah, clearly business success isn't a function of code quality"

>"Hah, clearly business success isn't a function of code quality"

They aren't nearly as strongly correlated as many developers might like to believe.

Re: Facebook PHP Source Code from August 2007

#53
post #40
post #15

Earlier quoted context omitted.

Dynamic programming questions are explicitly not used in current Facebook interviews. From time to time, Facebook and other companies study the effectiveness of their hiring process by comparing employee performance and interview performance. I believe dynamic programming questions were removed because there was not a strong link between success in this question and future performance.

This sounds very counter-intuitive! Did you hear this from someone working at Facebook or did you read it online? If it's the latter it'd be great if you could share a link!

Why is it counter-intuitive that people who interview well may still not function well in a specific organization?

Re: Facebook PHP Source Code from August 2007

#55

Amazing that they initially wrote this code and now to join FB you need to answer questions based on backtracking and dynamic programming. :) I wonder if they could do the questions themselves back then.

I didn't read it carefully and I don't know much PHP, but is the code really that bad? There's all kinds of worse code out there running everything. As long as it's relatively well organized, you can worry about refactoring as you scale up.

"relatively well organized" is the problem. It's written in a fairly unstructured imperative style that's perfectly suitable for short scripts, but even these relatively small pieces of code are outgrowing it. The extensive use of global variables is an obvious thing that I would expect to become a problem soon. It's much less of a problem in php than in most other web frameworks due to the design of handling each HTTP request in a fresh process (so things like the use of $user in both index.php and search.php can't conflict), but it's still quite fragile.

By the standards of 2007 PHP this is good code, and today there's probably lots of worse PHP being written (even if the community as a whole has moved on quite a bit).

Re: Facebook PHP Source Code from August 2007

#56
post #35

Earlier quoted context omitted.

I want to be clear: I don't care, and I doubt Facebook cares. But legally, I think this code was stolen. Facebook owns the copyright to the source code, so copying and distributing is theft in the same way that copying and distributing database contents is theft. But again:

Your definition of theft is wrong. Legally, this was not stolen.

Copyright infringement and theft are two completely different things, legally.

I know specially the film and music industry put a lot of effort to equalise those terms in the media, yet they remain two separate things.

Re: Facebook PHP Source Code from August 2007

#57
post #15

Amazing that they initially wrote this code and now to join FB you need to answer questions based on backtracking and dynamic programming. :) I wonder if they could do the questions themselves back then.

Dynamic programming questions are explicitly not used in current Facebook interviews. From time to time, Facebook and other companies study the effectiveness of their hiring process by comparing employee performance and interview performance. I believe dynamic programming questions were removed because there was not a strong link between success in this question and future performance.

There was a point in time (roughly 2015-2016 timeframe when dynamic programming interview questions were really in vogue. Every interview loop from smallish startup to leviathan corporation felt like it had at least one.

Re: Facebook PHP Source Code from August 2007

#59
post #16

One way to look at this is to say "Hah, how shameful." The other way to look at this is to say "Hah, clearly business success isn't a function of code quality"

> Hah, clearly business success isn't a function of code quality Mind you, early Facebook wasn’t exactly a “tech business”—the code wasn’t making them any money, such that having a bug in the code would make them less money. Really, Facebook only became a “tech business” once they got into 1. Messaging, and 2. Advertising. Then they had SLAs, and breaking those SLAs meant losing users/customers; and their ability to…

As a counterpoint, code choices and perceived site slowness contributed to Friendster's and MySpace's decline. Both had messaging and advertising.

Re: Facebook PHP Source Code from August 2007

#60
post #40
post #15

Earlier quoted context omitted.

Dynamic programming questions are explicitly not used in current Facebook interviews. From time to time, Facebook and other companies study the effectiveness of their hiring process by comparing employee performance and interview performance. I believe dynamic programming questions were removed because there was not a strong link between success in this question and future performance.

This sounds very counter-intuitive! Did you hear this from someone working at Facebook or did you read it online? If it's the latter it'd be great if you could share a link!

What is counterintuitive about this? That best dynamic programmers are the absolute best programmers? I mean come on man..
Post reply on HN