SlideShare a Scribd company logo
1 of 73
Download to read offline
2008‐12‐05(Fri); 中国料理 菩提樹 
RejectTalks 2008 in オブラブ忘年会
島田 浩二
snoozer.05@ruby‐sapporo.org
日本Rubyの会/Ruby札幌
SHIMADA Koji; Nihon Ruby-no-kai; RubySapporo
From Sapporo, with Love for Object Club
Ruby札幌の方から
来ました
「なんだか一生涯、ずっと旅先にいたような気がし
ますーーいま、僕はふるさとへ帰ってきたのです」
 彼女は母親のように微笑した。
「ふるさとへ帰れるひとなんてありませんよ」と、
彼女はやさしい口調でいった。「でも、お友だち同
士の道がおちあったりすると、しばらくのあいだ、
世界じゅうがふるさとのように見えるものです」
Hermann Hesse 著, 秋山英夫 訳
「デーミアン」講談社文庫版
自己紹介
From Sapporo, with Love for Ruby.
Ruby札幌
主宰/運営チーム
島田 浩二
snoozer.05@ruby-sapporo.org http://ruby-sapporo.org
http://iddy.jp/profile/snoozer05/ http://twitter.com/snoozer05
しまだ こうじ
Photo by kakutani.com
http://www.flickr.com/photos/68498640@N00/1711263422/
どうぞ
よろしく
お願いします
参加理由
先週の出来事
仕事の打ち合わせ
が12/5に東京で
2008/12/5 東京
オブラブ忘年会∼ふりかえり2008∼
✓ 申し込み完了
✓ 諸々スケジューリング
準備万端
のはずが
仕事の打ち合わせ
が12/5に東京で
仕事の打ち合わせ
が12/5に東京で
せっかくなので
自費で来た
イマココ
OOとの関わ
り的自己紹介
扉を開いた
最初の一冊
こんなに心を持っていかれる
技術書に出会ったのは初めてだった
冒頭で語られる
ケントベックのかっこよさ
重度のケントベック廚に
今年の活動
続きは
http://ruby-sapporo.org/
まだまだ道の途中
もっともっと勉強して
もっともっといろいろな所に貢献して
いつかXPJUGや
オブジェクト倶楽部に
話しに来れるといいな
本題
http://www.flickr.com/photos/mio-spr/2042538806
Fluent interfaceと
動線と
Talking about “Fluent interface” and “Flow line”
島田 浩二
SHIMADA Koji; Nihon Ruby-no-kai; RubySapporo
snoozer.05@ruby‐sapporo.org
日本Rubyの会/Ruby札幌
きちんとした資料は
http://ruby-sapporo.org/
アジェンダ
✓ 2種類の利用者
✓ 3つの車輪
✓ 1つの視点
✓ まとめ
http://www.flickr.com/photos/srijith/1867095482
2種類の利用者
インターフェイスの利用者
✓コードを書く人
✓コードを読む人
読んだことが流れるように
頭に入ってくる
考えたことを流れるように
コードにすることが出来る
コード
Fluent interfaceが
生み出したい 流れ
インターフェイス
利用者
http://www.flickr.com/photos/fuckr/91530309
3つの車輪
Fluent interfaceの車輪
✓ メソッドチェーン
✓ カスケード
✓ セマンティクス
http://www.flickr.com/photos/17258892@N05/2588347668
やってみて
感じたこと
大事なこと
はあまり
変わらない
✓責務の振り分け
✓返り値
✓引数
✓メソッド名
+α
http://www.flickr.com/photos/srijith/1867095482
流れ
読んだことが流れるように
頭に入ってくる
考えたことを流れるように
コードにすることが出来る
コード
Fluent interfaceが
生み出したい 流れ
インターフェイス
利用者
読んだことが流れるように
頭に入ってくる
考えたことを流れるように
コードにすることが出来る
コード
Fluent interfaceが
生み出したい 流れ
インターフェイス
利用者
読んだことが流れるように
頭に入ってくる
考えたことを流れるように
コードにすることが出来る
コード
Fluent interfaceが
生み出したい 流れ
インターフェイス
利用者
読んだことが流れるように
頭に入ってくる
考えたことを流れるように
コードにすることが出来る
コード
Fluent interfaceが
生み出したい 流れ
インターフェイス
利用者
Fluent interfaceとい
う観点でインターフェイス
を見つめる行為は、イン
ターフェイスの具体的な利
用者のことを強く考えさせ
てくれる
...a programmer’s job is too communicate
with other programmers, not just a machine.
Programming, then, is a human task
done by humans for humans.
Oh, and writing good code at the same time.
プログラムは、マシンにだけではなく、
自分以外のプログラマに向けて書かれるべきなんだ。
そうすることで、プログラミングは
人による、人のための、人の仕事になる。
もちろん、それは良いコードにもなっているんだよ。
- Kent Beck「Implementation Patterns」
Fluent interfaceは
インターフェイスも人に
向けて書かれるべきだと
改めて教えてくれている
http://www.flickr.com/photos/suvcougar/
飛躍
インターフェイス
設計に動線という
メタファを持って
これないだろうか
動線
動線
✓ 建物の中を、人が自然に動く時に
通ると思われる径路
✓ 建物の間取りをするときに気をつ
けるべきこと
✓ 設計の際に利用者の行動パターン
を予測し、より明快に、また移動
距離が長くならないよう考慮する
http://ja.wikipedia.org/wiki/%E5%8B%95%E7%B7%9A
利用者の行動パターン
を予測し、より明快
に、移動距離を短く
勉強中
http://www.flickr.com/photos/storm-crypt/2280100565
どうやって見つけるか
これまでの作業は机の上でできてい
ます。確かに現場の条件をよーく考
慮して、このスケッチは出来ていま
す。でも気をつけて下さい! これ
は、あくまで、机の上の「絵」にす
ぎません。現場で、直接、原寸で、
絵を描いて、はじめてリアルな形と
なるのです。
動線の
見つけ方
どうやって見つけるか
✓ TDD
✓ テストコードが最初の利用者
✓ インクリメンタルな開発
✓ こまめにリリースすることで実際
の利用者からフィードバックを受
ける
まとめ
✓ 2種類の利用者
✓ コードを読む、コードを書く
✓ 3つの車輪
✓ メソッドチェーン、カスケード、
セマンティクス
✓ 1つの視点
✓ 利用者に価値があるかどうか
ここまでのまとめ
インターフェイスに対
してプログラミングす
るのであって,実装に対
してプログラミングす
るのではない (GoF)
より良いインター
フェイスを探求す
る僕らの冒険はま
だ始まったばかり
http://www.flickr.com/photos/pedrosz/2287112249
未完
どうぞ
良いお年を

