Facebook PHP Source Code from August 2007
11–20 of 154 posts
Re: Facebook PHP Source Code from August 2007
#12I 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
#13When 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.
Re: Facebook PHP Source Code from August 2007
#14Earlier quoted context omitted.
What's wrong with increasing the memory limit?
A 100MB per request is going to seriously limit scalability (or inflate hardware costs at least)
Re: Facebook PHP Source Code from August 2007
#15Earlier quoted context omitted.
What's wrong with increasing the memory limit?
A 100MB per request is going to seriously limit scalability (or inflate hardware costs at least)
Re: Facebook PHP Source Code from August 2007
#16I think there is a valuable lesson to be learned from this piece of spaghetti. I can't quite formulate it from the top of my head. But it's something like: if you wanna be rich, don't waste your time being pedant - your users couldn't care less.
There is a whole world out there where people want to rely on software to do what it says it does. I know Facebook can live in its own bubble and get away with every possible stupid bug a messy PHP spaghetti causes.
Re: Facebook PHP Source Code from August 2007
#17 // Holy shit, is this the cleanest fucking frontend file you've ever seen?!
ubersearch($_GET, $embedded = false, $template = true);
In all seriousness though, I wonder how much of this was written by Mark Zuckerberg?Re: Facebook PHP Source Code from August 2007
#18I think there is a valuable lesson to be learned from this piece of spaghetti. I can't quite formulate it from the top of my head. But it's something like: if you wanna be rich, don't waste your time being pedant - your users couldn't care less.
Many programming methodologies are proposed these days, but the entire "field" smells of pseudo-science. Unless studies are done that can show statistically significant differences in relevant metrics (defect density, time required to add a feature, etc.), it's just a matter of opinion.
Re: Facebook PHP Source Code from August 2007
#19I think there is a valuable lesson to be learned from this piece of spaghetti. I can't quite formulate it from the top of my head. But it's something like: if you wanna be rich, don't waste your time being pedant - your users couldn't care less.
Shipped code > Well architected incomplete features.
Your user does not care in the slightest if you're using a design pattern, or if you are using dependancy injection, or if there is 100% code coverage. Just make it work! Then make it faster! Then make it more readable! In that order.
Re: Facebook PHP Source Code from August 2007
#20I think there is a valuable lesson to be learned from this piece of spaghetti. I can't quite formulate it from the top of my head. But it's something like: if you wanna be rich, don't waste your time being pedant - your users couldn't care less.
... unless your users actually care about messages being delivered, whatever being reported as saved being truly saved, et cetera... There is a whole world out there where people want to rely on software to do what it says it does. I know Facebook can live in its own bubble and get away with every possible stupid bug a messy PHP spaghetti causes.
Personally, I can't bring myself to not care like that, but it seems to have worked pretty well in the early days of many now-popular sites. Especially in 2007, when Facebook was still in real competition with MySpace, moving as quickly as possible was probably much more important than a few messages dropping through the cracks.