News for hackers. Stuff that matters.
Re:Speeding up PHP with the HipHop VM by bretthellman on Thursday November 29, 2012 @05:49PM (#4850764)
Will FB ever invest and move off PHP? Hiring talent at FB has to be getting harder and PHP probably isn't helping.
Re:Speeding up PHP with the HipHop VM by nbm on Thursday November 29, 2012 @06:02PM (#4850825)
PHP is used for a subset of development at Facebook. I'm not sure what the split is, but I would not be surprised if PHP is the primary language used by less than 60% of Software Engineers at Facebook. The rest code in C++, Java, Python, and then a bunch of other languages that are less used.

The PHP development environment at Facebook is unlike that found at any other company I'm aware of, and common PHP pitfalls and legacy code are actively "linted" out of the system (as an automated part of the code review process). It still wouldn't be my choice of language to use outside of Facebook, but I have no issue working on the PHP code base here (although I rarely venture into it).

Over time, much logic and processing has been offloaded to backend services, with PHP increasingly playing a (largely parallelised) dispatch, post-process, and render role. That will likely continue.

With all that said, it is questionable whether it would be an investment to move off of it - which language/environment would you think a good target would be, and why?

Re:Speeding up PHP with the HipHop VM by propercoil on Thursday November 29, 2012 @07:36PM (#4851213)
re-writing the code of any big project is insane. You are going to face those walls you faced in the past - again. Using this logic you would change the whole codebase every few years.. ridiculous
Re:Speeding up PHP with the HipHop VM by xxpor on Thursday November 29, 2012 @09:29PM (#4851536)
Amazon did it in the 2002/2003 timeframe when they moved from Obidos (C++) to Gurupa (Perl/Mason).
Re:Speeding up PHP with the HipHop VM by pjmlp on Friday November 30, 2012 @04:38AM (#4852574)
I though Amazon was still C++ at their main infrastructure.
Re:Speeding up PHP with the HipHop VM by res0nat0r on Thursday November 29, 2012 @08:13PM (#4851337)
I'm sure having some PHP code at a company like Facebook isn't deterring any serious candidates. Working for a company with almost a billion users who've created software like Cassandra, Thrift, HipHop and Haystack and working on writing loosely coupled systems which will run across thousands of machines; analyzing 10s of PB of data every day with Hadoop, there are definitely very specific and challenging tasks which would attract tons of talent. I think having a PHP codebase there isn't indicative that your new job would be sitting and writing crappy PHP code templates all day and wanting to kill yourself because it is so boring. Just my 2c.
Re:Speeding up PHP with the HipHop VM by michael_miller on Thursday November 29, 2012 @09:11PM (#4851488)
First, it's really hard to do a large rewrite of software. Netscape, for example, made the mistake of trying to rewrite their browser from scratch, and it killed them [1].

Second, what evidence to you base your statement "hiring talent at FB has to be getting harder"? If you're talking about market cap / upside, Google has had no problems hiring (well, relative to other tech companies, anyway), despite a market cap 3.5x+ what FB is today.

Lastly, FB is not all PHP. A lot of services are written in C++ or Java, and use Thrift to talk to the frontend [2]. Thrift allows a more gradual movement off PHP, by moving isolated components to other languages individually.

[1] http://www.joelonsoftware.com/articles/fog0000000069.html [2] http://www.quora.com/Facebook-Engineering/What-is-Facebooks-...

Re:Speeding up PHP with the HipHop VM by untog on Thursday November 29, 2012 @06:41PM (#4850986)
I think you underestimate the number of PHP developers out there. There aren't many on Hacker News because we're all too cool for that stuff, but in the developer world in general there are a ton.
Re:Speeding up PHP with the HipHop VM by MichaelGG on Thursday November 29, 2012 @07:03PM (#4851092)
I think his point is that real top-tier developers are going to despite working with such a grotty language as PHP, so it hurts their hiring process that way. Whereas if they worked in a superior language (an ML, Haskell, a LISP...) they'd attract talent. Who wants to deal with a language such such inane design decisions all day?

I'd imagine people signing up to work at FB do so despite the fact they use PHP, not because of it.

Re:Speeding up PHP with the HipHop VM by nbm on Thursday November 29, 2012 @08:42PM (#4851436)
It's not like people who work at Facebook have to use PHP anyway - there are quite a few who work in "superior" languages, although most just use C++, Java, and Python.

In my experience, the top-tier developers enjoy challenges and solving problems, and languages are just tools they use to defeat those challenges and solve those problems. Sometimes it's a language they really enjoy using. Sometimes it's a situation where that language isn't a suitable one.

Re:Speeding up PHP with the HipHop VM by Firehed on Thursday November 29, 2012 @11:10PM (#4851796)
I just don't understand the hate. Like any language it has some syntactic quirks and inconsistencies. There's no way to objectively say that one language is superior to another, because there are so many metrics that contribute to superiority and every person in the world is going to weight those various metrics slightly differently.

I imagine it's neither "despite" nor "because" of PHP use; any top-tier developer is going to use the tools available to him/her, rather than pick an employer in order to use a specific set of tools. Lower-quality developers may do so, but that's probably because they're less likely to know the right tool for the job (eg someone may hate functional programming and avoid jobs that use it, but that's because they don't know when FP is the ideal way to solve the problem)

Re:Speeding up PHP with the HipHop VM by hottyuilio on Friday November 30, 2012 @03:51AM (#4852458)
You can't objectively say that one language is better than another, but you can't deny that a language such as Haskell has a level of consistency and mathematical rigour that PHP will now never attain. Top developers who Facebook target (normally top CS students from top colleges and PhD programs) strive to be consistent and mathematically rigorous themselves, and poor design and math annoy them.
Re:Speeding up PHP with the HipHop VM by Firehed on Friday November 30, 2012 @12:49PM (#4854379)
Totally valid point. One of my housemates loves Haskell for very much the same reasons, and all other things being equal I'd prefer that as well (who wouldn't?).

But of course, anyone who's worked on production systems knows that all the mathematical ideals in the world doesn't stop bugfixes from becoming a giant hairy mess. It's more your culture, skill, and process that allow or prevent that from getting refactored into a better solution and how long that takes. Any language can be a part of a clean or messy codebase, although some tend to skew towards one side or another - but I'd wager that's as much a factor of barrier to entry as anything else.

Re:Speeding up PHP with the HipHop VM by chadzawistowski on Thursday November 29, 2012 @07:26PM (#4851180)
I don't know, working on HHVM certainly seems interesting enough to attract good developers.
Re:Speeding up PHP with the HipHop VM by tangue on Friday November 30, 2012 @12:19AM (#4851974)
Facebook lives in a SOA. PHP is probably the best choice for dispatching services written in more "advanced" language. The beauty of SOA is that you can use the right tool for the right job.
Re:Speeding up PHP with the HipHop VM by pretoriusB on Friday November 30, 2012 @03:14PM (#4855204)
>I think his point is that real top-tier developers are going to despite working with such a grotty language as PHP

Actual top-tier developers don't fret much about it. Complaining about some language's warts is mostly for bike-shedding and blogging types. PG, that writes about blub languages and who-cool-is-list, used Perl in ViaWeb too (which is as inelegant a mess as PHP is, but at the time was good for web work).

Top tier developers get shit done in whatever language. And most of them rarely ever comment or blog.

Re:Speeding up PHP with the HipHop VM by skeletonjelly on Thursday November 29, 2012 @09:02PM (#4851464)
Where do you get your estimates from?