On Thu, Mar 16, 2006 at 01:58:46AM +0900, Eric Schwartz wrote:
} I've agreed to give a brief talk on Ruby for the Pikes Peak Java
} Developers Group.  I've done stuff like this before at work, but that
} was for a crowd coming from a background of shell scripting and Perl.
} I'm not much of a Java guy myself, but I know there's a lot of overlap
} between the Java and Ruby communities.  I can easily spend 45+ minutes
} on Ruby no matter what, but if any of you have any suggestions on what
} an audience of Java programmers would be interested in, I'd welcome
} suggestions.
} 
} Here's some topics I plan to cover:
} 
} * Everything's a class.

Well, technically, everything's an object, including classes. This leads
into everything else, so I agree that it should be first.

} * Static vs. dynamic typing, leading into
} * Duck typing.

I moved these two up. It is one of the most crucial differences between
Java and Ruby.

} * Interpreted vs. compiled, and how that affects
}   both language design and performance.
} * Modifying library classes.
} * Modifying individual objects-- emphasis on
}   using this for testing frameworks.

These are all pretty closely related. The unifying concept is that the set
of methods on an object can be modified easily. Ruby is very similar to
JavaScript in this, though I like Ruby syntax better.

} * Briefly cover Test::Unit and maybe JRuby.
[...]
} Any ideas on what else I should cover, or if I should de-emphasize
} some of what I listed above would be welcome.

An incredibly important idea is that everything written in Ruby is executed
code. When a class definition is read, for example, it defines the class by
executing code, not by being compiled. That is why and how things like
attr_accessor work. It also means that when requiring files or including
modules order can matter, unlike Java's import (which just imports a
namespace).

} -=Eric
--Greg