Monthly Archives: May 2011

(Programming) Language Wars

So, given my blatant Rubyism, why did I link this video? Well, the first reason, is that it’s funny as hell, and really well written. Even the Ruby-bashing is hilarious… and any community needs to be able to laugh at itself. Sure, Ruby is kinda the faux-hawked hipster of programming languages at the moment. It’s also popular and in the spotlight because it’s FRICKIN’ AWESOME!!!

What I think is more telling, though, is the way this video presents the arguments of the stalwart defenders of PHP, who are usually the first-line Ruby haters. The number-0 argument I typically here in defense of PHP is along the lines of, “more large-scale, successful web projects are built on PHP than any other stack.”

Really? That’s what you’re going to lead with?

More (lines of) large-scale, successful, production code in the world right now is written in COBOL than virtually any other single language.

So by the same argument, COBOL is the BEST language for application development, right?

The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.  ~ Edsgar Dijkstra

Okay, Dijkstra had a gift for hyperbole, but I don’t think you could make the argument that COBOL has any place in the modern computing world beyond the maintenance of billions of lines of legacy code already in the wild.

I’m not equating PHP with COBOL, nor am I suggesting PHP doesn’t have its place. It actually has two places. PHP is great iff:

  1. You’re maintaining a large, legacy codebase written in PHP, or
  2. Your employer/client/whatever has mandated that you use a certain PHP framework for the project.

Now, my personal inclination to case (2) is that it’s time to find a new employer/client/whatever. But that’s just me. I had a point when I started writing this, and ended up kvetching about PHP… it’s like a lot of conversations I have.

The topic I was ostensibly leading up to was that of language wars, or more generally, any of the Holy Wars geeks get up to. Like the Deep Magic, the Holy Wars began in the Elder Days. The canonical Holy Wars are such esoterica as big-endian vs. little-endian, Unix vs. VMS, Apple vs. Microsoft, Vi vs. Emacs, and so on. But you can really substitute [my favorite language] vs. [your favorite language], and so on. Some of this is just geek personality flaws traits shining through, making a choice of text editor seem like a life-or-death decision. On the other hand, I think there’s something else going on here. When you see true vehemence from the community surrounding an established, accepted language/framework/environment toward a plucky little upstart, a number of things might be happening:

  1. The old guard are threatened by something about the plucky little upstart, be it market share, mindshare, or something else.
  2. The old guard are jealous of the people who get to work with the plucky little upstart, and would rather bitch than upgrade their skillset and move on.
  3. The plucky little upstart is actually a complete crock, but for some reason nobody notices and/or cares.

The attitude of (some) PHP coders toward Ruby is reminiscent of how people thought of Linux in the late 90’s. It’s cute and all, but not for real-world, mission-critical applications. Real Unix came from Sun or IBM (guh!) or SCO. And this was also when Microsoft was making their ungodly encroachment into the datacenter.

One of my favorite (like, saved to my favorites on Twitter!) tweets ever comes from David Heinemeier Hansson, the creator of Rails:

Tweet from DHH

There’s always that. If I may be permitted to switch Holy Wars for the moment: IT professionals who don’t actually like computers LOVE Windows on the server for this reason, in my opinion. First, it’s brainless system administration. Secondly, it’s constant system administration. Sure, you can do everything through a GUI, but secondly, you’re doing it all damn day. So you need an admin for every few servers you add to your infrastructure. compare this to Unix/Linux servers, where uptime is measured in years rather than days (hours?), and although configuration requires, um, I don’t know, expertise or competence or something, one admin can take care of 50, 100 servers, natch.

I kinda feel like there might be some similar ill-will coming from the PHP camp toward Ruby. I don’t mean to defame PHP coders as a group. There are some excellent programmers working in PHP. But at the same time, I look at blog posts like Where Did All The PHP Programmers Go?, and it makes me think… the bulk of the PHP code I’ve encountered in my life is of truly dismal quality. Like, Visual Basic spaghetti-code bad. It’s painful. Again, there’s good stuff out there… but it’s hard to find. With Ruby, on the other hand, I haven’t seen much truly bad code. I spend a lot of time clicking around Ruby projects on GitHub, and most of the code I find is pretty decent. Good, even. I don’t think ruby programmers are inherently better coders, but I do think that a language like Ruby makes it easier to follow good design principles, and harder to implement truly bogus crocks. whereas PHP lends itself immensely to bogus crocks (variable variables, anyone?)

This isn’t meant to be an objective comparison of programming languages. More of an extension of my previous thoughts on why I love Ruby so much, expanding more into the area of languages you really couldn’t pay me to work in, in this day and age. And thinking about why. If you feel strongly about languages (whether you’re a Rubyist or a PHP die-hard or none of the above), please tell me why in the comments.

Advertisements