Skip to content

My language is better then yours …

(Fair warning, if you aren’t a nerd, you might want to skip this post)

Are we (programmers, developers, engineers) still really having these debates? Give me a break. Java vs. .NET, Java vs. PHP, .NET vs. PHP, now Ruby on Rails vs. PHP.

The other day, Jeremy, sent me these. They’re a series of videos created by Ruby on Rails fans, basically comparing PHP vs. Rails. I watched the videos and told Jeremy something along the lines of, “they’re funny, but they’re not really a valid comparison of the languages.” I’ll be honest, I’m too lazy to look up his initial response, but at some point he told me, “they’re entirely valid comparisons.”

My main point was that if you only compare based on what the video’s show, PHP is capable of doing everything Rails is, although the videos, if you knew nothing about the two languages, would lead you to believe that wasn’t the case. I conceded the point that at least to some extent, Rails would win when it comes to Migrations. But even that, you can mimic in some way for PHP, but it might not be QUITE as easily done. You can, without much trouble in fact, abstract your database from your code, you can do MVC, you can do OOP (in fact PHP5 has greatly extended OOP in PHP).

Then I allowed myself to be pulled into the language vs. language debate (although he will most likely claim that somehow we weren’t having a language vs. language debate). It was all quite silly … on both sides if I’m being entirely honest.

I like the fact that PHP will let me put together a quick script without having to go through MVC/OOP/etc etc if that’s all I want to do. I like that it doesn’t make assumptions about how I’m going to set things up, I also like that if I want to get very structured, or even apply a framework, I can. He believes that the fact that Rails forces (force is my word, he would most likely say it just makes a certain way so easy why would you choose another) you into a structure is a plus for the language/framework. He even went on to say/imply that a language that didn’t force that was inferior.

Some of the silliness came in to play later. For instance I think some of the helpers and whatnot available in Rails, while lowering the entrance barrier for new programmers, also create lazy programmers that don’t actually know how things are actually being done, or why it is being done that way. It was silly because earlier in the discussion I had argued that just because PHP allows sloppy code to be written, doesn’t mean the language is at fault, the programmer is at fault. I still don’t really back off of either of my points, I guess that line is just a little fuzzy for me. But I will admit that I could see how me arguing it one direction in one instance then flipping could be seen as odd.

Then later he made the comment that one of the problems in our discussions was we were comparing PHP (the language) to Rails (a framework). That being silly because everything up to that point, and past that point was and continued to be comparing PHP to Rails. Somewhere along the lines I asked if we were comparing PHP to Ruby or PHP to Ruby on Rails. Because if we were comparing PHP to Ruby, the videos were just nonsense. If we were comparing to Rails then we’d need to introduce Cake or Code Igniter on the PHP side, which would again make the videos invalid. He, in some fashion, agreed. Not sure why we continued from there, but we did.

He argued that the great thing about working within the framework and doing things the easiest/forced way was good for when picking up projects from others. My opinion is, you can easily setup standards and processes to create maintainable code within your organization regardless of your chosen language. So that leaves us with having to deal with picking up projects from outside developers. If you think that enough development firms are going to pick up one language so that when acquiring projects from another development firm that it will be easier because it’s written in your language, you’re living in a dream world.

Somewhere he brought up that he thinks PHP programmers are eventually going to go the way of the mainframe programmer, using COBOL as an example. Honestly, one day, that will probably be the case, but good grief that is a premature statement. There are organizations that would label PHP as cutting edge (I wouldn’t agree, but regardless, me myself and I are not the majority), not to mention the large number of large sites running PHP (Wikipedia, Digg, Facebook just to name a few), and Yahoo’s involvement in the community. I would say PHP is still growing, if not exploding. It’s hardly the time to be making funeral arrangements.

So anyhow, I think I’m done ranting about this, but needed to throw it out there. Just to be clear, I think Ruby and Ruby on Rails are great. I consider them powerful tools for development and have not and will not ever consider someone silly for wanting to learn them, nor will I think that my tool-set (PHP + framework or no framework) are somehow superior. I know the language vs. language debate is not going to end here and now. It never will. But, GAH! I’m sick of it. Use what you want to use. User experience is what ultimately matters and they’re all capable of providing similar if not exactly alike experiences. Anyone who disagrees with that needs to come out of their cave.

