R.Tanaka.Ichiro's Blog

主にC# な話題です

目次

Blog 利用状況

ニュース

冷蔵庫にキリンを入れる

例えば、ソフトウェア業界における基本要求は、非常に抽象的です。
実現が困難であったり、矛盾していることも珍しくありません。

現実世界で人が実際に行っている作業を忠実に再現しようとすると、とても扱いにくいモデルを設計することになります。
このため、我々は要求を忠実にモデル化せずに、要求の真意を正確に捉えたものを主軸に詳細要求を検証・分類しながら定義していく必要があります。
このように、設計を常にトップダウンで行うことによって、全体的にバランスのとれた扱いやすいモデルを設計できます。

オブジェクト指向を初心者に語る上で自然界のサンプルを用いると失敗する理由として、初心者は冷蔵庫にキリンを入れることを難しく考えてしまうから、と考えることができます。

「冷蔵庫にキリンを入れる手順を示せ」

とされた時、一般的には大きさの問題を先に解決しようとします。

そして、このようなボトムアップな視点から、以下の回答のように全体が把握できないバランスを欠いた回答ができあがります。


冷蔵庫に入るくらいにキリンを小さくする(冷蔵庫をキリンよりも大きくする)
冷蔵庫に入れる


上記は「冷蔵庫にキリンを入れる手順」は示せていません。

「冷蔵庫にキリンを入れる手順」を全体的に捉える時、大きさの問題を解決するための責任は、冷蔵庫に入れるという手順に委譲します。


扉を開ける
キリンを入れる
扉を閉じる


冷蔵庫に「何か」を入れる行為は全体的に見れば、やはり扉を開けて「何か」を入れて扉を閉めることです。

この「何か」を具象化することで、これに準じる多様な問題が生じます。
そして、その問題は「何か」というオブジェクトに依存します。

どうやって扉を開けるのか?
どうやってキリンを入れるのか?
どうやって扉を閉じるのか?

それらのタイトルに準じた答えは、別に用意すれば良いでしょう。
何故なら、冷蔵庫にキリンを入れる手順の次の次元のテーマだからです。

一部の人はご存じだと思いますが、本日は寝不足で思考力が飛んでしまっております。
こんな妙なこと書いてしまったのも、きっと寝不足のせいです・・・

投稿日時 : 2008年4月25日 13:17

Feedback

# re: 冷蔵庫にキリンを入れる 2008/04/25 13:55 trapemiya

ていうかなぜ冷蔵庫なんだ? まぁ、キリンはよしとしよう。その前になぜ冷蔵庫なんだ?
なぜおまえがウルトラマンなんだ!(ウルトラダイナより)
どう考えても冷蔵庫にキリンを入れるのっておかしすぎる。そう思っている私は既にこの問題の本質から遠い遠いところにいる。

# re: 冷蔵庫にキリンを入れる 2008/04/25 14:03 trapemiya

いや、やっぱりキリンもだめだ。キリンだから冷蔵庫が変なんだ。オブジェクト志向とは抽象化であるから、もっともっと抽象化しなきゃだめだ。そうすると、箱に物を入れる手順となる。難しい問題を解くときはよく単純化して考えるが、単純化すれば見えてくるものもあるということか。
であれば、冷蔵庫とキリンという唐突もない組み合わせを持ってきたのもわかる気がする。そこが狙いなのか?

# re: 冷蔵庫にキリンを入れる 2008/04/25 14:08 れい

まぁあれですよ。
キリンも体積的にはたいしたことないのでね。
体積だけなら業務用冷蔵庫に入るでしょう。
ってことは、あとは形が問題で。

これってあれとおなじですよ。
りんごを正確に3等分しろっていうのとね。

正解:
ジュースにする

# re: 冷蔵庫にキリンを入れる 2008/04/25 14:11 επιστημη

> ジュースにする

キリンレモン?

# re: 冷蔵庫にキリンを入れる 2008/04/25 15:06 THREE-ONE

子供のキリンは人間ぐらいだそうです
なので業務用なら余裕ですね

# re: 冷蔵庫にキリンを入れる 2008/04/25 15:11 凪瀬

冷蔵庫ってのが大きさが想定できるものという意味なのではないでしょうかね。
純然たるひっかけ問題に思えます。
英語での原文はどうなんだろう?「手順を示せ」だと手順を示すだろうけど、
「入れるにはどうしたらよいか?」と言われると大きさの問題を問うているように読むのが正常な読解力でしょう。