More Related Content

More from Koji SHIMADA

20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learnedKoji SHIMADA
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-RubyKoji SHIMADA
 
20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporoKoji SHIMADA
 
20100626-We-Think-We-Act
20100626-We-Think-We-Act20100626-We-Think-We-Act
20100626-We-Think-We-ActKoji SHIMADA
 
20100526 The Productive Programmer
20100526 The Productive Programmer20100526 The Productive Programmer
20100526 The Productive ProgrammerKoji SHIMADA
 
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your SystemKoji SHIMADA
 
20100213 Where The Street Has No Name
20100213 Where The Street Has No Name20100213 Where The Street Has No Name
20100213 Where The Street Has No NameKoji SHIMADA
 
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean CodeKoji SHIMADA
 
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Koji SHIMADA
 
RubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doRubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doKoji SHIMADA
 
20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with RubyKoji SHIMADA
 
20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 SapporoKoji SHIMADA
 
Talking About Fluent Interface
Talking About Fluent InterfaceTalking About Fluent Interface
Talking About Fluent InterfaceKoji SHIMADA
 
20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaConKoji SHIMADA
 
20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtmlKoji SHIMADA
 
20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRubyKoji SHIMADA
 
20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi FreaksKoji SHIMADA
 
20080521-Ruby-on-Rails-Security
20080521-Ruby-on-Rails-Security20080521-Ruby-on-Rails-Security
20080521-Ruby-on-Rails-SecurityKoji SHIMADA
 
The Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslThe Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslKoji SHIMADA
 
Why-is-ImplementationPattterns-important-so-much
Why-is-ImplementationPattterns-important-so-muchWhy-is-ImplementationPattterns-important-so-much
Why-is-ImplementationPattterns-important-so-muchKoji SHIMADA
 

More from Koji SHIMADA (20)

20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby
 
20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo
 
20100626-We-Think-We-Act
20100626-We-Think-We-Act20100626-We-Think-We-Act
20100626-We-Think-We-Act
 
20100526 The Productive Programmer
20100526 The Productive Programmer20100526 The Productive Programmer
20100526 The Productive Programmer
 
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
 
20100213 Where The Street Has No Name
20100213 Where The Street Has No Name20100213 Where The Street Has No Name
20100213 Where The Street Has No Name
 
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
 
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
 
RubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doRubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009do
 
20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby
 
20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo
 
Talking About Fluent Interface
Talking About Fluent InterfaceTalking About Fluent Interface
Talking About Fluent Interface
 
20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon
 
20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml
 
20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby
 
20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks
 
20080521-Ruby-on-Rails-Security
20080521-Ruby-on-Rails-Security20080521-Ruby-on-Rails-Security
20080521-Ruby-on-Rails-Security
 
The Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslThe Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To Dsl
 
Why-is-ImplementationPattterns-important-so-much
Why-is-ImplementationPattterns-important-so-muchWhy-is-ImplementationPattterns-important-so-much
Why-is-ImplementationPattterns-important-so-much
 

Recently uploaded

論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfFumieNakayama
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案sugiuralab
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...博三 太田
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)UEHARA, Tetsutaro
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfFumieNakayama
 

Recently uploaded (12)

論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
 

20081205 Object Club Reject Talks2008