PHP, Zend Framework and Other Crazy Stuff
Irishisms
PHP: Innocent Villagefolk or a Pillagin’ Pirate?
Apr 12th
This is a train of thought article (i.e. it may make sense…or not). You’ve been warned in advance. The CL;DR will be posted to Twitter when Hell freezes over, pigs fly, and Hollywood makes an ensemble casted DC Universe movie. This is what happens when you have a laptop, an editor, a train ride home, and have just realised that the wifi connection is not working.
In PHP, we’re well insulated from what happens in other programming languages. This is not by accident – mentioning PHP while among a crowd of Java, Ruby, Python or Perl programmers is liable to result in a heated argument, several fistfights and one dead PHP programmer. Death by mobbing is not a pretty way to go. I’m sure a few of us have been there – at a web conference where people dismiss PHP out of hand as a kiddie toy for the weak minded and demented. When everyone around you starts nodding, remember to make yourself as inconspicuous as possible and request armed backup from the local PUG.
Of course, PHP programmers all know that the other programming languages are just jealous – PHP has no true OOP model, it’s ugly as sin, can’t figure out which parameter order is right, and is several years behind the curve in adopting best practices but the damn thing remains extremely popular, keeps getting faster, has the best reference manual ever invented, more frameworks than grains of sand on a beach, and in recent years has become a hotbed of innovative libraries now that PEAR and its messy aftermath have been displaced by Github. It’s sickening.
I often wonder why that is. I could go with the usual arguments – PHP is easy to learn, very effective, yada yada yada. Those are the boring reasons we try very hard to believe in. Ruby is easy to learn, very effective, and has even more yadas to go around. It’s still sitting at 11 on the Tiobe Index to PHP’s 6.
What’s fascinating about some programming languages is their reaction to and life after maturity. PHP is an immature programming language which pretends to be mature (to earn Enterprise cookies) but otherwise couldn’t give a toss. I don’t mean that in a bad sense. PHP continues to exude a sense of adventure as it playfully steals ideas left, right and center from its peers. Most of our foremost advances are “borrowed” years after their adoption elsewhere. What PHP excels at is tireless consumption. Marathon races make one hungry and we can’t help but notice the feasts being exposed by Rubyland or Pythonville as they do their best to sprint past us. Without that thieving spirit, PHP would long since have entered obscurity as a quaint HTML oriented scripting language used by college students to build cheap websites with flashing text and under construction GIFs.
To me, PHP is a rogue. If we were playing an RPG, PHP would have pointy ears, a cloak, a couple of daggers and as many lockpicks as it could fit in its inventory (leaving sufficient room for liberated loot, of course). Ruby will never see us coming…our sneak skill is epic. PHP figured out how to keep the W key depressed while crouched in a corner in Elder Scrolls: Morrowind before the game was even designed.
I’m sure this comes across as being a bit humourous, but is it? Sometimes when I hear about PHP being innovative I almost crack up on the spot from disbelief. As PHP developers we’re not often (as in never) in the limelight generating new programming paradigms and practices – we’re most likely to be found connecting the dots between PHP and some novel idea we stumbled across elsewhere. Our strength lies in our ability to connect the dots several hundred times over to the point where the best dot connector gains a critical mass of adoption and we get something like Doctrine, or Composer, or PHP’s new Traits, or whichever of the zillion popular frameworks you prefer that are desperately trying to eke any form of differentiation from MVC (up to and including liberal interpretations of its definition).
It’s a process that works for the simple reason that PHP programmers are immature gits. We love paddling in other programming languages, we love to reinvent the wheel and brag about it, we love to overstate our personal preferences’ importance, and we love ignoring best practices and fighting for the bad ones. There’s a weird benefit to our craziness – trying to get any two PHP programmers to agree to anything is doomed to fail but it promotes competition very well. We’ll write a million versions of anything that isn’t nailed down or too boring to behold while Ruby developers console each other over their One True Way consuming the Last Hope of Mankind (Rails ate Merb and suffered from chronic indigestion – a true but very sad story).
What we really need is a new PHP motto. Something deep and meaningful that exposes PHP’s true nature. I was thinking “Rob ‘em blind, matie!” would be a good one but I remembered that we need to cater for the Enterprise audience. Suggestions welcome.
In the meantime, as we struggle with our identity and stay one step ahead of the city guards who have it in for wanted thieves (tends to happen in all Elder Scroll titles), we should be preparing for our next mark: node.js. It claims to be non-blocking. This is excellent, we can get in close with our daggers without any pesky shields getting in the way.
Ruby is terrified by node.js because node.js is the new hotness. Rails 4.0, which is in beta, is the second version of that framework showing fatally unstylish signs of becoming a mature platform for application development. It even demonstrates a use of design patterns. The bastards. There’s only so much the fashionistas can take before they jump ship to the next immature poorly designed piece of crud needing a massive influx of early adopters to beat it into a usable form over the next semi-decade. I’m being overly harsh – it’s not poorly designed, I’m sure stuff like database reads, and filesystem ops can be made non-blocking. Somehow. Pixie dust? Reality distortion field usurped from the bones of Steve Jobs? It sounds like it will be something valuable and very very shiny.
PHP is also terrified of node.js – in the sense that we know its name and think it has something to do with Javascript. Now that it has joined the race and is sprinting far behind us towards the finish line, we can look forward to years of replicating its best features which is in no way to say that we will stab it though the heart in an alleyway and strip it of valuables. You can’t literally do that with a programming language afterall. Pity.
So my brothers and sisters, embrace your inner pirate and revel in it. Now, anyone know if there’s anything worth stealing from NXT-G? It managed to sneak into 20th position on the Tiobe index up from 56th. I want its shiny stuff.
Unapologetic To The End? I think Zend_OpenId hates me… Hates it back!
Jul 27th
Disclaimer: The following is obviously a spur of the moment tirade of sarcastic commentary and lots of (probably bad) humour. A lot of it refers to events from two years ago (that’s around ZF 0.8!). Ancient history
. Mostly. In any case, I have to rant about something once a year related to the Zend Framework. It’s traditional. Park any attempt to take this too seriously at the door. I get a bit dramatic at times…
In certain places, I do sometimes get a reputation of being a crazy person. Usually it happens shortly after I find myself going down a road that leads somewhere truly undesireable (or when I throw in a weird blog post like this one). I had one of those moments today that served as a flashback to such a point in time from 2007. It’s not the first time, but it will be the last since I’ll ignore it completely from now on. Believe it or not, I do get a bit upset at myself when I let these times get to me. They are completely unimportant and silly – but when I have to relive them I will react in a pretty irritated fashion (ed: that should be kneejerk incendiary fashion).
This one started in 2007, right about the time I was first starting to write proposals for the Zend Framework. I felt pretty great at the time. I had lots of ideas, plenty of motivation, and then it all seemed to go downhill from there. The turning point was in June 2007, when after three months of work I felt I had enough done to propose OpenID support for the framework. Obviously a worthy cause, and also one which shouldn’t cause much grief since the ZF keeps advertising its wicked web service support. Before long, that boat was scuttled with news that Zend itself had been working on just such a proposal. Okay, that was disappointing. Zend had somehow managed to completely miss a three month effort on OpenID. Just another day on the farm. Next step? Collaborate? So I waited a few days and Zend’s code for what would become Zend_OpenId appeared in my inbox. Let the review commence! Okay, that ended a bit abruptly…it’s a bit short. Almost like it’s missing stuff and was written in a handful of days as a prototype. Talking went on and off for a while, and eventually my interest in collaborating petered out. Like any open source contributor, I participate to scratch an itch. My OpenID itch was well and truly scratched by now with my own source code, and continuing to throw time at another OpenID solution based on a different paradigm with a different ideology, little of which I agreed with, when I already had one functional was pretty pointless compared to something that still needed scratching like the Zend_View Enhanced proposal (and I really needed that shepherded through). So Zend_OpenId continued without my assistance, with something for Yadis persisting in the Incubator as an orphaned proposal. It still persists waiting that one final patch and call to the trunk… One day…
This all sounds reasonable and a bit dry, but in reality I found it all intolerable. A self-professed OpenID expert who is a member of an OpenID Foundation decides to add OpenID support to the Zend Framework after working on it for three months and who has actual code to prove it, is then told about the other proposal which just happens to be coming at the same time, and has code…of course. Well, a bit of code. If I were a real nut…I’d have a field day. Collaborate? I’d already finished this twice. I’m supposed to go for round three? Yeah, I admit, I was getting pissed off very quickly back then. I was close to constructing an elaborate conspiracy between Zend, George W. Bush and the Illuminati (how could you NOT have the Illuminati
). What was nagging me from the start was the obvious – I should have told someone to stuff that proposal somewhere and forged ahead with my own. Of course I didn’t. I was new, and had green stuff growing out of my ears, and it was Zend. The Zend. Silly me…
The summer of 2007 left me wishing the Zend Framework Proposal Process would shrivel, die and get gobbled down by Orcses (I was hoping for Gollum but he’s a hotshot movie star now). It remains the single worst open source experience I have had since I joined the open source gig in 1995. Not only was it discouraging, it was demoralising. There were points when I was driven to contemplate whether my input was even wanted. Which is probably why I remain so overly sensitive about it – I can understand the new guy is immediately suspect. But not like this. In September 2007 I finally wrote the blog post “How a proposal process could work – if retaining contributors is a goal” out of frustration. As the title suggested, and others guessed, I was borderline on taking a hike from contributing. Some months later I gave some ground, and deleted Zend_Yaml as a proposal. Waiting for a review, or challenging non-existent reviews, or noticing the distinct lack of communication between people gets tiresome eventually. I have a spectacular tendency to vanish for months on projects, but not a whole year. Also, using it as a condition when reviewing another proposal was just fucking stupid. After a few bouts of initial enthusiasm, Zend_Service_Yadis joined it for any worthwhile purpose. That is my fault of course – my motivation to finish a library already released on PEAR had simply evaporated. That scratch your itch thing again – it was scratched on PEAR already. By now Yadis had been in use for over a year in production in other forms, and Zend_OpenId wasn’t going anywhere.
Thankfully, since mid-2008, that horrible system seems to have mostly vanished for good. The change in topics may have helped too. Not many people have considered reimplementing Zend_Feed, and for a change, nobody had been busy on any secret OAuth components. It’s taken roughly a year, but these are finding themselves in the trunk and Incubator respectively and should see ZF 1.9 and ZF 1.10 in turn. Hurrah, I committed actual finished code for once…;). I’ve also dropped any pretense at applying Agile methods to proposals. When I propose something, it will have backing code, class skeletons and use cases (basically the entire integration test suite). It won’t be complete, but it will be sufficiently functional. Overall, I haven’t been irritated in months (well, before today).
But why, why does the whole Zend_OpenId episode still carry weight? It hit me today, when I was scanning my email and I spotted a note about some Zend Framework libraries showing their age and lack of maintenance. Perfectly normal for something the size of Zend Framework – code rot is persistent anywhere. It can be difficult to diagnose though unless you are a regular user or the maintainer, so I shot off a reply adding that the same applies to Zend_OpenId. It was only intended as a supportive example, something I’m personally familiar with since I’m the guy with “Zend Framework” and “OpenID Europe Foundation Representative” written all over their email signatures, so apparently this makes me an expert on the topic. I field a lot of questions about Zend_OpenId at times. As anyone using it knows, Zend_OpenId just doesn’t work at the moment depending on the Provider. It’s woefully outdated.
However, it appears that…I am the Zend_OpenId maintainer! Really? Huh? Wait a minute… WTF?
Que 2007 flashback… Que obligatory irritated kneejerk response disavowing all alleged responsibility for afore mentioned proposal I have never contributed any code to…
I know where this started. At some point in 2008 I did agree to look into OpenID 2.0 support. It was one of those goodwill moments, where you know you’ll get around to it…eventually…after A, B, C and probably D. And you really mean it too, until you’re dragged into someone’s office and told about E. Then the mysterious Z pops by for a few months with a couple of mates. Anyway…it never went further. No proposals, no code, no discussions, no nothing. I only vaguely remember the email even. I imagine I forgot about it within a week until I was reminded about it today, and am apparently being held to it by superglue and ISP records of the email (just joking about the ISP records). God help me. Why are you laughing? This is fucking serious!
Now, being the apparent Zend_OpenId maintainer and therefore responsible for all issues filed since Spring/Summer 2008…I resign, effective immediately. It’s bad for my heart, and my irritation levels. More so now that I know about it. Now that I have resigned, I can see something of the funny side. If I complain about Zend_OpenId – it really is all my fault. Even if I was unaware of it. Allegedly.
Seeing a funny side, and having the benefit of hindsight, I can recognise where it all went off the rails back in 2007. Back in 2007 I should have been more of an ass. Yessir, I should done a Hugh Laurie on someone! Instead I retreated into politeness, followed by disinterest. I should have done exactly what I did with Zend_View Enhanced – write the bloody thing to death in a multi-part monologue that would have directed my legion of rag wearing subjects (er…readers) to assault the edifice of Zend Technologies Inc. until they caved and decided proper OpenID support was popular enough to warrant some real attention, i.e. raise bloody murder. If nobody listens in private, then shout it from the rooftops. But I didn’t. And Zend_OpenId is broken. And the OpenID Community is all the poorer for it. So it really truly is all my fault. I wasn’t a big enough ass. I will try to endeavour to be a bigger asshole in the future. May god have mercy on all your souls.
Now that we’ve established blame, and didn’t even need svn to do it (since I’m not listed there…aha), can we update a few records? In the maintainer field, right on the table called Zend_OpenId, can we change that to NULL or “Zend” since they actually wrote it so presumably are responsible also for its maintenance? While we’re at it, can we make it a new rule that the ex-proposer of features later proposed by a completely different party, not be held responsible for the completely different party’s screwups? Thanks.
This years “Paddy Rants About Something In The Zend Framework You Couldn’t Care Less About” was brought to you by…well…me.

