Information technology disgrace
The world of information technology is made by men and, like any other activity in which human beings are involved in, mistakes happens. Sometimes huge mistakes. And huge mistakes turn out into disgraces. One of these disgraces has a name: PHP.
Here is the story: some days ago wordpress.org released the latest version and I decided to upgrade. No db changes, everything seems ok. But, wait a moment… the sidebar is broken! To be honest, the page itself seems to be broken. I did nothing strange. Ok, let’s rationalize this: ssh on the server, cd to the wordpress directory and issue:
$ php index.php Segmentation fault
What the frack?!? I had no time to investigate more, and I decided to install the most recent working backup (I use GIT to track everything, including db backups) and forgot it for some days. Tonight I decided to solve the problem. I installed everything on my PC and, by hacking the DB, I was able to remove all the sidebar widgets, among which I suspected the guilty should be. Than, from Wordpress admin I added exactly the same widgets, in the very same order and with the same configuration.
Result? No more segfault.
Now, how can a so popular application be so fragile? Are Wordpress guys stupid, or what? No, this time the problem is with the technology. One word suffices: PHP.
Yes, I know, I perfectly know I shouldn’t focus myself on this or that technology, I now Facebook is made with PHP, I know everything, but… as an engineer I simply can’t ignore how poor this language is!
Hey, if I considered the language choice unimportant I should work
in the marketing :-)
End of this rant: I started my own blog, I’ll write it in a real programming languages, Objective Caml, I’ll never be rich but at least I’ll never ever spend 3 hours of my life debugging a PHP buggy blog.
3 March 2009, 05:15
I've always been quite suspicious of most blog software because 80%+ are written in PHP. Wordpress can be fragile because it's not just written in PHP, but incredibly hairy PHP that just barely manages to hold together long enough to get the job done. OTOH, I'm starting to appreciate more and more that aspect of programming - getting the job done. It doesn't matter that WP is garbage on the inside, as long as it gets the job done enough of the time, and is fixable the rest of the time.