On 3/15/06, Eric Schwartz <emschwar / fc.hp.com> 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.
> * Interpreted vs. compiled, and how that affects
>   both language design and performance.
> * Static vs. dynamic typing, leading into
> * Duck typing.
> * Modifying library classes.
> * Modifying individual objects-- emphasis on
>   using this for testing frameworks.
> * Briefly cover Test::Unit and maybe JRuby.
>
> This is all subject to modification.  I may bring Test::Unit in
> earlier, when I tart talking about duck typing.  I don't, I think,
> want to get into too much comparison between the two languages-- these
> are very knowledgable Java people, much more so than I am.  My best
> approach, I think, is simply to present Ruby to them as a fun
> language, perhaps for prototyping Java solutions, ideally as an end in
> itself.
>
> Any ideas on what else I should cover, or if I should de-emphasize
> some of what I listed above would be welcome.

How about working through some of the examples from Refactoring by
Martin Fowler, or Smalltalk Best Practice Patterns by Kent Beck, using
both Java and Ruby side-by-side?

One thing I really like about Ruby is that certain tasks (like
enumeration) have much less code overhead than in Java, which promotes
nice, small methods that are easy to refactor or rework.  Even if it's
only 6 lines, there's some mental resistance to setting up a loop in
Java.