Linked by Thom Holwerda on Sat 24th Dec 2005 21:35 UTC, submitted by anonymous
General Development "Ruby on Rails is just one facet of what makes Ruby great, just like EJB is only part of the Java enterprise platform. Andrew Glover digs beneath the hype for a look at what Java developers can do with Ruby, all by itself. Ruby's syntax is quite different from that of the Java language, but it's amazingly easy to pick up. Moreover, some things are just plain easier to do in Ruby than they are in the Java language."
Thread beginning with comment 78231
To read all comments associated with this story, please click here.
Read the article--or at least glance at it
by on Sun 25th Dec 2005 07:37 UTC

Member since:

The article's author is a recognized Java developer so this article isn't about Java-bashing or written my someone who doesn't understand Java.

Just take 30 seconds to glance at the Java code vs Ruby code in the article.

It doesn't take a genius to recognize how much productivity gains can be achieved by using Ruby.

Obviously, this doesn't mean Ruby should be used for everything--it is going to execute slower (in most cases) compared to Java. Same thing can be said when comparing c and Java. productivity <-> performance

I've programmed in Java for 4+ years, got 3 Java certifications from Sun, mentored around 12-15 Java developers, and yet I am much more productive in Ruby despite having used it for only a six months with no training.

If you haven't tried Ruby programming on a 1+ week project, you're really missing out on a tool that can help you get a massive amount of work done very quickly--without having code you can't understand when revisited the following year.

Think of Java as sitting somewhere between C++ and Ruby regarding the performance vs productivity spectrum.

It is literally possible to replace a 1-year Java project in production with a Ruby version in 2 months. In my experience, it usually runs slower but the extra hardware you can buy with 8 months of development cost savings is *many* times more than the performance difference.

ahmetaa Member since:
2005-07-06

i disagree. when is a project develpoement speed is tied to the language syntax or syntatic sugar? Planning and preparing the logic comes much before, tools are second, syntax is at the end. Java's verbosity shortcomings can easily be compansated by high quality IDE's. C - Java and Ruby are three completely different things you are comparing.
At the end i also disagree that Ruby code is more "understandable". it is just like eperl for god sake. i dont want to start talking about libraries, speed and concurrency issues.. this whole Ruby thing is becoming a big joke.

Reply Parent Bookmark Score: 1

Member since:

>>At the end i also disagree that Ruby code is more "understandable".

After you've developed and maintained numerous systems written in numerous languages, you begin to appreciate languages that require fewer lines of code--but unlike perl, ruby supports language features that make the shorter code easier to understand & maintain.

Shorter code was one initial attraction of perl--but perl wasn't OO, didn't have exception handling, and many other language features that can help make code more easily understandable.

And languages that later kludge OO features onto an existing procedural language aren't exactly a joy to use because of the inconsistent approaches.

>>it is just like eperl for god sake.

I use both perl and Ruby and I disagree. Can you back up your claim or was it purely based on fear of your skills with your current language losing demand?

For example, in ruby, everything is an object which means you can even do a "this is a string value".length to get the length of a string. You can even obtain string values of numeric literals in the same manner.

If you've never used a language that supported blocks & closures, duck typing, mixins, exceptions, etc. then you're like a blind person explaining why a color they haven't seen is worse than one being described.

This reminds me why it took me several months to convince a very hardcore c programmer that using exceptions in c++ was sometimes better than using return values for error conditions. He never used exceptions and only read about it--and hated exceptions before even trying it. The advantages didn't become clear until it was actually used and maintained in production code--now he sometimes even uses c++ exceptions a bit too much in places where performance doesn't matter so its kind of funny.

>>this whole Ruby thing is becoming a big joke.

In what ways is it becoming a big joke? Are you talking about Ruby or RubyOnRails?

IMHO, RubyOnRails is to Ruby what Java Applets were to Java. It was what initially attracted widespread attention to the language but two things will follow (just like Java):

1. people will eventually discover Ruby's benefits outside of Rails (the title of the article which indicates this is already happening)

2. performance will become more optimized--after Java Applet hyped went away and people discovered Java's other uses, we saw massive improvements in performance because these new uses demanded it

Reply Parent Bookmark Score: 0

g2devi Member since:
2005-07-09

> It is literally possible to replace a 1-year Java
> project in production with a Ruby version in 2 months.

Absolutely, but it has little to do with language productivity. It is also possible to replace a 1-year Java project in production with a new Java version in 2 months. Code design work, UI design work, database design, requirements extraction, and unit test design are the hard parts. Once you have those, starting from scratch is relatively simple.

I like Ruby. IMO, it's a cleaner and better designed language than Python. But Ruby isn't god. The reason C became so popular despite lacking most features is that the C designers discovered that it's much better to have a huge reusable library than have a featureful language. At the moment, Java has a huge number of libraries that connect it an enormous number of legacy systems, whereas Ruby has a relatively small number. While it may be possible to create a Ruby for the JVM that interoperates seemlessly with Java's libraries, it wouldn't feel like Ruby (any more than Ruby for .NET feels like Ruby) because it would have to a use "foriegn" libraries in favour of its own. It also wouldn't be documented as well as real Ruby. So if you're going this route, Groovy (which is inspired by Ruby) would be a more natural fit.

So please cut the hype. Ruby is a great language. Java is a great language. Now let's get back to producing great software with each.

Reply Parent Bookmark Score: 1