Live data from Hacker News

Facebook PHP Source Code from August 2007

gist.github.com

1–10 of 154 posts

Re: Facebook PHP Source Code from August 2007

#2
I really hope they cleaned that mess up or I feel very sorry for all the developers at Facebook.

>ini_set('memory_limit', '100M'); // to be safe we are increasing the memory limit for search

>tpl_set('simple_orientation_first_login', $get_o); // unused right now

>// We special case the network not recognized error here, because affil_retval_msg is retarded.

>all those undocumented(?) random error codes

>mix between ternary operators and regular if/else statements with no logical choice between one or the other

>no auto loading whatsoever

Seeing as this is from 2007, there is hope.

Re: Facebook PHP Source Code from August 2007

#4
This is quite neat compared to the average shitfest people leave inside wordpress templates. I had to unpick a whole 200 page intranet written with wordpress and buddypress (which stinks) recently and rewrite it as a non-wordpress site as it's hit the inevitable hack brick wall.

It's now an asp.net mvc app on Azure. There's hardly any code in it now and a the page response times are down at 50ms rather than 1500ms! One query per page vs 400 as well.

Re: Facebook PHP Source Code from August 2007

#5

I really hope they cleaned that mess up or I feel very sorry for all the developers at Facebook. >ini_set('memory_limit', '100M'); // to be safe we are increasing the memory limit for search >tpl_set('simple_orientation_first_login', $get_o); // unused right now >// We special case the network not recognized error here, because affil_retval_msg is retarded. >all those undocumented(?) random error codes >mix between t…

What's wrong with increasing the memory limit?

Re: Facebook PHP Source Code from August 2007

#6
post #5

I really hope they cleaned that mess up or I feel very sorry for all the developers at Facebook. >ini_set('memory_limit', '100M'); // to be safe we are increasing the memory limit for search >tpl_set('simple_orientation_first_login', $get_o); // unused right now >// We special case the network not recognized error here, because affil_retval_msg is retarded. >all those undocumented(?) random error codes >mix between t…

What's wrong with increasing the memory limit?

That's an abnormally high memory limit for what should be a simple request.

Re: Facebook PHP Source Code from August 2007

#7
I remeber these days. I worked at this time for studiVZ - a german social network (still exist, but nobody is using it anymore) and this leaked was caused by a misconfiguration in their Apache setup.

In 2008 studiVZ was sued by Facebook. They said we theft their PHP, CSS/JS "code". (http://techcrunch.com/2008/07/18/facebook-sues-german-social...).

Indeed, the first version of studiVZ was inspired by Facebook. Our founder had seen FB in 2005 the first time in the US, but it wasn't possible to use the service without a .edu eMail account. That was the decision to make a local clone.

But the real story behind the lawsuit is a bit longer. In december 2006 Facebook tried to acquire studiVZ the very first time.

This picture with two of the studiVZ founder and some people from FB's management team is from this time:

http://img-a4.pe.imagevz.net/photo3/f3/9a/ce37499d84437cb744...

But FB hadn't the amount of cash to aquire the company. The Holtzbrinck Publishing Group aquired studiVZ later for 85 mio. €

In 2008 (before the lawsuit) FB tried the second time to acquire studiVZ - this time for 4,8% of shares! But this deal didn't happend - unfortunately.

Re: Facebook PHP Source Code from August 2007

#8
When I see code like this, I'm always amazed that I can actually read it and (kinda) understand what it's doing. I always expect code like Facebook's to be so finely tuned and advanced that it'd be completely uninteligable to those outside the company and not an expert in the language.
Post reply on HN