7 Comments

  1. Allow me a defense :)

    First of all, I still think the commercials point out entirely valid comparisons, but I always stipulated that the were comparsions of the experiences of the majority of coders. There’s a bit of a selection bias here because, since the commercials were made for RailsConf specifically, the audience was by definition already convinced that Rails solved problems endemic to real-world PHP programming. Yes, there are PHP frameworks out there, but they just aren’t used that often. I kept coming back to the point that Rails was a response to a particular climate, not just a language or competing framework. We both agree that this response has merit, I thinkI never said a language that didn’t enforce certain behavior was inferior. I said that you were pigeonholing Rails as a “structured” approach that forced you to do stuff you didn’t want to do, which is flat out wrong. Part of the problem here is that Ruby is a very different language than either you or I are used to. The expressiveness it allows enables all sorts of things we’d never think to do or would think to difficult to do in other languages. I’m thinking specifically of modifying class definitions on the fly, the variety of ways to perform iteration, closures, etc. These are “next level” language features that make any design decisions of the Rails framework much less binding than in other language/framework packages. That would almost certainly apply to ANY framework built in Ruby.There will always be lazy programmers. Rails encourages laziness in the initial stages of writing an app, no doubt. But the need to understand how to write code is not, therefore, rendered moot, but rather deferred to such time a you can’t CRUD your way to a youtube or twitter. Keep in mind that this is totally in line with Agile philosophy - you do the work when it becomes necessary, not ahead of time.It boggles my mind that a guy who uses so much open source code would not give more weight to the advantages of a consistently understood framework. It’s not just for enterprises picking up projects from other firms; it’s new team members. It’s ad-hoc plugin development ecosystems. It’s having a standard that can serve as a jumping off point for real, critical discussions (even ones that demonstrate Rails accomplishes a task poorly, such as performance problems - having a common framework provides a shared, no-need-to-explain context for the problems any Rails app will encounter at certain loads and scales). The communication advantages a community gets from adopting a common framework are ignored only at one’s peril, because those are the guys PHP do-it-from-scratchers (which comprise the bulk of PHP programmers) will be competing with. If and when PHP develops a common framework everybody agrees to work with (which I don’t see happening) they’ll immediately run into the same pros and cons as Rails (which I know you agree with, which is why you think the comparison is bunk, but I’m simply saying that there’s more to it than you give appear to give credit for). This:

    If you think that enough development firms are going to pick up one language so that when acquiring projects from another development firm that it will be easier because it’s written in your language, you’re living in a dream world.

    is flat out wrong - it IS easier, and I know because I’ve picked up the projects before.I’ll concede that PHP has a long way to go before its a dinosaur; I simply meant that to ignore the trend that Rails exemplifies is perilous. You never disagreed with that, though; just clarifying.
    Honestly, I think if you ever get a chance to work professionally with Rails for a month or two, you’ll see what I mean. Even if you used Ruby for scripting or something, you’ll see why Ruby is such a “next level” thing. It’s the expressiveness and language-like feel that makes things much less abstract and more intuitive.

    Posted on 23-May-07 at 11:15 am | Permalink
  2. What, you don’t allow ol and li tags? Ugh.

    Posted on 23-May-07 at 11:16 am | Permalink
  3. The quote you pulled and your response only really show that you didn’t get my point (either through my lack of explaining it, or you not reading it closely enough). My point was that you’re never going to get enough firms to pick up a single language and framework to make the task of taking over existing projects easier. It’s the same for PHP or any other language. There will never be so many firms programming in PHP that it would be easy to move an app from one to another. So with Rails, there will never be enough firms doing Rails development for this to really get enough traction to be a worthwhile argument. You’ll always be taking over a Java project or a .NET project or a PHP project. Sure you can possibly say, “We’ll only work with Rails code” but the chances of that ever being a wise business decision are unlikely.

    As for the last remarks, I think the link I gave you for Chris speaks well to that point.

    “You need to be quite a bit more of an advanced programmer to get into Rails.”

    This type of argument always makes me raise an eyebrow. It can be restated as “Our technology is better, and if you were smart enough, you’d agree.” If I have to be smarter to use your technology, then your technology sucks.

    You may not have been saying I’m not as advanced of a programmer, but you were about as close to it as you can get without saying it.

    Posted on 23-May-07 at 11:33 am | Permalink
  4. … I also kind of think whenever I make a well-founded counterpoint to you, you’re saying, “Ok, well let’s strip that part away.” Comparing Rails to PHP w/ no framework is not a valid comparison. Saying you want to not compare based on the potential of a language is basically the same thing. If we’re not going to deal with the fact that PHP has the potential to take advantage of frameworks, then we might as well rip activerecords or some other piece of RoR off. Sure Rails CAN do activerecords, but we’re not talking about potential, right?

    Posted on 23-May-07 at 12:18 pm | Permalink
  5. Why not compare apples to apples and oranges to oranges? Cakephp vs rails and so on.

    Posted on 24-May-07 at 7:29 am | Permalink
  6. That’s somewhat my point. If we really want to compare Rails to something PHP, then it should be compared against a PHP framework.

    Posted on 24-May-07 at 8:57 am | Permalink
  7. I wrote a comment, but it was so long I made it a blog post instead.

    Posted on 06-Jun-07 at 11:18 am | Permalink

One Trackback/Pingback

  1. [...] decided to respond to my post regarding language vs. language debates, specifically looking at PHP and Ruby / Ruby on Rails. He makes some good points, but there is some [...]