A Java Guy’s Take On Ruby

July 24, 2007 at 2:05 am 3 comments

After years of Java programming, I thought it was a time for a change. Doing Web 2.0ish things in Java was just simply a pain in the a**.

I researched Python and decided it was not for me because of its philosophy that there is only one way to do something right. I am a firm believer in there is more than one way to skin a cat. And besides, I liked what they were doing over at 37signals so I gave Ruby a shot.

Now dont get me wrong, Ruby is soooo much more enjoyable than Java. But there are a few things that make me wonder what the heck they are smoking over there. Here are my gripes.

  • Hackish 3d party libraries. The gems I’ve been using seem to have been hacked until they worked then forgotten. I don’t see any resemblence to a well thought out library. Maybe that is to be expected coming from Java where everything is over-thought out and over-engineered.
  • Bizzare method names. Things like String.gsub instead of replaceAll, and String.squeeze, and Array.fetch. Maybe these have their roots in God-forsaken Perl.
  • Rediculous abbreviations like eql or elsif. I mean seriously: elsif?? We couldnt just use: elseif or “else if”? Or if we absolutely have to save ourselves from typing that one or two characters why not bash’s elif?
  • #{some_string} is a tad decorative. What’s the issue with using some standard like, oh I dont know, maybe the “+” sign?
  • But thats about it so far so it’s not all that bad, although I sometimes feel as if the object orientation wasn’t setup as cleanly as it could have been. But I will say this: compared to programming in Java, Ruby is awesome.

    I did cheat on Ruby for a day with Smalltalk. I love the concept of Smalltalk but its just not cutting the mustard. I dont like the idea of having a GUI that I have to work from – I work from the shell. When I code I want to use the mouse as little as possible. IntelliJ IDEA really spoils you because its so beneficial to use yet you can switch to the shell easily. With Smalltalk you are stuck in this virtual environment and its really cool, but its almost too graphical. You have to add your Smalltalk “classes” through the class browser and that gets old really quick. And everytime I did something I got a grip of messages giving me tons of options and each option is twice as cryptic as the one before it. Not to mention that the GUI is horrific, and they color code their buttons, and there are cheesy graphics that popup around the windows, and the whole thing feels like you cant just grab it and go code, but that you have to change your entire life to subscribe to this crazy but incredibly tempting cult. Simply too much change for a chef.

    So I ended up going back to Ruby and if the method names continue to drive me insane then I’ll write an include that will overload them. But as of now, I’ll just bury my nose in their documentation and spin a few brian cycles trying to figure out if I could use some of these cryptic methods in my project.


    Entry filed under: Ruby.

    89.1% Success Rate Turning Off Echo In Ruby’s IRB

    3 Comments Add your own

    • 1. Hiren  |  July 24, 2007 at 6:27 am

      ha ha ha, very funny about Smalltalk.
      BTW r u talking about Squeak or VW ?

    • 2. chefscott  |  July 24, 2007 at 2:57 pm

      Squeak. Smalltalk’s got all the right ideas however its just too different from conventional programming to jump right into.

    • 3. Hiren  |  July 25, 2007 at 7:05 am

      i found it easier then conventional programming.
      Just give it time. GUI way is also cool.

      Actually diffrence is coz Smalltalkers do not code after big designs, they designs while coding, so they do not need to code as fast as Java or …. guys.

    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 )

    Google+ photo

    You are commenting using your Google+ 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 )

    Connecting to %s

    Trackback this post  |  Subscribe to the comments via RSS Feed


    %d bloggers like this: