7 ms·
Any. Really, any. Facebook is throwing a lot of engineering effort into fixing things that now matter to them, but didn't when they started (and were small). T
by gtirloni 13y ago
Any. Really, any. Facebook is throwing a lot of engineering effort into fixing things that now matter to them, but didn't when they started (and were small).
They could have picked Perl CGI's and it'd still have happened (perhaps Perl 6 would be a success these days).
I don't think PHP has played any role in bringing FB to the size it is today (programming language does not translate to number of users signing up). So yes, any mainstream language available in 2003 would do it.
- thinkpad20 13y agoDo you think perl would have been much better? Either way, the point that he was making was that there were pretty slim pickings back then. Certainly the dominant languages/frameworks of WD these days (python, ruby, node) didn't exist. Or by another token, the only dominant one that was also strong back then is PHP, the one they chose.
- jurip 13y agoYeah, Node didn't exist. Python was over ten years old in 2003. In Python web development there had already been CGIs, mod_python and two major releases of Zope, with hope of Zope 3 on the horizon. Ruby is almost as old as Python.
- thinkpad20 13y agoI'm aware that they existed, but clearly they were very immature as compared to how they are now. PHP on the other hand was in it's heyday, and (clearly) fulfilled all of the needs of Zuckerberg and the other developers. A suggestion at the time that they use a language like ruby or python would probably never have been made, and for good reason - and it almost certainly wouldn't have been adopted. It's just not realistic to suggest that early FB had this vast array of choices for which language to use.
- elwell 13y agoI disagree. Perl would have likely crippled them, due primarily to the lack of Perl engineers.
- nbm 13y agoI believe Python might have worked. It's grown well as a web development language since then by itself. It may have forced several rewrites before WSGI came about. It is a relatively easy language to learn, to hire for, and has few massive warts. (Ruby is roughly in this category too, in my opinion.) I believe Perl probably would not have worked. It hasn't grown much as a web development language since then (although it has some great web frameworks). The language itself has languished in both development and community growth, and it fairly esoteric and certainly harder to learn than Python and PHP, and would have been harder to hire for. It seems unlikely that pre-2010 Facebook to meaningfully have changed the trajectory of the language (ie, Perl 6 being a success). I don't think Java, C++ (or C), Cold Fusion, ASP, Haskell, Ocaml, and many other languages would have worked, for a bunch of reasons. Harder to hire for, harder to iterate with, more costly in terms of infrastructure, harder to teach/learn, and so forth. PHP isn't a totally insignificant part of Facebook being as successful as it has been. A good-enough language choice was necessary, at least, and PHP it seems was a good-enough choice.
- wmil 13y agoPerl was a possibility, but CGI is/was a pain to use. To get started you had to understand things like headers. You frequently had scripts refusing to run for whitespace issues relating to CRLF vs LF. You'd need to come up with your own templating language... It was just much more difficult. Also Perl libraries typically require superuser rights to install. That's a big deal if you're a poor student using shared hosting on your fun hacking projects. Python really wasn't an option. mod_python by default required you to restart Apache whenever a python file changed. It was designed to be configured by sysadmins on dedicated servers... if you wanted something you could hack together an put on a shared host, it just wasn't an option. Also the hot Python framework in 2003 was Zope. No one uses Zope anymore. For good reason. Ruby was much smaller, and this was pre-rails so it didn't have any significant web framework. I'm not even sure if there was a production ready way of hosting ruby scripts.
- rafekett 13y ago> To get started you had to understand things like headers since when is this a problem? really.
- wmil 13y agoTo make something accessible you need to let people learn it one small chunk at a time. PHP lets you ease in, starting at html with some inserted php code and working your way up to more complex code. CGI, at least as I recall, required you to return valid HTTP responses with correct headers. That's a big jump from simple HTML.
- thefreeman 13y agoThe point you "Anything but PHP" guys seem to conveniently ignore (or perhaps, not comprehend), is that at Facebook scale, you are going to have issues with many of these things regardless of what language you chose. They have specifically made this point many times. You and others point to some hand-wavy magical language which somehow doesn't have any issues when serving hundreds of millions of users. That doesn't exist.