Skip to main content

But, didn't PHP break the Web in the first place?

Rasmus Lerdorf is an opinionated man.

However, so am I, so I have some things to say about these particular opinions. Lerdorf is claiming the web is broken. I do not disagree. Lerdorf is claiming PHP is the cure, and I couldn't disagree more if he had written that statement on a shard of tin and jammed it in my stomach.

That is quite a strong disagreement.

I mean, didn't PHP break the web in the first place?

Right off the bat, I should note that I do believe PHP can be used well. Any language (almost) can be used properly enough that it can be a decent environment to use, so long as you follow strict rules. PHP is a great example of a language that promotes ignoring any rules. Following a good set of policies, one can develop well structured and elegant applications with PHP, but the fact of the matter is that the language does very little to promote anything in the way of good use of itself.

PHP might not promote bad coding, but it simply does so little in the way of promoting good code that it might as well provide facilities for plaintext passwords in query strings built in at the global level. There are too many aspiring developers finding their way to PHP, being drawn by the crowd, rather than the quality of the language. There is a critical mass of bad information about all the wrong ways we can do things in PHP, and none of them tell you its the wrong way. Are they evil? No, they just don't know any better either.

PHP is not evil. PHP broke the web with nothing but good intentions. PHP still broke the web, and only with a massively backwards-compatibility breaking (and that means no options to enable it back!) revisions to the language would anything be remedied. Even in that case, either everyone will migrate to other languages or the language would fork, because the only way to fix PHP is to become like Perl 6 and not exist at all.

I am beginning to sound like a language bigot.

Comments

Anonymous said…
beginning????


ah, that's ok. i think we all are language bigots anyway. but fighting php is like swimming upstream. unless you care to invent something better. why do you think php is so popular when so many other things are better? 1) it's fast and ubiquitious. 2) it's simple. 3) it has a powerful (in the sense of functionality, not necessarily in terms of quality) standard library
4) the user-annoted documentation REALLY helps, even though a lot of it is stupid or wrong. who cares -- you can solve your problem quickly and easily (albeit wrongly)

basically, php was available and easy. python might be the latter but it's not much of the former.

jamie
eMBee said…
"something better" would be for many people to actually take programming classes and learn how programming is done.

php became popular because it allowed non-programmers access to a programming language.

php is not faster than related languages. it became ubiquitous only because it was accessible to non-programmers.

it is not simple but complex like any programming language. it is easy to embedd into html. but that is a problem in itself.

other languages have powerful libraries too.

yes, the documentation is good.but wrong things are dangerous. and non-programmers do not understand the problems they are creating.

anything better than php would be less easy for the non-programmer or less powerful.
Anonymous said…
and these better solutions exist.
other programming languages,
html templating systems.

they will just never be as popular, because php gets so much attention.

Popular posts from this blog

On Pruning Your Passions

We live in a hobby-rich world. There is no shortage of pastimes to grow a passion for. There is a shortage of one thing: time to indulge those passions. If you're someone who pours your heart into that one thing that makes your life worthwhile, that's a great deal. But, what if you've got no shortage of interests that draw your attention and you realize you will never have the time for all of them?

If I look at all the things I'd love to do with my life as a rose bush I'm tending, I realize that careful pruning is essential for the best outcome. This is a hard lesson to learn, because it can mean cutting beautiful flowers and watching the petals fall to the ground to wither. It has to be done.

I have a full time job that takes a lot of my mental energy. I have a wife and a son and family time is very important in my house. I try to read more, and I want to keep up with new developments in my career, and I'm trying to make time for simple, intentional relaxing t…

The Insidiousness of The Slow Solution

In software development, slow solutions can be worse than no progress at all. I'll even say its usually worse and if you find yourself making slow progress on a problem, consider stopping while you're a head.

Its easy to see why fast progress is better: either you solve the problem or you prove a proposed solution wrong and find a better one. Even a total standstill in pushing forward on a task or a bug or a request can force you to seek out new information or a second opinion.

Slow solutions, on the other hand, is kind of sneaky. Its insidious. Slow solution is related the Sunk Cost Fallacy, but maybe worse. Slow solutions have you constantly dripping more of your time, energy, and hope into a path that's still unproven, constantly digging a hole. Slow solutions are deceptive, because they still do offer real progress. It is hard to justify abandoning it or trying another route, because it is "working", technically.

We tend to romanticize the late night hacking…

Finding "One Game A Month"

I was really excited about the One Game A Month challenge as soon as I heard about it.
For about two years I've struggled in fits and starts to make my way into game development. This hasn't been productive in any of the ways I hoped when I started. Its really difficult to be fairly experienced as a developer, which I believe I am in my day job as a web developer, while struggling really hard at an area in which your experience just doesn't exist.
Its like being a pilot who doesn't know how to drive.

But this challenge provided a new breath to this little hobby of mine. It gave me a scaffolding to experiment, to learn, to reflect on finished projects. I had spent far too much time on game projects that stretched on far past their exciting phases, bogged down by bad decisions and regret.
And it has worked.
I have a lot to learn. I have a lot of experience to gain through trial and error and mistake and discovery. I have a lot of fun to be had making more small games t…