Original URL: https://www.theregister.com/2009/05/25/dziuba_microsoft_php/

Microsoft arms half-wit developers with PHP handgun

PHP is legal. But it shouldn't be

By Ted Dziuba

Posted in Software, 25th May 2009 05:39 GMT

Fail and You Terrible things are about to happen in Microsoft's web application hosting environment, Windows Azure. Redmond's Slugworth, desperate to keep up with Mountain View's Chocolate Factory, has introduced support for PHP on their web application platform. Microsoft's Windows Azure is a competitor to Google App Engine and is trying to gain popularity by supporting interoperability and standards. And don't fall asleep within four hours of reading that sentence or a blood vessel will burst in your brain as your subconscious tries to make sense of it. You've been warned.

Both App engine and Windows Azure boast a promise of automatic scalability to developers, in the same fashion that a traveling salesman in the early American 1800s with his straw hat, red and white pinstripe suit, and assistant midget boast that their secret-recipe tonic will cure all that ails you.

Step right up, friends. Boy, have I got an offer for you. Have you got problems with scalability? Are you too incompetent to denormalize your data schema to optimize hot access paths? Do you write N-squared loops and blame poor execution speed on your runtime environment? Well, then step right up because I've got the solution for you.

The danger of these fast talkers is that they can convince a bad programmer that he's a good one. Google does an adequate job of keeping out the troublemakers by restricting App Engine to Java or Python. Now, say what you will about Java developers, but when App Engine first launched with support for Python, they immediately made it clear that you must be at least this awesome to ride.

In response, it appears as though Microsoft is taking what I like to call the Little League strategy: Everybody is a winner, even the kid who got smacked in the face with a line drive hit and waited out the rest of the season listening to adults struggle to tell him that it doesn't look that bad.

Yes, let me introduce you to the professional PHP programmer. You see, PHP is like a handgun. On its own, it is simply an inanimate tool that has no moral leaning. In the hands of a responsible citizen, it can be used to the benefit of society. But in the hands of someone who is untrained or mentally unstable, it can be used to commit horrible atrocities.

Whenever there's such a tragedy, other developers are quick to blame PHP. If PHP were illegal, then Yahoo! would never have happened. If we regulated PHP tightly, then there would be no Digg. Now, it's not fair to say that the world would be better off without PHP, but its community could certainly use less encouragement, which is why Azure's support for PHP worries me.

The Perfect Fail

The great draw of PHP is that it allows less experienced programmers to solve small problems quickly, which is great for people who aren't in the business of making web applications. But when Microsoft starts telling people that they don't have to worry about scalability anymore, there is the potential for a Perfect Fail.

This will occur when both Microsoft and a team of PHP developers believe they are on the track to win, but the developers birth unto the world a social network for cats, a Twitter clone, or yet another content management system. The PHP developers have failed, well, because they're PHP developers. Microsoft has failed because they're acting as that unscrupulous dealer who provides PHP to people that probably shouldn't have access to it. Neither realize they've failed, which means they both fail at failing.

It's mathematically complete.

The most bizarre part of this whole circus is that Microsoft is warming up to open source. They are providing FastCGI on the Azure platform, which means that they are setting up to allow a wealth of different languages, provided they can get the runtimes working. If you've ever had to build C extensions to Python on Windows, you can join me in a feeling of satisfaction that someone at Microsoft is going to have to figure this out. Let's call it retribution for Internet Explorer 6.

Anyway, if you think about FastCGI on Azure, it's not too far of a leap. After all, it's an unnecessary protocol that could just as easily been replaced by persistent HTTP connections and requires a programmer to code his way around its model. It's about as much a pain in the balls as anything Microsoft could have come up with, so I'm glad to see them not reinventing the wheel.

What makes it even more Microsofty is that PHP's support for FastCGI is a comedy act of its own. FastCGI requires that you write your web handlers inside of a connection accept loop, allowing you to initialize any resources only once. This is clearly too hard for your average PHP professional, so FastCGI only keeps the interpreter running so you don't have to execute it every time there's a web request.

For those of you that aren't web developers, this is a bit like trying to kill a person with a rifle by clubbing them in the foot with it, hoping that the blunt end of the weapon will break the skin somehow, and your victim will die of an infection because he's in a place so remote that there's no access to antibiotics.

Microsoft has recognized a quality catastrophe in the open source world, and embraced it. It's a sick twist on collaboration, but at least it's a start.

This is an interesting affront to Google, who so far is only supporting programming languages for grown ups on App Engine. Much like an Englishman debating an American, Google is trying to keep the level of discourse high and sophisticated. Our American Microsoft, on the other hand, has just sucker-punched the Englishman in the mouth and yelled "YEAH WHERE'S YOUR VOCABULARY NOW?"

Like it or not, supporting PHP does attract a lot of developers. Microsoft is sure to see heavier adoption as development teams realize it's a waste of time for them to support everything from the website to the metal on the hardware. I'm going to watch this with trepidation.

But hey, it could be worse. They could be hosting MySQL. ®

Ted Dziuba is a co-founder at Milo.com You can read his regular Reg column, Fail and You, every other Monday.