Live data from Hacker News

Facebook PHP Source Code from August 2007

gist.github.com

1–10 of 99 posts

Re: Facebook PHP Source Code from August 2007

#2
It wasn't actually stolen as it says in the README. It was a misconfigured Apache server which leaked raw, unprocessed PHP code. I received the code to home.php and profile.php but I didn't save it at the time (I was very very new to learning PHP and didn't realize the significance of what I was looking at).

Still really cool to see.

Re: Facebook PHP Source Code from August 2007

#6

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.

Re: Facebook PHP Source Code from August 2007

#7

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.

Good point.

Is there anybody from 2007 still working at Facebook desperately scared they'll be found out for not being good at algorithms or are these people all in management now? ;)

Re: Facebook PHP Source Code from August 2007

#10

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.

I used to know PHP, and this code is very indicative of the imperative style that was popular during that era. I believe the PHP crowd has mostly gone deeply into OOP. With that said, Facebook mostly worked remarkably well. My bank, on the other hand has their web presence written in Java. And it works about 80% of the time. Sometimes one just has to try twice. So, "good code", "bad code" will always take a back seat to "working code". (Not that I'd want to maintain this beast)
Post reply on HN