Friday, August 27, 2010

The 1st day of RubyKaigi 2010

The 1st day of RubyKaigi 2010 was held (only afternoon) at here.



I attended some sessions and try to report them.
  • If the session has a movie in English, I just write summaries of the article. Please see that movies if you want more details.
  • If the session has a movie in Japanese, I write the article with translating and little-summarizing.
  • If the session has no movies in any languges, I try to write the article with little-summarizing.
  • But, for Ceremonies and Lightning Talks, I only put the link of movies.
  • And I don't translate Q&As in the article because these are the gift for attendees in there.

  • Opening

    Movie(Japanese)
  • Conflicts and Resolutions in Ruby and Rails (The substitute of Kenote by Jeremy Kemper)

    Movie(Japanese and English)
    • Panels
      • by Masayoshi Takahashi
      • by Akira Matsuda
      • by Yehuda Katz
      • by Tenderlove
      • by Matz (as translator)
      • by Leonard Chin (as translator)
    • Theme of this year : Conflicts and Resolutions
      • It is based on the session of Jeremy Kemper at last year's Ruby World Conference
      • We hope you all should here that content not only in Shimane but alos in here. Unfortunately, Jeremy cannot come here.
      • Nowadays, Jeremy commits the largest times to the rails project.
    • Then starts many Q&As on English.
  • Feels like Ruby

    Movie(English)
    • by Sarah Mei
    • Why don't we test of our JavaScript codes?
    • SQL, that can test via Rails.
    • We can write the test using SeleniumHQ, but it's troublesome.
    • Using "Unobtrusive JavaScript" technique: We can test JavaScript easily.
    • Jasmine
      • the JavaScript testing framework
      • BDD style like RSpec.
      • This is NOT depend on DOM.
    • We can do the TDD for JavaScript too.
  • User Experience for Library Designers

    Movie(English)
    • by geemus
    • I wanted to be a library designer.
    • I have contirbuted to Merb, CouchDB and DataMapper.
    • I make the library "fog".
    • A trifling user experience leaves easily user's interest from opensource library.
    • It's important for opensource library to make environment for contributing easily.
    • Stop the monkey-patch
    • Take notice for early-releasing. Then we can expect feedbacks from users.
    • Documents are important, and Tutorialization is more important.
    • Encourage contributors.
    • It's important what thing we should focus.
  • RubyGems, Bundler and the future

    Movie(English)
    • by Carl Lerche
    • Gemfile: list of dependencies
    • require 'bundler/setup' in your application
      • At rails application: in boot.rb
    • bundle install
    • All gems application need are installed by the descriptions in application's Gemfile.
    • Rails development mode : gems are installed to your RubyGems system.
    • Rails production mode : gem are installed to vender/bundle directory.
    • Gemfile.lock: After this file exists, application can use the version described in there only.
    • bundle update rack
      • Update Gemfile with some gems.
    • We plan to feedback the dependency resolver to RubyGems.
  • A frog in a well does not know the great sea (井の中の蛙大海を知らず)

    Movie(English)
    • by Sarah Allen
    • When we develop web applications, we tend to consider our own language only.
    • Using non-default encoding for our web application causes "Mojibake".
    • There are many character encodings, in Japanese area.
    • U+000 ~ U+127 : ASCII = UTF8
    • UTF8 is the default encoding for XML and the only encoding for Flash.
    • Flaws of UTF8
      • Bigger size of character
      • Not avoiding devide the character in middle: causing "Mojibake"
    • Four checkpoints about encoding when you make web application in Ruby.
      • HTTP : http headers
      • Ruby :
        • take notice of different behavior between Ruby 1.8 and Ruby 1.9.
        • You should use Ruby 1.9 because in Ruby 1.8 'jcode' is required.
      • Database :
        • take notice of encoding in three domains : client, connection and server
        • In addition, we must take care of the collation.
      • HTML : Meta tag
  • Truth and Consequences: Handling Ruby 1.9 Encoding in Rails

    Movie(English)
    • By Yehuda Katz
    • What is the encoding?
      • Charatcer is the array of codepoints.
      • Codepoint is just only Number.
      • Unicode is coded character set.
      • String "会議" has different codepoints at UTF16BE, UTF8 and Shift_JIS.
      • UTF8 or UTF16 is Encodings of Unicode.
    • In Ruby 1.8 or Python2, Character is ByteArray.
      • Two characters that are different encodings can sum and get the summed ByteArray.
      • In Ruby 1.8, Matching of regexp of 2 byte chacter depends on the $KCODE value.
    • In Ruby1.9, Character is the struct of ByteArray and Encoding.
      • So if two characters are different encodings, these cannot sum and error occures.
      • If you Encoding::BINARY, character behaves as ByteArray.
    • When application handles Database, Database adapter should handle encoding.
    • For instance, you should use 'mysql2' library (not 'mysql' library).
    • force_encoding : It's only using when character goes over domains.
      • HTTP -> Ruby
      • Ruby -> DB
      • and so on
    • But It is reliable using Encoding.default_external and Encoding.default_internal.
  • Best Imitatiomn of your class

    Movie(Japanese)
    • by Shugo Maeda
    • Flaws of Ruby open-class
      • Influence is global.
      • Coflict same method names. (If you expect or not)
    • Are you really need open-class? Is there any substitutes?
    • Case usgin open-class (and no substitutes)
      • Object is initialize in another classes.
      • Need polymorphic behavior on existing classes.
    • classbox
      • We can change existing classes to add or modify methods in the classbox.
      • There are no influence out of the classbox.
    • Concerns if classbox adopted.
      • Reserved words (classbox/import) increase.
      • What time VM define classbox behavior? (compiling or later)
    • Using ruby module
    • For instance, Kernel#overlay_module(klass, module)
      • It extends klass by module on the scope it called.
      • Pros: Reserved words don't increase.
      • Cons 1: coplicated cref
      • Cons 2: Conflicts of method cache
      • Cons 3: confusion of right order of calling super
    • Demo of Kernel#overlay_module
    • Demo of implementation of classbox using Kernel#overlay_module
    • Ruby can write nested method definitions
      • Inner method can be called from outers: it's bad.
      • Where nested method belongs to?: Matz is worrying.
      • I may adopt Kernel#overlay_module in this case.
    • The "test-all" test for adopting Kernel#overlay_module goes green!
    • But oftenly SEGV :-)
N.B. These summaries may be imprecise.

I hear excitingly Conflicts and Resolutions in Ruby and Rails. There are two notable statements.
  1. ActiveModel and ActiveRelation are not well-separated. And they continue to separate clearly
  2. In Ruby core team, there is a language barrier by existing two mail list, which one is Japanese and other is English. Most important decisions are decided in Japanese only.

No comments:

Post a Comment