# re: 冷蔵庫にキリンを入れる 2008/04/25 15:39 trapemiya

>りんごを正確に3等分しろっていうのとね。

4等分して1個自分で食べちゃったかつお(さざえさん)が正解かと思ったw

>冷蔵庫ってのが大きさが想定できるものという意味なのではないでしょうかね。

そうか。アメリカの冷蔵庫は一般家庭でもでかいのか! 日本だったらタンスになってたんだろうな?

# re: 冷蔵庫にキリンを入れる 2008/04/25 16:11 出水

そもそも、キリンはIItemBoxInsertableを継承していません!
よって、ItemBoxに入れられる形式にしないといけませんので
狩って剥ぎ取って素材にして、今日もキリン装備を作るための狩りが始まるお

今回から、報酬画面で直接アイテムボックスに入れられるので
開けて閉める手間もありませんよ

# re: 冷蔵庫にキリンを入れる 2008/04/25 16:17 通りすがり

人をみるためのテストであれば、個人的には「キリンを冷蔵庫に入れたら可哀想」という答えを書いた人を満点にしたいです。

# re: 冷蔵庫にキリンを入れる 2008/04/25 16:27 アキラ

> そもそも、キリンはIItemBoxInsertableを継承していません!
そこでダックタイピングの出番ですよ
冷蔵庫に入れるものが「冷蔵庫に入れることができる」という
インターフェースを持たなくてはいけないのではなくて
なんとかして冷蔵庫に入れられればいい

# re: 冷蔵庫にキリンを入れる 2008/04/28 16:09 R・田中一郎

trapemiya さん

>ていうかなぜ冷蔵庫なんだ? まぁ、キリンはよしとしよう。その前になぜ冷蔵庫なんだ?

基本的に、麒麟・朝日・札幌・鳥居さんは、冷蔵庫です。

>なぜおまえがウルトラマンなんだ!(ウルトラダイナより)

ジョワッ!

>そこが狙いなのか?

今さら・・・w

---------------------------------
れい さん

>りんごを正確に3等分しろっていうのとね。

おおっ!
なるほど!

---------------------------------
επιστημη さん

>キリンレモン?

キリンレモンって、キリンが入っていたのか!?

---------------------------------
THREE-ONE さん

>なので業務用なら余裕ですね

ってことは、業務用と同じ大きさの家庭用の冷蔵庫でも余裕ですね。

---------------------------------
凪瀬 さん

>純然たるひっかけ問題に思えます。

これは問題形式で書いてあるけど、恐らく説明するための問題だと思いますね。

---------------------------------
出水

>狩って剥ぎ取って素材にして、今日もキリン装備を作るための狩りが始まるお

そんなことすると、捕鯨団体みたいなのが来て抗議されますよw

---------------------------------
通りすがり さん

>個人的には「キリンを冷蔵庫に入れたら可哀想」

素晴らしいです。

「冷蔵庫に入れる前に、そっと逃がしてあげる」もポイント高いかと。

---------------------------------
アキラ さん

>そこでダックタイピングの出番ですよ

アヒルを入れるにはどうすれば良いのかも考えたくなってきます。

# re: 冷蔵庫にキリンを入れる 2016/05/17 3:00 MG

そのキリンを入れられる冷蔵庫を作ってしまえば済む話なのでは?

# For latest information you have to pay a quick visit web and on the web I found this site as a finest web page for newest updates. 2019/05/06 5:31 For latest information you have to pay a quick vis

For latest information you have to pay a quick visit web
and on the web I found this site as a finest web page for newest updates.

# I do not know whether it's just me or if perhaps everyone else encountering problems with your website. It seems like some of the text on your content are running off the screen. Can somebody else please comment and let me know if this is happening to 2019/05/13 11:23 I do not know whether it's just me or if perhaps e

I do not know whether it's just me or if perhaps everyone else
encountering problems with your website. It seems like some of the text on your content are running off the screen. Can somebody else please comment and let me know if this is happening to them too?

This might be a issue with my internet browser because I've
had this happen previously. Cheers

# Hurrah, that's what I was seeking for, what a data! present here at this blog, thanks admin of this web page. 2019/05/17 22:01 Hurrah, that's what I was seeking for, what a data

Hurrah, that's what I was seeking for, what a data!
present here at this blog, thanks admin of this web
page.

# Hey! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup. Do you have any methods to prevent hackers? 2019/08/20 11:41 Hey! I just wanted to ask if you ever have any pro

Hey! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup.
Do you have any methods to prevent hackers?

