To paraphrase the late great David Foster Wallace, did you know that probing the seamy underbelly of software development reveals ideological strife and fanaticism on a nearly Godwin's-law scale? Did you know that software development even had a seamy underbelly? It does, and its name is PHP, the world's least-loved but arguably most-used programming language.
It's loathed, it's despised, and it's everywhere. WordPress, meaning TechCrunch, is brought to you by PHP. Yahoo? PHP. Facebook? Them tooalthough Quora founder and former Facebook CTO Adam D'Angelo hastens to stress that "PHP was out of the question" for Quora, and Facebook merely uses it because it's "stuck on that for legacy reasons". And yet PHP is allegedly used by more than three-quarters of all web sites.
To sum up: everybody hates PHP, except for the countless legions who use it, who should all be very ashamed of themselves. I don't think it's an exaggeration to call that a general consensus. PHP has been calledand by people widely respected in the industry, too"a fractal of bad design," "the biggest, stinkiest dump that the computer industry had taken on my life in a decade," and, worst of all, "the Nickelback of programming languages."
Even its defenders are hilariously half-hearted and mealy-mouthed: it's "better than you think," and "has even learned from its mistakes," we're assured. Or we're told that "The true problem with PHP lies in the community," not the language. Or they just result to ad hominem attacks. Or, well, sometimes they just stop defending it at all. I mean, it's really hard to defend a programming language whose behavior depends on whether you're Turkish.
And yet. I'm loath to admit it. I may never again be acceptable in polite software company after this article is published. But I have a soft spot for PHP, and not just because I share an alma mater with its creator. Don't get me wrong, I don't actually use it; in my ten-year software career I've been paid to write code in more than a dozen different languages, but I've had to resort to PHP exactly once. For a pet unpaid project. I wrote about ten lines. When I mentioned this to one of the finest developers I've ever worked with, he responded: "Dude. TMI." Did I mention that it's widely hated?
Anyway, my sympathy for PHP's deviltry is because I appreciate its ethos. Its just-get-it-done attitude. Or, as Melvin Tercan put it in his recent blog post, "here's to the PHP Misfits. The pragmatic ones who would pick up anything even double-clawed hammers to build their own future. Often ridiculed and belittled by the hip guys in class who write cool code in Ruby or Python, but always the ones who just get shit done."
He's on to something there. The best is the enemy of the good, and shipping some working PHP code is approximately a million times better than designing something mindblowing in Haskell that never actually ships. I fully support Jeff Atwood's call to replace PHP once and for allbut I hope that everyone realizes that eliminating its many, many, multitudinous flaws won't be enough; they'll have to somehow duplicate its just-make-it-work ethos, too.
Image credit: Double-clawed hammer, Nicole Aptekar, Flickr.
No hay comentarios:
Publicar un comentario