The PHP Clusterfuck
05/16/2013 § Leave a comment
The above picture represents my opinion of PHP, everyone can use it, everyone can fuck up a project with. During the mid-2000’s I was picking up PHP gigs left and right and working ’em as fast as could, becuase everytime I picked up a new gig I learned a new aspect of the language I really didn’t like, but I just bit my lip and moved on with the task at hand.
I am now seeing some new-ish discussion regarding Jeff Atwood’s post last year The PHP Singularity, or not, I don’t know how I landed on his post, it just seems to me that the old PHP Sucks debate seems to be gaining a little steam again.
The refutations seem to fall into a few camps; 1) PHP is used by so many people now it doesn’t matter (Jeff’s post), or out-and-out plain ignoring the facts that demonstrate why PHP is such a horrible language, as one commentor on Jeff’s post did. He actually posted in reply (and in support of PHP) that he came away from Alex Munroe’s famous blog post PHP: a fractal of bad design without gaining any insight into why PHP was a bad language. Really? That’s VERY MUCH like reading “See Dick and Jane” and coming away asking “…but what were Dick and Jane REALLY doing?” Come on, pal. A critic hands you examples, and not just a few, but COPIUS examples that support his opinion, and you say “…but he really didn’t explain what his problem with the tool was.” Your love of the shitty tool is showing.
I should clarify my opinion and the above picture. I do not for a second mean to say that programming, indeed, the entire genre of digital engineering, should be an elitist, members-only, club. However, that certainly in no way means that a liberal arts major or a basket weaver should walk in the door and start coding up critical infrastructures either. But IN MY OPINION, and its just that, MY OPINION, PHP has allowed exactly that. Middle managers coding up crap. And I know of one example; in a crunch and down a man this middle manager rolled up her sleeves and attempted to complete a project coding up some missing parts of a PHP page, completed the project herself. And it passed QA. Great. Then, believing she would be able to complete the next project all the while saving on some man-hour cash coded up the entire thing herself. it crashed, burned, and a fire had to be put out due to her incompetence. Chances are she never would have attempted that had the project been written in python, ruby, or perl.
But that’s hardly a reason for rejecting a language, becuase some one might do bad things with it. And I won’t go into all the reasons why PHP is a bad language, that’s been done to death by people more elegantly or crassly than me. If you google up terms like “php is a bad language” you’ll dig up just as many, or more, links to pages that defend PHP. I’d really like to study those folks. Were they mass-hypnotized by PHP minions? How can so many people have drunk the kool-aid? It led me to question my opinion on the language. So I got back into it. About two minutes in I came back to my firm belief that I was right and all these people had indeed drunk the kool-aid. PHP is a terrible language. But Jeff Atwood asks us to stop and consider: “We get it already. PHP is horrible, but it’s used everywhere.” I reject this argument out of hand. Everyone can walk around with a dead bird carcass pinned to their lapels. That doesn’t mean I should as well. He then goes on disparage his reader by pointing out how obvious it is that PHP is a bad language and if you don’t know it you’re stupid. Interesting comment to put to your readers. In a second point he says that if you don’t like something make something better. This of course dismisses the many alterntives as “not good enuough”, apparently. Of which there are many, I’m not even to going to bother naming them.
If a client wants something written in PHP, they certainly may have it. In my experience, however, they don’t particularly care about the implementation, just the results, quickly. Sometimes integration with an existing tool or infrastructure dictates the implementation, or sometimes the customer wants a hetrogenous implementation, but not usually. After the mid-2000’s PHP extravaganza people seem to have mellowed on its use, at least in my world. Thankfully, I’ve not had to pick up the double-clawed hammer in quite some time. Thankfully.