# Hey! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup. Do you have any methods to prevent hackers? 2019/08/20 11:42 Hey! I just wanted to ask if you ever have any pro

Hey! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup.
Do you have any methods to prevent hackers?

# Hey! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup. Do you have any methods to prevent hackers? 2019/08/20 11:43 Hey! I just wanted to ask if you ever have any pro

Hey! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup.
Do you have any methods to prevent hackers?

# Hey! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup. Do you have any methods to prevent hackers? 2019/08/20 11:44 Hey! I just wanted to ask if you ever have any pro

Hey! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup.
Do you have any methods to prevent hackers?

# If you desire to obtain a good deal from this piece of writing then you have to apply these strategies to your won weblog. 2019/08/24 2:16 If you desire to obtain a good deal from this piec

If you desire to obtain a good deal from this piece of writing then you have to apply these strategies to your won weblog.

# Thanks for finally talking about >冷蔵庫にキリンを入れる <Liked it! 2019/08/24 15:19 Thanks for finally talking about >冷蔵庫にキリンを入れる &

Thanks for finally talking about >冷蔵庫にキリンを入れる
<Liked it!

# I've been browsing online more than 3 hours as of late, yet I never found any fascinating article like yours. It is lovely value enough for me. In my opinion, if all webmasters and bloggers made excellent content as you did, the web will likely be much mo 2021/08/24 6:46 I've been browsing online more than 3 hours as of

I've been browsing online more than 3 hours as of late, yet
I never found any fascinating article like yours.
It is lovely value enough for me. In my opinion, if all webmasters and bloggers
made excellent content as you did, the web will likely
be much more useful than ever before.

# I've been browsing online more than 3 hours as of late, yet I never found any fascinating article like yours. It is lovely value enough for me. In my opinion, if all webmasters and bloggers made excellent content as you did, the web will likely be much mo 2021/08/24 6:47 I've been browsing online more than 3 hours as of

I've been browsing online more than 3 hours as of late, yet
I never found any fascinating article like yours.
It is lovely value enough for me. In my opinion, if all webmasters and bloggers
made excellent content as you did, the web will likely
be much more useful than ever before.

# I've been browsing online more than 3 hours as of late, yet I never found any fascinating article like yours. It is lovely value enough for me. In my opinion, if all webmasters and bloggers made excellent content as you did, the web will likely be much mo 2021/08/24 6:49 I've been browsing online more than 3 hours as of

I've been browsing online more than 3 hours as of late, yet
I never found any fascinating article like yours.
It is lovely value enough for me. In my opinion, if all webmasters and bloggers
made excellent content as you did, the web will likely
be much more useful than ever before.

# I've been browsing online more than 3 hours as of late, yet I never found any fascinating article like yours. It is lovely value enough for me. In my opinion, if all webmasters and bloggers made excellent content as you did, the web will likely be much mo 2021/08/24 6:50 I've been browsing online more than 3 hours as of

I've been browsing online more than 3 hours as of late, yet
I never found any fascinating article like yours.
It is lovely value enough for me. In my opinion, if all webmasters and bloggers
made excellent content as you did, the web will likely
be much more useful than ever before.

# I all the time used to study paragraph in news papers but now as I am a user of web thus from now I am using net for content, thanks to web. 2021/09/04 12:48 I all the time used to study paragraph in news pap

I all the time used to study paragraph in news papers but now as I am
a user of web thus from now I am using net for content, thanks to web.

# I all the time used to study paragraph in news papers but now as I am a user of web thus from now I am using net for content, thanks to web. 2021/09/04 12:49 I all the time used to study paragraph in news pap

I all the time used to study paragraph in news papers but now as I am
a user of web thus from now I am using net for content, thanks to web.

# I all the time used to study paragraph in news papers but now as I am a user of web thus from now I am using net for content, thanks to web. 2021/09/04 12:50 I all the time used to study paragraph in news pap

I all the time used to study paragraph in news papers but now as I am
a user of web thus from now I am using net for content, thanks to web.

# I all the time used to study paragraph in news papers but now as I am a user of web thus from now I am using net for content, thanks to web. 2021/09/04 12:51 I all the time used to study paragraph in news pap

I all the time used to study paragraph in news papers but now as I am
a user of web thus from now I am using net for content, thanks to web.

# Awesome! Its really remarkable paragraph, I have got much clear idea on the topic of from this paragraph. 2021/09/06 17:32 Awesome! Its really remarkable paragraph, I have g

Awesome! Its really remarkable paragraph, I have got much clear
idea on the topic of from this paragraph.

# Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment didn't show up. Grrrr... well I'm not writing all that over again. Anyhow, just wanted to say excellent blog! 2021/10/26 0:26 Wow that was unusual. I just wrote an really long

Wow that was unusual. I just wrote an really long comment but after I
clicked submit my comment didn't show up. Grrrr... well I'm not writing all that over again.
Anyhow, just wanted to say excellent blog!

# Hello i am kavin, its my first time to commenting anyplace, when i read this paragraph i thought i could also create comment due to this brilliant post. 2021/10/27 0:25 Hello i am kavin, its my first time to commenting

Hello i am kavin, its my first time to commenting anyplace, when i read this paragraph i thought i
could also create comment due to this brilliant post.

# Howdy! I could have sworn I've been to this website before but after going through some of the articles I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll be book-marking it and checking back regularly! 2021/11/12 10:01 Howdy! I could have sworn I've been to this websit

Howdy! I could have sworn I've been to this website before but after going through some of the articles
I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll
be book-marking it and checking back regularly!

# Howdy! I could have sworn I've been to this website before but after going through some of the articles I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll be book-marking it and checking back regularly! 2021/11/12 10:01 Howdy! I could have sworn I've been to this websit

Howdy! I could have sworn I've been to this website before but after going through some of the articles
I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll
be book-marking it and checking back regularly!

# Howdy! I could have sworn I've been to this website before but after going through some of the articles I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll be book-marking it and checking back regularly! 2021/11/12 10:02 Howdy! I could have sworn I've been to this websit

Howdy! I could have sworn I've been to this website before but after going through some of the articles
I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll
be book-marking it and checking back regularly!

# Howdy! I could have sworn I've been to this website before but after going through some of the articles I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll be book-marking it and checking back regularly! 2021/11/12 10:03 Howdy! I could have sworn I've been to this websit

Howdy! I could have sworn I've been to this website before but after going through some of the articles
I realized it's new to me. Regardless, I'm certainly happy I discovered it and I'll
be book-marking it and checking back regularly!

# Article writing is also a fun, if you know afterward you can write otherwise it is difficult to write. 2021/11/12 13:55 Article writing is also a fun, if you know afterwa

Article writing is also a fun, if you know afterward you can write otherwise
it is difficult to write.

# Article writing is also a fun, if you know afterward you can write otherwise it is difficult to write. 2021/11/12 13:56 Article writing is also a fun, if you know afterwa

Article writing is also a fun, if you know afterward you can write otherwise
it is difficult to write.

# Article writing is also a fun, if you know afterward you can write otherwise it is difficult to write. 2021/11/12 13:57 Article writing is also a fun, if you know afterwa

Article writing is also a fun, if you know afterward you can write otherwise
it is difficult to write.

# Article writing is also a fun, if you know afterward you can write otherwise it is difficult to write. 2021/11/12 13:58 Article writing is also a fun, if you know afterwa

Article writing is also a fun, if you know afterward you can write otherwise
it is difficult to write.

# I simply couldn't leave your web site before suggesting that I extremely enjoyed the standard info an individual supply on your visitors? Is gonna be back frequently to check up on new posts 2021/12/26 16:06 I simply couldn't leave your web site before sugge

I simply couldn't leave your web site before suggesting that I
extremely enjoyed the standard info an individual supply on your visitors?
Is gonna be back frequently to check up on new posts

# ロレックス 値上げ 予想 2023/03/10 7:19 kxcyflvxzi@excite.co.jp

ずっとほしかったルイヴィトンの長財布、ネットでいろいろ検索して、値段、デザイン共に気に入ったのでこちらのお店で購入させてもらいました。包装は隙間にも詰め物がしてあり傷つかないような丁寧な包装で手元に届きました。きっちりとした安心できるお店だと思いました。商品説明でカード入れが反っていると書いてありましたが自分用だし全く問題ない程度でした。手書きのお手紙も入っており、気持ちよく買い物できました。今後もブランド品を購入する時は夢市場プレミアさんで購入 したいと思います。
☆送料無料☆未使用品☆【送料無料】★ルイヴィトン★モノグラム★ポルトフォイユ エミリー★ファスナー付長財布★ルージュ★M60136★
念願のルイヴィトンの長財布購入しました(^-^)
ダメージは思ってたよりも気にならず、新品だしいい買い物でした!満足です。
ロレックス 値上げ 予想 https://www.gmt78.com/product/detail/399.htm

タイトル  
名前  
Url
コメント