Ruby on Rails. Love it. Hate it.

I’m sold to using RoR in my web applications but I still love to read analysis exposing the “dark” side of Ruby, and Ruby on Rails. When fellow programmers cite the weaknesses of a language (or tools) that we use, we can learn how to use it better and not fall into traps. It will also get us into thinking whether this language is suited for the task at hand. When fellow Pinoy Ruby developer Earl Lapus posted a link in the Philippine Ruby mailing list with the subject “something negative”, I quickly followed the link and read Greg Luck’s post “Report from OSCON2006: The Ruby Conspiracy“.

However, I was disappointed. His post was a rant, rather than an objective analysis that I hoped for. I am not familiar with Oracle behavior nor a significant understanding of Hibernate so I can’t comment on his remarks about ActiveRecord’s deficiencies.

In general, I wish Greg has put more data to backup his claims. He mentioned that Ruby is 15 times slower than Java. How did he find out? In contrast, when I posted an essay on the Philippine Weavers website, fellow Pinoy programmer Nimrod Abing emailed me his Rails test setup and even pointed where Ruby’s performance could be improved.

Regarding the productivity improvements, Greg should show some numbers like lines of code over time, or features done with a head-to-head comparison of Ruby and Java. When Rick Bradley and his team converted from Java to Ruby, their 20,000 lines of Java code was reduced to 800 lines of Ruby of Rails.

Still, I agree that Ruby’s performance could still be improved. Even though Matz did not design it to be a very fast language, it would certainly benefit Ruby. My friend Neil told me that Ruby is slow because it is a pure interpreter unlike Python, which can be translated to bytecodes.

I am also delighted to know that there are programmers who hate Ruby on Rails. When a piece of technology polarizes programmers, it means something very important and dear to our programming heart is involved that we take sides. If programmers neither love nor hate a technology, it means the technology is mediocre.

Lastly, this guy think Ruby on Rails is f****** horrible.

10 thoughts on “Ruby on Rails. Love it. Hate it.

  1. “their 20,000 lines of Java code was reduced to 800 lines of Ruby of Rails”

    Is this because Ruby is a fantastic language, or because Java is a poor language, which strongly favors verbosity and boilerplate over rapid development?

    At least for desktop applications, Java is and has been for years “the very verbose and lots of boilerplate” option.

  2. Well he does have a point about ActiveRecord being potentially a performance bottleneck. And there are numerous studies out there already that cite scaling issues but these are mainly due to the use of inefficient web servers/fastcgi than with ruby/rails as a platform itself.

    There are many good things about Ruby on Rails, mainly the ease with which one can quickly accumulate novice knowledge about the framework. The problem is that the advanced features are much more difficult to master, frighteningly moreso than the initial ease of setting up a simple website and amazing (but actually rather useless) scaffolding show-and-tells.

    One minor detail that often gets left out is how dreadfully awful ruby on rails deployment is. Nobody can say they’ve truly experienced rails unless they’ve tried using Capistrano with enough webhosts and server configurations to lose the hairs on their heads. Minor variations in the way webhosts configure their servers can cause all kinds of weird errors to pop up. And the core team have themselves admitted that deployment is one of the critical weaknesses that need to be addressed. Personally, I think its a matter of time before they figure this out, but if you’re looking for a huge negative to rails, you need to look no further than deployment. ASP.Net is light years ahead of Rails in this regard.

  3. Fortunately for me, I am still don’t have to deploy to multiple servers and so far I can live without Capistrano. I tried it once but I can’t make it work.

    Unfortunately, I can’t attest to ASP.Net’s deployment capability but my friends tell me that the tools they use are so damn good. I guess this is the advantage of having a single vendor that has control of the development and the deployment machines.

  4. I think one solution to the deployment issue would be for the Rails team to come up with some kind of certification program, especially for web hosts so that they can more tightly control how hosts are configured in such a way that the configuration jives well with what is expected by Capistrano Rails. There are far too many webhosts out there that claim to “support” ruby on rails in a self-serving attempt to gain more customers when in reality their configurations make deployment more hellish than really necessary. Webhosts should not be allowed to claim “we support rails” if they don’t also support Capistrano.

  5. I strongly agree. When I was looking for a Rails hosting, it took me a while because a lot of companies I’ve looked into seem to just smacked a “we support Rails” text in their homepage. I wasn’t actually looking for a Capistrano support (back then I have no idea about it) but these hosting companies support every OS and language out there and it made me suspicious. Also, there is no clear proof that they support Rails. Eventually, I settled with site5.com. I was looking at TextDrive but it’s too expensive for me.

    With the absence of a certification program, I guess we should rely for now on recommendations from friends, colleagues and notable Rails guys.

  6. Hey Greg, good choice on Site5 hosting… My blog happens to be hosted with them and they have a fairly active community and quick service response time. I have heard that overall, Dreamhost is better though for people who desire more advanced features (I think Dreamhost runs lighttpd and allows you to install mongrel which is a no-no over at Site5).

    It’s always a pleasure reading your blog and your thoughts on RoR. By the way, have you considered moving your blog over to a Ruby/Rails based blog engine such as Typo or Mephisto? I strongly recommend Mephisto, and would be more than happy to provide you with any assistance should you choose to do so =)

    By the way, do you mind if I link to you in my blog? I hate having to remember blogs I enjoy reading..

  7. Hi Raymond,

    I once thought of moving to Typo but my current domain and webhost is provided for free by a friend. Their hosting company does not support Rails yet. But, another friend and I wants to use Typo for a new blog we’re setting up. Since you already recommended Mephisto, we’ll give it a shot. I’ll definitely need your help with this🙂

    Link to my blog? Sure, no problem. It feels great that some people enjoy reading my blog🙂

  8. Hi Greg, I plan on writing a step-by-step walkthrough on how to install Mephisto properly. As of now, I only have a few articles on how to extend Mephisto’s functionality. Have a visit to my blog, blog.wetonrails.com, it runs on Mephisto and so far it’s been rather stable despite all the changes I’ve made to the engine.

  9. Greetings,

    I am working as software engineer in an Indian firm and now planning to work on ROR.
    So if you please help me and can answer my some of questions:

    1: we know that ROR application can be deployed on different servers using utility capistrano, i would like to know that if we can
    deploy ROR app without using capistrano utility.
    If yes, then what type of work and how much work we have to do to do the same.
    Or what other tools are there just like capistrano to do the same work.
    Deployment concept is same of remoting concept of .net or DCOM. Is that right?

    2: Is there a concept of synchoronous and asynchoronous processinf in ROR app, if yes then how we can implement the asynchoronous in
    ROR.

    I will be thankful to you for your help.

    Best Regards,
    Harbans Goyal

  10. Hello ,

    My previous seminar went well. Now I have an another query, if you help me in this also.
    As there is a concept of remoting in .net,
    is this possible to deploy the components in ROR and to make these components communicate with each other as done in remoting concept?
    Is this possible in ROR?
    Please guide me.

    Thanks
    Harbans

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s