To PHP or not – that is the question

While eagerly devouring the statistics on my first ever developer blog post (SQL Injection – An Important Lesson) I came across this comment:

I find the best way to avoid SQL injection attacks in PHP is to avoid using PHP at all costs.

At first, I chuckled at what I assumed was the intended joke. A kind of developer to developer ribbing, if you will. That I had erred, not in my statements about avoiding SQL attacks but that I had chosen to do so by my use of the PHP programming language. A humorous dig between the acolytes of various programming languages and nothing to get offended by.

I figured I was bigger than that.

But it did get me thinking about the usual arguments involving different programming languages and their use by various developers.

In defense of PHP

At first I wanted to address this issue in the usual “yes, there are problems, but” kind of way. Just defensive enough to come across as passionate yet calmly enough to foster a good discussion about the uses of programming languages and PHP in particular.

I wanted to point out facts like the fact that WordPress accounts for at least a quarter of all websites, that PHP is probably the most accessible language for new developers to learn and use, that the community is widespread and knowledgeable. I wanted to point that yes, we are aware that there are better programming languages out there.

I felt obliged to mention that, like anything on the internet, you could find reports of the problems in PHP like this extensively researched blog post (wow) and the following comments mostly loudly declaiming punishment for anyone daring to admit being a PHP developer and sharing further problems with the language. I felt that I needed to add that you could also find people defending it in the same way that I wanted to.

I wanted to defend my career choices.

But it’s rather pointless, I’m afraid.

Pointless? Why?

That’s a fairly easy question to answer. And the answer is… it doesn’t actually matter what I say. It doesn’t matter because the people who disagree with me are still going to disagree with me at the end, and the people who already agree with me will simply continue to agree with me.

So why bother?

This post actually has less to do with whose programming language is better than whose and more to do with accepting that opinions differ.

The truth is that we could debate this topic for hours. We get precious about our choices. We defend them vigorously and then we resort to juvenile tactics like name-calling when arguments fall short of convincing our peers because they too are attempting to convince us of their point of view.

But all this does is waste time. I don’t care whether you use ASP, JSP, Python, Ruby, C#, C++, PHP or any of the languages that are available for web developers – arguing about them is time wasted that could be spent learning new technologies or helping younger developers, perhaps sharing that new side-project we’ve been working on and getting excited about the things we get to do on a daily basis, things that were non-existent 20 years ago.

Because isn’t that why we all got into programming in the first place?