13 ms·
Hats off. I have no love for Facebook's product or business model, but their engineering is diesel, and it's very cool that they're sharing such a deep piece o
by feralchimp 15y ago
Hats off.
I have no love for Facebook's product or business model, but their engineering is diesel, and it's very cool that they're sharing such a deep piece of work.
- tszming 15y agoagreed, and it is not only a deep piece of work, but the core infrastructure that powered their business.
- pyman 15y agoI know some great Facebook engineers and some terrible ones. An ex-colleague of mine who loves writing spaghetti php code joined Facebook almost a year ago. I would say that 30% of Facebook's engineers are top notch, and 70% are just average php and javascript developers.
- judofyr 15y agoAnd it seems that the 30% creates tools so the 70% can continue writing sub-optimal code that works well.
- maratd 15y agoThis may actually be a sound business model, regardless of its unpleasant aftertaste.
- makmanalp 15y agoThat is actually the principle behind enterprise java, I thought. Force everything into its own isolated and replaceable small black box so that your grunt development can be done by "commodity" programmers.
- bluesnowmonkey 15y agoFor a company that size, 30% is amazing.
- jonknee 15y agoI don't think I'd call it amazing, but Facebook isn't as big as you'd think (especially compared to Google). It's around 3,000 total, with some fraction of that being engineers. Engineering currently makes up 64 of 402 open positions.
- nbm 15y ago> Engineering currently makes up 64 of 402 open positions. There are 64 unique job titles in Engineering (and 56 unique job titles in Technical Operations, which also includes software development job titles), but that represents a lot more than 64 (or 120) open engineering positions. That's not to say that Facebook isn't as big as many people think, though. (I work at Facebook.)
- kmavm 15y agoHey, I work at Facebook on HHVM. I actually view Facebook as the opposite of what you're describing. VMware, for instance, really did have a bimodal engineering organization; some pieces were amazing, but many were so-so. That can have its strengths, too, and it has worked out ok for VMware to date, but Facebook has the absolute opposite philosophy. For instance, you don't have a "hiring manager" here, because the selection process is decoupled from the allocation process. This means a uniform bar across groups; e.g., I interview people destined for all different parts of the stack, and I expect the same level of skill for all of them.
- nickik 15y agoHi, Some questions: Wasn't it kind of a waste of time do develop a static compiler plus an interpreter (while ending up writing a jit anyway)? Why did you not start out with a JIT? The problem of static compilation of dynamic languages (spezially PHP) was well known (phc!). The kind of JIT that is discribed in the post does (as far as I can see) nothing in it that was not already known when HipHop was originally developed. What kind of optimization are you guess doing? Since the scope of your optimization is only one basic block (did I understand that right?) how much do these optimizations acctully help compaired to unoptimized translation to assembly? Have you tought about using the pypy toolchain. The pypy jit allready does quite a lot of optimizations (not to mention the much wider scope for optimization for "real" traces) and it would be much less work to implment.
- kmavm 15y agoThis might be getting less interesting to the general audience, so we can take it offline if you have any more questions. I'm my initials (Keith Michael Adams) @ fb.com. The static compiler that preceded HHVM was started in a different time; it was 2008, and the JavaScript wars were just getting started. Conventional wisdom (to anybody who hadn't worked on Self in the late '90's) was that running dynamic languages fast was just kind of a lost cause. Since the static compiler was started earlier, and was inherently a more tractable system, it was done sooner. This is something that is hard for a lot of systems people to accept, but software has time value; even if HHVM ends up being faster than the static compiler, without the two years that HPHPc has been providing 2-4x improvements, Facebook would have been less able to make products. And keep in mind, the static compiler is beating our jit at most benchmarks at this writing; improving on it will take some doing. The only optimizations we're doing are those that bottom-up type inference makes possible; so, we can generate code that knows that strings are strings, arrays are arrays, ints are ints, doubles are doubles, etc. This doesn't sound like much, but avoiding the double-dispatch on things like $a + $b is significant. We're still using the static compiler's front-end, so all of the things it can do (e.g., CSE, constant-folding, deduplicating identical data, compile-time binding of functions and methods) we hope to "inherit" when running in production mode. PyPy is a very interesting project, with a beautiful approach. I'd be very, very curious to see what an HHVM interpreter written in RPython could do under PyPy. Unfortunately PHP is not scheme; it is a big language, with many non-orthogonal parts, so it would be a significant effort to answer this question. If I were starting over today, I'd take a much closer look at the PyPy approach, but that is just my opinion.
- itmag 15y agoI would say that 30% of Facebook's engineers are top notch, and 70% are just average php and javascript developers. Pet peeve of mine: why is the word "engineer" thrown around so much on HN? Is it meant to distinguish a certain class of people from mere coders? Or is it just a fancy word of saying "coder"? I've always referred to myself as a coder. Should I change this? I am genuinely curious, not trying to put anyone down.
- pwaring 15y agoIt's how Facebook refer to their 'coders', and in many ways it's a better word because it suggests something more than just hacking [insert language] all day. For example, an engineer might be concerned about how their code fits into the bigger picture, whether there is a better way of doing things etc., rather than thrashing out code for a daily rate.
- scorpion032 15y agoI personally find the word coder derogatory. It is looked upon that way by someone who thinks of the act as a assembly line creation process. Programer and Engineer are better tasteful replacements.
- qntm 15y agoA coder is somebody who writes code. Engineering is much broader discipline than just writing the code - it means writing it well, writing it to be concise, readable, maintainable, standards-compliant, specification-compliant, reliable, well-performing, possibly scalable, user-friendly and everything else that what is essentially a robust machine needs to be. In addition, software engineers can specialise in development, testing, design/architecture, performance, UI and probably many other things I can't think of right now. What I'm saying is that making software good is hard. It takes a lot of different skills in addition to mere coding. Actually writing the code - pressing buttons on a computer to enter text into an editor - is one stage in a long process, and all of these stages are as important as each other. Some of these are skills which you probably have! So calling yourself a mere coder is underselling yourself.
- iamandrus 15y agoAgreed. I don't like what Facebook is doing with the social network portion of its business whatsoever, but their engineering is brilliant and it's awesome for them to release something as amazing as this software.