The maze book for programmers!

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

The Buckblog

RubyConf: Day One

1 October 2004 — 5-minute read

I woke this morning from a deep sleep, feeling fuzzy and foggy and befuddled. I had set the alarm for 7:30 (since the continental breakfast started at 8:30), but keep in mind that I’m two hours from my native time zone. My body still thought it was 5:30 (I’d been up until past midnight, local time. Gotta love late flights.)

After taking several minutes to reorient myself and come awake, I got ready and headed downstairs. Breakfast was a bagel, two tarts, and some orange juice.

David Black introduced the conference at about quarter after 9, and things got under way at 10.

Morning Panel

Jim Freeze: Ruby training in a corporate setting

Jim’s presentation was particularly interesting to me, since I’ve been proselyting Ruby like mad at my current job (as a software engineer at BYU). He began proselyting Ruby at his job after only knowing it for 6 months, and was very successful at helping it to become adopted there. Currently, there are over 50 employees that write Ruby code, and if someone does something in Perl they get chastised. :)

He now teaches a 2.5 day course about Ruby, at his job. He said that when doing such training, you should use interactive examples, code reviews, and snacks. He also emphasized that the course is not a presentation. The students should treat it as a class, with exercises, etc.

“Wow ‘em,” he said. Show them `irb`, and things like:

```  irb(main)> 2**2
=> 4
irb(main)> 2**2**2
=> 16
irb(main)> 2**2**2**2
=> 65536
irb(main)> 2**2**2**2**2
=> 200352993...
```

“Can `Perl` do that?” he asked.

He also emphasized showing that everything is an object:

```  irb(main)> 5 * 4
=> 20
irb(main)> 5.* 4
=> 20
irb(main)> 5.methods
=> ["%", "between?", "numerator", ...]
irb(main)> 5.class
=> Fixnum
irb(main)> Fixnum.methods
=> ["method", "send", "name", ...]
```

Most importantly, he said, you should always use the language (i.e., terminology) that the students are familiar with. Examples should be given using terms and situations that they can relate to. Also, in his course, he shows them the “fun” stuff, like the email and http libraries.

Once the students are using Ruby for work, it is important to facilitate their integration into the new environment. Give them all the credit for their work, even if you write most of it at first. Help them feel successful with it.

Lastly, he asked if the 300+ PowerPoint slides he has should be opensourced. The general concensus was “yes,” although the format they should be released as was not determined.

Rich Kilmer: Controlling and Testing Distributed Systems with Ruby

This presentation was supposed to be “Rubyx4DC” by John Knight, but John didn’t show up. Rich graciously offered to pinch hit, and gave this presentation which he originally gave at OSCON.

Although most of his talk was not directly applicable to anything I’m doing, and so was not of particular interest, I did like his speaking style very much. He was also not very complimentary about DARPA research projects and Java programmers. :) One choice quote: “I loved Java at one point, too. I just grew up.” (That might become my new sig line…)

Basically, what I got from Rich’s presentation was this: he and others wrote a Ruby system to test a Java system that was supposed to operate even with up to 40% infrastructure loss. This Java system is called “Cougaar” (and no, it has nothing to do with BYU), and consists of 800,000 lines of Java code. Ultimately, it will be used by the military for logistics, to determine where and what resources are needed, and when.

The Ruby infrastructure, Rich said, works beautifully and wow’ed everyone involved. They wrote an application called ACME (and no, I can’t remember what it stands for) which is data drive, and which tests Cougaar. ACME generates XML scripts (and Ruby scripts, and Python scripts) which are recipes for how a particular test run should proceed. The XML scripts can be over a million lines long. The generated Ruby scripts are 875,000 lines. Rich admitted that they were causing the Ruby interpreter a bit of grief. :)

Dynamic languages, Rich said, are great for testing complex domains. Ruby lets you increase complexity, and increase the abstraction to hide the complexity at the same time. It is also a good substitute for a domain language (one written to handle a specific domain).

Afternoon Panel

Austin Ziegler: Ruwiki

Austin gave a good tour of his Ruwiki project. Ruwiki is a wiki implemented in Ruby, with many good existing (and planned) features. You ought to look at the Ruwiki page for more information on the project.

Hal Fulton: Tycho, a Proposed Ruby-based PIM

I was originally planning to loan my laptop to Hal for this presentation, but I couldn’t get FXRuby to work correctly on it. Hal managed to find another laptop, fortunately.

His Tycho project, although very young, sounds really neat. It is more than just a contact manager, it is an everything-you-want-to-keep-track-of manager. It helps catagorize and manage “notes”, and will provide an API for easily searching and manipulating those notes. He even mentioned that it might be a good use of inversion of control, providing a great lead in for my presentation (which will be Sunday morning).

He encouraged interested Rubyists to hack on the code, to help make it better.

Evening Panel

Paul Brannan: Hacking Ruby

Paul spoke at length about the various ways to extend Ruby, making it do more than it was intended (or ought) to do. He talked about `callcc`, and Florian Gross’ “Binding.of_caller” extension. He also talked about the Ruby/DL library.

One thing that really caught my attention was `Object.become`, an extension which lets you replace one object instance with another, in place. For instance:

```  obj1 = bob = Object.new
obj2 = Object.new

obj1.become( obj2 )
```

If you were to do the above, obj1 (and all variables that point to it) would be the exact same instance as obj2. This means that even the `bob` variable would be changed. This would be a wonderful feature to have in Copland, with the deferred instantation feature. Perhaps “Object.become” will find its way into Ruby…

Rich Kilmer: Alph

This was probably my favorite presentation today. Two presentations in one day from Rich Kilmer—what more can you ask? :)

Alph is a project of his that allows you to interface with an executing (Macromedia) Flash VM, from Ruby. He had to jump through a bunch of hoops to make this work, though—Ruby starts a Java VM, which loads an SWF Frame, which contains a browser, which contains the Flash plugin, which launches Flash. The new Flash VM then calls back into the executing Ruby instance, and they begin communicating over a socket.

This allows you to do things like script Flash animations and interfaces, from Ruby. Very cool. Macromedia should be very, very afraid. :) Rich now wants to create a whole component framework in Flash, for doing layout-based GUI’s. Flash has one, called Flex, but it is encumbered by a very inconvenient license, and it so ticked Rich off that, quote, “it made me want to write my own component framework, in Flash.”

I can relate. :)

Goodies

Can’t forget to mention that I got a copy of the new Pickaxe! It’s a great book, and it’s even signed by Dave Thomas!