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.