Ruby Kaigi 2010 Day 2
Holy crap am I tired. It's been a long awesome day. It started out with some excitement:
- Just found out I have an hour time slot when all I prepared was 30 minutes. Ok, time to write some more. #rubykaigi
- Panic! Maybe I'll talk about metric_fu a bit. #rubykaigi
I must have looked at that schedule 20 times and never realized that I had an hour slot. Everyone else had 30 minutes so I thought I did too.
- Attendees of "The Importance and Implementation of Speedy Tests" will also get "Metrics Based Refactoring" at no additional cost! #rubykaigi
I did something I almost never do: Look at crisis as an opportunity (crisi-tunity). I had to write "Metrics Based Refactoring" anyway for Windy City Rails so why not write it now. In less than 4 hours. While watching my friends present at a conference. Looking over those sentences now I can't believe I didn't freak out.
- Ted Han used publicly available data to settle reviewing bais accusations against "The Edge" of hating the PS3 #rubykaigi
- Turns out there was no bais. Math to the rescue! #rubykaigi
- bais? bias? baise? no idea.
You are probably not surprised to find out that I can't spell. Even Eito Katagiri, who did a wonderful job translating my slides, found a bunch of spelling errors and English is not his first language.
- I just pulled out a table in the main hall and the table police where all over me. My mistake. Sorry. #rubykaigi
There were announcements everywhere about not doing this and yet I did. In my defense: I'm an idiot.
- They're giving out an award to the person who committed most to Ruby 1.9.2: Yusuke Endoh #rubykaigi
A very nice gesture. Lots of class here at Ruby Kaigi.
Time for Matz's keynote!
- Matz is talking about Ruby 2.0... again. #rubykaigi
This topic is a staple of Matz's speaking career. I think the first time I saw him talk, years ago, he was talking about Ruby 2.0. Someday...
- "Right now ruby is just good enough" - Matz #rubykaigi
- Matz hates local variable propagation (the lack thereof) but no one else seems to care so he's abandoning it. #rubykaigi
- Ruby's private is not private: it can be accessed from subclasses and overridden by accident #rubykaigi
- Monkey patching modifies the class globally. #rubykaigi
- Classbox is the solution to global monkey patching #rubykaigi
Lots of talk about the mysterious 'classbox.' What is it? Well here's a paper on the subject:
And some pertinent lines from the abstract:
...Unfortunately existing approaches suffer from various limitations. Either class extensions have a global impact, with possibly negative effects for unexpected clients, or they have a purely local impact, with neg- ative results for collaborating clients. Furthermore, conflicting class extensions are either disallowed, or resolved by linearization, with consequent negative effects. To solve these problems we present classboxes, a module system for object-oriented lan- guages that provides for method addition and replacement. Moreover, the changes made by a classbox are only visible to that classbox (or classboxes that import it), a feature we call local rebinding. To validate the model we have implemented it in the Squeak Smalltalk environment, and performed benchmarks.
Now for more Ruby 2.0 preview:
- 5/2 => 2 should be 2.5 or 5/2 (rational) #rubykaigi
- Inheritance in ruby is more for connivence than for other merits #rubykaigi
- Matz is thinking about moving mix-ins to a traits like solution which would have conflict detection (unintentional overrides) #rubykaigi
- You could declare the 'mix' and specify how to deal with conflicting methods. #rubykaigi
- mix Foo, [:*] would copy all constants from the mix, or you can specify which ones you want and rename them #rubykaigi
- mix raises error on method/constant name conflict or removing #rubykaigi
- From Matz's slides "Ruby 2.0, just started, small step from 1.9, should be done soon" #rubykaigi
- Ruby 2.0: Traits, Classbox, Keyword arguments, a few other nifty features #rubykaigi
- There some fierce discussion going on in IRC about the proposed changes in Ruby 2.0 #rubykaigi
The debate on 'mixes' got pretty hot and heavy. Keep in mind that all this IRC chatter is displayed behind Matz while he was giving his keynote because the translations are done in IRC. So you'd be reading a translation of what he said right along with people discussing it.
- My presentation on "Speedy Tests" and "Metrics Based Refactoring" starts at 13:30 (10 min) in room 200 #rubykaigi
- The 'slides' from my presentation on "Speedy Tests" http://is.gd/eHNTN #rubykaigi
I think the talk went very well. Especially considering that I wrote the second half fairly fast.
- I just disparaged integration tests in favor of unit tests. Next up is @p_elliott talking about how he only does integration #rubykaigi
- .@p_elliott does a lot of things to make his integration test fly. I would like to see one of their suites. I could learn a lot. #rubykaigi
So I asked Paul how long their suites take and he said that they develop on 8 core machines and use Specjour to utilize 4 more cores so they tend to run between 5-8 minutes. Pretty damn fast for full stack integration testing.
- Hey, someone else made the 30 minutes vs. 60 minutes mistake. I feel better now. #rubykaigi
Except he found out at the end of his presentation when he asked: "How much time do I have left?" and go the response: "25 minutes." Yipes. Luckily there were a lot of questions.
- .@nusco did a really good job explaining the basics of Ruby metaprograming
- RT @sudhindraRao Whatever works in #java does not work in #ruby. Even huge classes are maintainable. @rubykaigi
- .@nusco's favorite metaprogramming trick is method_missing. I thought he was kidding but he was not. #rubykaigi
When he said method_missing I grabbed the microphone back and responded: "Really?" I couldn't help myself. I tend to avoid method_missing. There's usually a way to do what you want with other programming tricks.
- Modules are extremely decoupled and can be tested in isolation so they are very flexible @nusco #rubykaigi
- Lightning Talks! I'm excited! #rubykaigi
Talking very fast does not lend itself to translation. But still they were very cool. Even better there was a lady in a kimono who would 'gong' you if you ran out of time.
That is awesome.
After the lightning talks a few of us went back to the hotel to drop our things of before the party and we ran smack into this huge festival that happens once a year in Tsukuba. Here are some pics:
The party was super nice. And they had a fantastic spread of wonderful foods and drinks.