PHP
Yeah I know this is probably a touchy topic, especially for my first blog post, but it bubbled up to the top of my list while setting up this blog software. I chose to go with WordPress open source blog software for numerous reasons (none of which I will go into because that is not the point of this article) and this software happens to be developed in php and thus the reason why loathing php is on the fore-front of my mind. I will not be touching on the many many technical deficiencies of php, but rather my own take on a recent run-in and ongoing feelings of the language as a whole.
I am well aware that there are plenty of wonderful things about the language’s capabilities seeing how I have developed in it for quite a few years now. My beef is not so much with the performance or functionality but more with the very apparent sloppiness/ugliness of the language. Perl has gotten a bad rap for years due to it’s loose style enforcement and difficult readability, yet php stays pretty unscathed in this arena and I am not sure why.
The main thing that annoys me about php is the mixing of functional server side code and html content. Every language that has the capability of being used as a cgi server app has developed specific templating to avoid this very debacle. Just looking at what is really just an html page that has embedded php in it makes my eyes cringe (and sometimes bleed). I don’t care if apache has a built in php interpreter that makes running php cgi apps much quicker than most it’s competitors, having to develop in it gives me a headache. Besides, any well written perl or python or even ruby under the right circumstances (mod_perl, RoR, etc) will give you comparable performance and does not make me want to pull out my hair (if I had any).
I have added a wp plugin here that allows users to contact me through a web-form and after much reading and researching I decided to go with one that implemented a bit of security to try and combat spam by using captchas. easy enough right? Wrong. Of course the GD image libraries were required for this, but guess what, GD was not enabled in my vanilla install of php. Should be easy enough to download some sort of module right? Of course not. You have to completely recompile php all together just so you can configure php to use the GD image libraries. Okay, I can do that. 3 hours, 15 rpms and over 20 attempts later I finally get the new php to complete a successful configure but not before having to pass it about 27 command line options because for some reason the most basic shit, like MySQL support, is not included by default. Finally I can run through the make and make install process and get this lame contact form plugin to work properly. Wait, guess not. Minutes after successfully configuring php, my joy became rage as I watched the make process die with some stupid obscure message that didn’t mean anything.
So in the end, I disabled the captcha feature for the plugin and will wait and see if the spam freaks light up my inbox. I am not exactly a novice at this stuff either. I have rejoiced in being a somewhat advanced Linux administrator for over 8 years and have been writing code and compiling kernels for almost as long. It just pisses me off when I have to babysit a configure process and hold it’s little hand and walk it through step-by-step because it was not smart enough to be able to run on it’s own.
Soooo, php sucks. It invokes feelings of deep, deep hatred every time I have to look at it. I wish to God it never got so popular. I can only hope it dies a very quick and painful death. In the end, if a good tool such as WordPress is written in php and just does what it is suppose to do, it should not matter what language it was written in because it should be transparent to the user, but in my case customization has made it necessary for me to roll up my sleeves and dive into the poo pile that is php.
Thank you WordPress developers for putting in your time and efforts to make what is really a great product, even if it is written in a horrid language. Wait, it is monkeys like you that are perpetuating this poor excuse of a so-called ‘programming language’. I pray that you be struck in the heads, only hard enough to make you see the light (no permanent damage desired)
Popularity: 91% [?]
Filed under: Slight Annoyance by admin


Leave a Reply