Gems or Snakes?

After being a very happy Python programmer for 2 years, i have switched to Ruby a few months ago, and though Python is still
my 2nd favourite language, i have never thought of going back to it for a second. In fact, this feeling was so
natural that i did not even think about it’s reason for some time.

If someone compares these two languages just from the technical point of view, the difference is de facto non-existent.
Both languages are built on similar principles, both of them serve essentially the same purpose. What is the secret
sauce of Ruby then? Why did i get attracted to it immediately, past the point of no return? Here are a few points that came to my mind:

‘He is the ONE

  • If a beginner stumbles onto Ruby, there is ONE book he will be pointed to. The PickAxe.
  • If somebody asks which web framework should he use in Ruby, he will be pointed to a specific ONE: Ruby on Rails.
  • If he asks for a starter book on RoR, he will be advised to buy the coolest ONE: Agile Web Development with Rails.
  • If he asks for a discussion list/newsgroup, he will be pointed to the only ONE: ruby-talk.
  • If he looks for an XML processing library, he will be pointed to the standard ONE: REXML.

The list could go on and on…

A Rubyist with no previous Python experience may ask ‘Well, what’s so cool about this? It’s normal’. Well, i am glad that in Ruby is, but Python is a different story. I think it lacks the books like PickAxe and Agile Web Development with Rails, and also the community is divided up between Django, Turbogears, Pylons, Subway, … and the other dozen of web frameworks.


nice application of the DRY principle :-)

Rolling on Rails

If you would ask random people to summarize in one point why Ruby is so popular today, i am quite sure most of them would say ‘because of Ruby on Rails’. This framework is really that cool, believe it or not. Some people are already apostrophing it ‘the language/framework of web2.0′, pointing out that Rails is the next big thing in the web space.

Spread the word

A programming language is essentially a bunch of boring definitions: Some grammar, rules, constructs etc. Even if it is very very cool, no one will notice it unless it is evangelized. That’s why great stuff needs great evangelizators: Perl+Larry Wall. Microsoft+Bill Gates. Ruby+DHH.
To follow the logic, i should have written Ruby+Matz. But i would not write Matz, just as i would not pair Python with Guido van Rossum in this sense. These smart gentlemen are really good at language crafting, but the analogy with Perl/Larry Wall stops here. Fortunately Ruby has a great evangelizator, too, although an ‘indirect’ one: David Heinemeier Hansson, who, in my opinion made Ruby really popular through the Rails framework.

Community

After a few dozen of mails, i have much much better experience with the ruby-talk ML than with python-tutor. Of course one should not judge based on a few dozen mails, but the Ruby community feels to me like a big family, whereas the Python community is more like a bunch of engineers in white suits. Matz’s ‘Why does Ruby suck’ kind of style appeals me much much more than Python’s agnostic approach – ‘Maybe it is not even sure that there is a problem – first you should define what do you think the term ‘problem’ means, anyway’ etc. Of course this rigorous style may appeal to some – but not for me.

Integration [with Java]

From the JRuby page:
[JRuby is] A 1.8.2 compatible Ruby interpreter written in 100% pure Java

On the Jython page, i could not even find the compatibility with java – but according to the page, “The final release of Jython-2.1 occurred on 31-dec-2001″

For comparison: Ruby 1.8.2 is almost the latest stable, and JRuby’s last release was on 27-march-2006. JRuby makes also some Rails integration possible already, and the authors are focusing on other J2EE issues like calling EJBs etc.

I think in a world where Java is the king of the hill (at the moment), Java integration can be a deciding factor.

Goodies

T-shirts. Cofee Mugs. Baseball caps. Other kind of good-for-nothing junk – must haves for all geeks! Of course with their favourite stuff on it. Well, after looking on cafepress.com (and on google in general) Ruby is a winner again when compared to Python.

The list could continue on, but since this entry is already too long i am going to stop here ;-) Of course, as everything on this blog,
this article reflects my opinion, my perception of Ruby/Python. If you think Python is better suited for you, i am not arguing or anything – it would not make sense. However, i think Ruby has much more potential to become widely accepted as a mainstream language right now than Python – and this, besides that i like to code in Ruby much more, will keep me in the Ruby camp for a long-long time…

8 thoughts on “Gems or Snakes?

  1. Thx for the suggestions, Jon! I’ll massage them in if i will have some time…

  2. Doug,

    Wow, what a nice read! I have had exactly the feeling you describe:

    “I was now looking at Python in much the same way I looked at Java after I started using Python”

    The same over here ;-)

    I like your blog very much, i love to read not-strictly-technical sites (.e.g. which are mixing martial arts with programming ;-) , not just programming with programming) , too – and there are a very few of them out there.
    Thx for pointing me to it!

  3. I couldn’t agree with this post more. In fact, I wrote a similar entry on my own blog last week comparing Ruby to Perl and Python. Funny how many of our comparisons hit the nail right on the head (well, at least we agree they do)!

    I don’t think there is much of a comparison between Ruby and Python when it comes down to the web programming space. Both really do essentially serve the same purpose other than this. How does the Python developmental efforts spread across their dozens and dozens of frameworks expect to keep up with the innovations of Rails. I just don’t understand why anyone would want to “guess” which Python framework is best for their project at hand. Maybe one day the Python community will realize their cornucopia of frameworks is a little tedious and make things simple by adopting a standard framework to support.

    Until that it is the case, life is kept simple with Rails.

    Please feel free to check out my comparison (http://www.testearly.com/2006/06/30/newbie-to-ruby/). I’d love to hear any further insights you have on this debatable topic. Thanks again for a great post!

  4. Pingback: 8328c7d5b415

  5. Antioxidants are essential to deal with diseases like macular degeneration, glaucoma, cancer, etc. By the time you receive your Hoodia product it will most likely have been out of soil just over a month.

  6. A lot thanks with your remarkable blogging site. I genuinely adore it and will be back to check out even more information.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>