Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
設計のための、問題の捉え方〜ドメイン知識の暗黙知を形式知に〜(まとめ版)
Search
Magnolia.K
November 10, 2018
Technology
36
12k
設計のための、問題の捉え方〜ドメイン知識の暗黙知を形式知に〜(まとめ版)
「2018/11/8 設計Night2018 powered by Classi」で発表した資料です
当日の資料のページ数が多すぎた(140ページ)ので、2/3くらいにまとめました
Magnolia.K
November 10, 2018
Tweet
Share
More Decks by Magnolia.K
See All by Magnolia.K
「ビジネスロジック」と「例外」
magnolia
9
4.1k
「吉祥寺.pm」というIT勉強会を 10年間続けてきた話
magnolia
0
990
吉祥寺.pm18オープニングトーク.pdf
magnolia
0
1.8k
吉祥寺.pmというテックイベントを4年間続けてきた話
magnolia
0
800
Other Decks in Technology
See All in Technology
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
2.1k
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.5k
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
TSのコードをRustで書き直した話
askua
2
140
Evolving Architecture
rainerhahnekamp
3
250
20250116_自部署内でAmazon Nova体験会をやってみた話
riz3f7
1
100
駆け出しリーダーとしての第一歩〜開発チームとの新しい関わり方〜 / Beginning Journey as Team Leader
kaonavi
0
120
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.4k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
4 Signs Your Business is Dying
shpigford
182
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Mobile First: as difficult as doing things right
swwweet
222
9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
GitHub's CSS Performance
jonrohan
1030
460k
Practical Orchestrator
shlominoach
186
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Transcript
ઃܭͷͨΊͷɺͷଊ͑ํ ઃܭφΠτQPXFSFECZ$MBTTJ .BHOPMJB, ʙυϝΠϯࣝͷ҉Λܗࣜʹʙ ʲ·ͱΊ൛ʳ
͜Ε·Ͱͷઃܭʹؔ͢Δٞ w ઃܭͱlΛׂ͠ɺߏԽ͢Δ͜ͱz w దʹߏԽ͢ΔͨΊʹʮύλʔϯʯͱʮઃܭݪଇʯ ͕༗ޮͰ͋Δ w ʮύλʔϯʯΛద༻͢Δࢦ͕ʮઃܭݪଇʯ w ʮઃܭݪଇʯͷద༻ɺlͲ͕͜มΘΓ͍͢ϙΠϯτͳ
ͷ͔zΛݟۃΊΔͱ͜Ζ͔Β l࣮گதܧγϦʔζʮ։ൃݱͰཱͨͤΔͨΊͷઃܭݪଇͱύλʔϯʯCVJMEFSTDPOzΑΓ https://nekogata.hatenablog.com/entry/2018/09/10/163206
ʮΛ͍͔ʹଊ͑Δͷ͔ʹ͍ͭͯʯ ʮ҉ͷϘτϧωοΫ͕Ͳ͏ͬͯઃܭݪଇΛ͏͔ Ͱͳ͘ɺͦͷͷͷଊ͑ํʹҠಈͨ͠ʯͱݴ͑ ΔͰ͠ΐ͏ɻ͜ͷʮͦͷͷͱͷ͖߹͍ํʯͱ͍͏ ࢹΛઃܭʹରͯ͠ಋೖͯͩ͘͠͞Δͷɺ,JDIJKPKJQN ͷΦʔΨφΠβʔͰ͋Δ!NBHOPMJB@L@ࢯͰ͢ɻ
ࣗݾհ 5XJUUFS!NBHOPMJB@L@ 1FSMͱ4DBMB͕͖ ઃܭʹ͍ͭͯͣͬͱߟ͍͑ͯΔ ٢ࣉQNΦʔΨφΠβʔ https://kichijojipm.connpass.com https://twitter.com/magnolia_k_
ࠓ͓ͳ͢͠Δ͜ͱ ͦͦʮΛଊ͑Δʯͱ ʮυϝΠϯࣝʯͷʮ҉ʯΛݟ͚ͭΔ ʮ҉ʯ͔Βʮܗࣜʯม͍͑ͯ͘ ܧଓతʹɺlΛଊ͑ΔzͨΊʹ
ͦͦʮΛଊ͑Δʯͱʁ
ݹయʹཱͪฦͬͯΈΔ ͜ͷຊʹֶΛղͨ͘Ίͷͭͷ εςοϓ͕ॻ͔Ε͍ͯΔ Λཧղ͢Δ͜ͱ ܭըΛͨͯΔ͜ͱ ܭըΛ࣮ߦ͢Δ͜ͱ
;ΓฦͬͯΈΔ͜ͱ ͜ΕιϑτΣΞͷ։ൃͷखॱͱ ಉ͡ͱݴ͑ΔͷͰͳ͍͔ʁ (ϙϦΞஶ ʮ͍͔ʹͯ͠Λͱ͔͘ʯ
ͭͷεςοϓͷɺͭʮΛཧղ͢Δ͜ͱʯʹɺ ·͞ʹʮΛଊ͑Δ͜ͱʯͦͷͷ͕ॻ͔Ε͍ͯΔ Λཧղ͢Δ͜ͱ ཁ 㾎 ະͷͷɺσʔλɺ݅Կ͔ʁ 㾎 ݅े͔ʁໃ६͍ͯ͠ͳ͍͔ʁ
㾎 ͔͖݅ද͢͜ͱ͕Ͱ͖Δ͔ʁ
݅ ͔͖ද͢͜ͱ͕ Ͱ͖Δ͔ʁ
έʔεελσΟ
έʔεελσΟͱͯ͠ɺ༩͑ΒΕͨྸʹ ͳΔΛࢉग़͢Δίʔυʹ͍ͭͯߟ͑Δ l͋ΔྸʹͳΔzΛٻΊΔܭࢉํ๏ɺҎԼͷ௨Γ ྸ͕Ճࢉ͞ΕΔͷɺىࢉʹԠ͢Δͷલͷ ຬྃ࣌ ޕޙ࣌ʣ ͭ·Γɺ๏্ੜͷલʹྸ͕Ճࢉ͞ΕΔ ྫɿ݄ੜ·Εͷਓ݄ʹ ࡀʹ౸ୡ͢Δ ࠜڌ๏ɿྸܭࢉχؔεϧ๏
w ྸग़ੜͷΑΓ೭Λىࢉ͢ w ຽ๏ୈͷنఆྸͷܭࢉʹ೭Λ४༻͢
ͱΓ࣮͋͑ͣͯ͠Έͨ ͷࢉग़ʹ3VCZͷ%BUFϞδϡʔϧΛར༻ require "date" def calc_arrival_day(b_year, b_month , b_day, age)
birthday = Date.new(b_year, b_month, b_day) arrival_day = birthday.next_year(age).prev_day(1) arrival_day.to_s end p calc_arrival_day(2000, 11, 8, 18) # “2018-11-07” ਖ਼͍͕͠ࢉग़͞Ε͍ͯΔ
ͷॲཧͳΜ͔ͩΒ ੜ͕݄ͷਓΛ ߟྀͯ͠ΔΑͶʁ ͱΓ͋͑ͣಈ͍ͨʜͰϨϏϡΞʔ͔Βͷࢦఠ
p calc_arrival_day(2000, 2, 29, 18) ʊਓਓਓਓਓਓਓਓਓʊ ʼɹ"2018-02-27"ɹʻ ʉY^Y^Y^Y^Y^Y^Y^Yʉ ͔֬ʹɺ݄͕ੜͷ߹ɺਖ਼͘͠ͳ͍ ݁Ռ͕ܭࢉ͞ΕΔ
ʜͳ͔ͥʁ
OFYU@ZFBSܭࢉ͕ͨ͠ଘࡏ͠ͳ͍ͷ ߹ɺଘࡏ͢Δ·ͰΛݮࢉ͠·͢ https://docs.ruby-lang.org/ja/latest/method/Date/i/next_year.html ͭ·Γɺʹ݄ͳ͍ͷͰɺ݄ ͕ࢉग़͞ΕɺQSFW@EBZͰߋʹͦͷલ͕ࢉग़͞Εͨ
͍ɺ๏ͷͲ͜ʹ ͦΜͳ݅ॻ͍ͯͳ͍͠ʜ ࢥΘͣɺ͜͏ݴ͍ͨ͘ͳΓ·͢Ͷ
݄ੜ·ΕΛߟྀ࣮ͨ͠ʹม͑ͯΈͨ require "date" def calc_arrival_day(b_year, b_month , b_day, age) birthday
= Date.new(b_year, b_month, b_day) arrival_day = birthday.prev_day(1).next_year(age) arrival_day.to_s end p calc_arrival_day(2000, 2, 29, 18) # “2018-2-28” ݄ੜ·Εਖ਼͘͠ͳͬͨ
݅ɺl͔͖ද͞Εͯz͍͔ͨʁ ʮྸܭࢉχؔεϧ๏ʯ͕ࣔ͢ܭࢉํ๏ɺγϯϓϧ ͳϧʔϧͰʮ݄ੜ·Εʯͱ͍͏ಛҟͳ݅lରԠ Ͱ͖ͯ͠·͍ͬͯΔzʜ͔͠͠ɺٯʹͦͷ͜ͱ͕lಛҟͳ ݅ͷଘࡏΛ͔Γʹ͘͘z͍ͯ͠Δɺͱݴ͑Δ Ծʹɺޙऀͷ࣮͕࠷ॳ͔Β༗ͬͨͱͯ͠ɺίʔυ্ʹ Ͳ͜ʹ݄ग़ͯ͜ͳ͍͜ͱʹมΘΒͳ͍
݅Λl͔͖ද͢zͨΊʹɺͳʹΛ͢Δ͔ʁ ݱঢ়ʮ͏Δ͏Ҏ֎ͷ݄Λߟྀ͢Δʯͱ ͍͏ઃܭͷҙਤ͕ίʔυ্ӅΕͯ͠·͍ͬͯΔ ޙੈͷਓʹɺ͜ͷҙਤΛ͖͢Ͱʁ
ྫ͑ɺςετΛॻ͍ͯҙਤΛ͢ require 'test/unit' class TestArrivalDay < Test::Unit::TestCase def test_calc_arrival_day assert_equal
'2018-11-07', calc_arrival_day(2000, 11, 8, 18) assert_equal '2018-02-28', calc_arrival_day(2000, 2, 29, 18) assert_equal '2017-12-31', calc_arrival_day(2000, 1, 1, 18) end end ·ͨɺ݄ʹର͢ΔϩδοΫΛ͋͑ͯ໌ࣔతʹೖΕɺ ҙਤͷ͔Γ͢͞Λ༏ઌ͢Δํ๏ʜ͋Δ͔͠Εͳ͍
݅Λl͔͖ද͢zͷɺ͍͠ ͷܭࢉͰ͏Δ͏ͷ݄Λߟྀ͢Δͱ͍͏ͷ ൺֱత͔Γ͍͢ࣄྫʜ ݱ࣮ʹɺ౸ୡ͢Δͷ͕͍͕݅͋͠ΓɺΛղ͘ ʹ͋ͨͬͯɺඞཁͳ݅Λl͔͖ද͢zͷ༰қͰͳ͍
ʮΛଊ͑Δʯͱɺ(ϙϦΞͷݴ༿ΛआΓΕɺ Λߏ͢Δͭͷཁૉ ʮະͷͷʯʮσʔλʯʮ݅ʯΛ lదʹἧ͑Δz͜ͱɺͱݴ͑ΔͷͰͳ͍͔
ݱ࣮ʹ͜ͷͭͷཁૉͷ͏ͪɺ ʮ݅ʯΛlదʹἧ͑Δ͜ͱz͍͠ ͳ͔ͥʁ ͦ͜Ͱग़ͯ͘ΔΩʔϫʔυ͕ʜ
ʮυϝΠϯࣝʯͷʮ҉ʯ
ʮυϝΠϯࣝʯͱɺʮ҉ʯ w υϝΠϯͱɺl ׆ಈŋؔ৺ŋࣝͳͲͷ ྖҬ ൣғz ͷ͜ͱ w ͭ·ΓɺʮυϝΠϯࣝʯͱɺ͍·औΓΜͰ͍Δ
ͷɺྖҬʹؔ࿈͢Δࣝ w ʮ҉ʯͱɺݴޠԽɾه߸Խ͞Ε͍ͯͳ͍ ˰ͭ·Γɺॻ͔Ε͍ͯͳ͍͜ͱ
ͭ·ΓʮυϝΠϯࣝʯͷʮ҉ʯͱɺ ʹؔ͢Δl͔͖ද͞Ε͍ͯͳ͍zࣝ
ઌ΄Ͳͷྸͷ౸ୡͷྫͰ͍͑ʜ ʲະͷ͜ͱʳ ɹྸ౸ୡΛࢉग़͢ΔϓϩάϥϜͱʁ ɹbirthday.prev_day(1).next_year(age) ʲσʔλʳ ɹੜ·Εɺʹࡀʹ౸ୡ ʲ݅ʳ ɹ݄ੜ·ΕΛߟྀ͢Δ ɹʢ͏Δ͏Ҏ֎ʹ݄ଘࡏ͠ͳ͍ʣ
๏ͷจ͚ͩͰɺΛదʹཧղ͢ΔͨΊ ʹඞཁͳʮ݅ʯ͕lυϝΠϯࣝͷ҉zͱͯ͠ ӅΕͯ͠·͍ͬͯͨ ҰํͰɺΛѻ͏ϓϩάϥϜΛॻ͍ͨܦݧͷ༗ΔਓͰ͋Εɺ݄Λߟྀ ͢Δ͜ͱʹൺֱత༰қʹࢸΔʜͱࢥΘΕΔ͕ʜ୯ͳΔܦݧ҉ʹͳΔқ͍ ʢ%BUFϞδϡʔϧͷυΩϡϝϯτʹͪΌΜͱॻ͔Ε͍ͯͨʣ
ͰɺͲ͏͢ΕΑ͍͔ʁ ͍ͬͯΔਓʹฉ͚ղܾ͢Δ͔ʁ
͊ʜͳʹΛݴ͍͍͑ͷʁ ͋ͳͨͷ͍ͬͯΔ҉Λڭ͍͑ͯͩ͘͞ ίϨ͡Όͳ͍ײ
ʮ҉ʯ͕જΜͰ͍ͦ͏ͳॴΛߟ͑ͯΈΔ
ࣄ࣮ ؔ ݪଇ
ʮखॱʯʮྺ࢙ࠜڌʯͱ͍ͬͨlࣄ࣮zɺ ҉ʹͳΓ͕ͪ 㾎 ඞཁͳखॱ͕ɺखॱॻʹॻ͔Ε͍ͯͳ͍ 㾎 ࣮ࢪ͍ͯ͠Δਓҙࣝ͠ͳ͍࡞ۀͷ֬ೝ؍ 㾎 ཤྺ ϩά ͷ͞Ε͍ͯͳ͍มߋͷʑ
㾎 ઃܭࠜڌͷ͔Βͳ͍ػೳͷʑ ࣄ࣮͕l͔͖ද͞Ε͍ͯͳ͍z͜ͱͰɺޙੈͷਓ͕ػೳΛཧղվम͢ΔͨΊ ͷʮ݅ʯ͕༰қʹἧΘͳ͘ͳͬͯ͠·͏ ͳͲͳͲʜ
͍ͬͯΔਓɺॻ͔Εͯͳͯ͘ࠔΒͳ͍͔Β
lؔzɺlࣄ࣮zҎ্ʹ҉ʹͳΓ͕ͪ 㾎 ૬ޓʹؔ࿈͢ΔෳࡶͳϏδωεཁٻͱɺγεςϜͷؔ 㾎 άϩʔόϧม͕ଟ༻͞ΕͨϞδϡʔϧߏ 㾎 ࢀরͷͨΊʹ݅ͷଟ͍ςʔϒϧઃܭ औফআ͘ɺ࣮࠶ܝɺॳظ͚ͩҧ͏ʜ ͳͲͳͲʜ ͕ؔl͔͖ද͞Ε͍ͯͳ͍z͜ͱͰɺͲ͏ḷ͍͚͔ͬͯΒͣ༰қʹ
ʮ݅ʯʹͨͲΓண͚ͳ͘ͳͬͯ͠·͏
ʮؔʯɺlʹର͢Δࢹzʜ ࣄ࣮͚ͩΛฒͯݟ͑ͯ͜ͳ͍
Ճ͑ͯɺؔΛݴ༿͚ͩͰ ਖ਼֬ʹදݱ͢Δͷ͍͠
ʮنଇʯͱҧͬͯɺlݪଇz҉ʹͳΓ͕ͪ 㾎 ໋໊͕౷Ұ͞Ε͍ͯͳ͍͕ɺͦͷ๏ଇ͕͔Βͳ͍ ΄ͱΜͲϩʔϚࣈͰɺҰ෦ӳޠͱ͔ʣ 㾎 ػೳׂͷ୯ҐϞδϡʔϧཻ͕ಛఆͷػೳ͚ͩҟͳΔ ͕ɺͦͷࢦ͕͔Βͳ͍ ʢ໌Β͔ʹಛఆͷ୲ऀͷ͚࣌ͩ࡞Γ͕ҧ͏ͱ͔ʣ ͳͲͳͲʜ ݪଇ͕l͔͖ද͞Ε͍ͯͳ͍z͜ͱͰɺͦΕ·ͰकΒΕ͖ͯͨͣͷ
ʮ݅ʯ͕ݟ͑ͳ͘ͳͬͯ͠·͏
ιϑτΣΞʹ͓͍ͯlҰ؏ੑzඇৗʹॏཁͳཁૉ lҰ؏ੑzɺʮنଇʯʮݪଇʯʹΑͬͯͨΒ͞ΕΔ Ұ؏ੑ͕ܽͨ͠ͱ͜Ζʹόά͕જΈ͍͢ʜօ͞Μࢥ͍ͨΓ·͢ΑͶʁ
ʮنଇʯͱɺʮݪଇʯ w ʮنଇʯ໌จԽ͞Ε͍ͯΔͷʢ͞Ε͍ͯΔΑͶʁʣ w ʮݪଇʯඞͣ͠໌จԽ͞Ε͍ͯΔͱݶΒͳ͍ w ແҙࣝʹܾΊͨݪଇʹैͬͯઃܭ͠ɺຊਓ͕͍֮ࣗͯ͠ͳ ͍ͱ͖ͩͬͯ͋ΔʢͳΜͱͳܾ͘Ίͨʜͱ͍͏ͭʣ w ʮݪଇʯΛܾΊͯྫ֎ؚΊͯશͯཏ͢Δͷ͍͠
w ͦͦʮݪଇʯΛܾΊΔΑ͏ͳॳظͷஈ֊Ͱɺͦ͜· Ͱߟ͍͑ͯͳ͍ɺߟ͑ΒΕͳ͍
ʮݪଇʯͷlྫ֎zΛɺ ࠷ॳ͔Βཏతʹڍ͛Δͷ͍͠
͋ΒΏΔʮݪଇʯΛॻ͖ग़ͦ͏ͱ͢Δͱɺ lࣗͷରzΈ͍ͨʹͳͬͯɺ໘͍͘͞
ࣄ࣮ʜ͔ͬͯΔ͜ͱॻ͔Εͳ͍ ؔʜԿ͕ඞཁ͔ɺ༧Ί͔Βͳ͍ ݪଇʜྫ֎ؚΊͯॻ͖͖Εͳ͍ ɹɹɹͦͦҙࣝͯ͠ͳ͍ ͳͥ҉ʹͳͬͯ͠·͏ͷ͔ʁ
Ͱɺڭ͑ͯΒͬͨΓɺ ࣗͷதʹ͋Δ҉ Ͳ͏͢Ε͍͍͔ʁ
ʮ҉ʯ͔Βʮܗࣜʯ
ʮܗࣜʯʹ͍ͯ͘͠ w ʮܗࣜʯͱɺݴޠԽɾه߸Խ͞Ε͍ͯΔ ˰ͭ·Γɺॻ͔Ε͍ͯΔ͜ͱ
ʮࣄ࣮ʯΛlܗࣜzʹ
8)Ͱɺ͔͖ද͢
8) w 8IFO ͍ͭ w 8IFSF Ͳ͜Ͱ w
8IP ͩΕ͕ w 8IBU ͳʹΛ w 8IZ ͳͥ w )PX Ͳ͏ͬͯ
Ͳ͜ʹॻ͔͘ʁ ͍͞Θ͍ɺϓϩάϥϜʮखॱʯɺͭ·ΓIPXͦͷͷ ͔͠͠ɺίʔυࣗମʹIPX༗ͬͯɺXIZΛॻ͘ॴ Ͱͳ͍ ͰɺͲ͜ʹॻ͖͔͘ʁ
https://twitter.com/t_wada/status/904916106153828352 ͦΕͧΕɺॻ͘ͷʹ;͞Θ͍͠ॴߟ͑Δ
͢ॴɺະདྷΛߟܾ͑ͯΊ͍ͯ͘ ςετίʔυɺίϛοτϩάɺίʔυίϝϯτɺ 3&"%.&ɺ(JU)VCɺ2JJUBɺ4MBDLɺXJLJɺ ݴޠͷυΩϡϝϯτػೳ +BWBEPDͱ͔ ʜ ͱʹ͔ͪ͘ΌΜͱݕࡧͰ͖ɺޙੈͷਓ͕౸ୡͰ͖Δॴɺ ࢀরͰ͖ΔܗࣜͰ͢
ݸਓͷ1$ͷϩʔΧϧ ΞʔΧΠϒ͞Εͳ͍.- μϝɺઈର!
lؔzΛܗࣜʹ
ਤදͰɺ͔͖ද͢
ਤදͰɺ͔͖ද͢ w ͞·͟·ͳਤ๏ɾه๏ɺूΊΒΕͨࣄ࣮͔ΒؔΛಋ ग़͢ΔͨΊͷʮࢹʯΛఏڙ͢Δ w ΑΓϏδωεཁٻʹ͍ۙϨΠϠʔΛ͔͖ද͢ʹదͨ͠ ʮϏδωεϑϨʔϜϫʔΫʯ͕ࢀߟʹͳΔ ྫ͑ʮ"T*T5P#FϞσϧʯʮϩδοΫπϦʔʯ w
ΑΓίʔυʹ͍ۙϨΠϠʔΛ͔͖ද͢ʹඪ४Խ͞Εͨ lϞσϦϯάਤ๏zΛ͏ ྫ͑ʮ&3ਤʯʮ6.- $MBTTਤ4FRVFODFਤʜ ʯ
ͳͥؔΛ͔͖ද͔͢ʁ ΫϥεܧঝςʔϒϧͷϦϨʔγϣϯΛఆٛ͠ͳͯ͘ɺ ಈ͘ίʔυॻ͚Δ ͔͠͠ɺͦΕͰઃܭऀͷҙਤΘΒͳ͍ͷͰɺະདྷ ͷͨΊʹɺҙਤͨ͠lؔzΛه๏ɾਤ๏Ͱ͑Δ
lؔzΛίʔυʹຒΊࠐΉ lؔzίʔυʹຒΊࠐ·ΕΕɺΑΓ໌֬ͳʮ੍ʯ ͱͳΓɺʮlΑΓڧ͍zܗࣜʯͱͳΔ ʢݴޠػೳͰΫϥεܧঝΛఆٛ͢Δɺ%#.4ͷεΩʔϚ ʹϦϨʔγϣϯΛషΔʣ
طଘͷਤ๏ɾه๏͋͘·ͰϕετϓϥΫςΟεʜ ࢀߟʹͳΔ͕ɺ߆Γա͗ͣɺ؆қͰΞυϗοΫͰ ͍͍ͷͰɺ·ͣඳ͍ͯΈΔ
܁Γฦ͚͢Ͳɺʮؔʯlʹର͢Δࢹzɺ ͭ·Γlઃܭऀͷҙਤz͕ΓɺΘΔ͜ͱ͕େࣄ
ʮݪଇʯΛlܗࣜzʹ
೦ͳ͕ΒɺʮݪଇʯΛܗࣜʹ͢Δఆܕతͳ ख๏·ͩແͦ͞͏ʜݴ༿จষͰॻ͍͍ͯ͜͏ ʢ༗ͬͨΒڭ͍͑ͯͩ͘͞ʣ
ݫີʹߟ͑͗ͣ͢ɺlݪଇΏΔ͔ͳҰ؏ੑΛ Βͨ͢ͷz͘Β͍ʹଊ͑ͯɺ͔͖ද͍ͯ͘͠
ʮઃܭݪଇʯʮ։ൃํʯʮઃܭࢥʯͳͲɺ ࠷ॳࢄʑٞ͢ΔͷʹɺΕڈΒΕ͕ͪ
ܧଓతʹɺ lΛଊ͑ΔzͨΊʹ
Ұ൪େࣄͳ
lͲ͜·ͰΕ͍͍ͷ͔ʁz
έʔεόΠέʔεͬͯ ݴ͍ͨ͘ͳͬͯ͘Δͭ
ಛʹʮؔʯɺͭ·ΓlࢹzͳͷͰɺ༨ܭͳlࢹz ٯʹࠞཚΛট͖ɺ͔͔Δ ͭ·Γʮૣ͗͢Δ࠷దԽѱʯͱ͍͏ɺ͍ͭͷʹܨ ͕͍ͬͯ͘
େ͗͢ΔʮܗࣜʯɺlܗࣜͷಡΈऔΓํz ͱ͍͏ʮ҉ʯΛੜΈग़͢ ͓ͳ͡Έͷྫɿ EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
ᘳΛࢦ͗͢͠ͳ͍ͨΊͷɺͭͷج४ ʮޙʹ·ͬͨ͘ɺಉۤ͡࿑Λͤ͞ͳ͍ʯ ʮมߋ͞Ε͍͢ͱ͜ΖͲ͔͜ʁʯ ಛʹޙऀɺ֎ΕΔՄೳੑવ༗Δ͚Ͳ ʮมߋ͞Ε͍͢ʯΠίʔϧʮՁ͕ߴ͍Օॴʯ Մೳੑ͕ߴ͍ͷͰɺগͳ͘ͱͦͷٞແବʹͳΒͳ͍
͜Ε·ͰͷΛ·ͱΊ·͢
lΛଊ͑ΔzͱɺlΛཧղ͢Δz͜ͱ ͦͷͨΊʹɺ͜Ε·ͰੵΈॏͶΒΕͨʮࣄ࣮ʯͱɺͦ ͷؒʹ͋ΔʮؔʯΛఆٛ͠ɺͦΕΒ͕ಋ͔Ε͖ͯͨʮݪ ଇʯΛݴ༿ʹॻ͖දͯ͠ΈΔ ͦ͏͢Δ͜ͱͰΛཧղ͢ΔͨΊʹඞཁͳʮ݅ʯ͕ ἧͬͯ͘Δ
ࠓ͓ͳͨ͜͠͠ͱ ·ͱΊ w ͦͦʮΛଊ͑Δʯͱ w ʮυϝΠϯࣝʯͷʮ҉ʯΛݟ͚ͭΔ w ʮ҉ʯ͔Βʮܗࣜʯม͍͑ͯ͘ w
ܧଓతʹɺlΛଊ͑ΔzͨΊʹ
w ͦͦʮΛଊ͑Δʯͱ 㾎 ʹؔ͢Δʮະͷ͜ͱʯʮσʔλʯʮ݅ʯͷ ཁૉΛἧ͑Δ͜ͱ 㾎 ͔͠͠ɺͦͷதͰʮ݅ʯΛἧ͑Δͷ͍͠
w ʮυϝΠϯࣝʯͷʮ҉ʯΛݟ͚ͭΔ 㾎 ʮ݅ʯΛἧ͑Δͷ͕͍͠ͷɺʹؔ͢Δ ʮυϝΠϯࣝʯ͕ʮ҉ʯʹͳ͍ͬͯΔ͔Β 㾎 l҉zʹͳ͍ͬͯΔʮ݅ʯΛ୳ͨ͢Ίʹ ʮࣄ࣮ʯʮؔʯʮݪଇʯʹண͢ΔͱΑ͍
w ʮ҉ʯΛʮܗࣜʯʹม͍͑ͯ͘ 㾎 ʮࣄ࣮ʯɺl8)zΛ໌Β͔ʹ͢Δ 㾎 ʮؔʯɺlࢹzΛ༩͑Δਤ๏ɾه๏Λ͏ 㾎 ʮݪଇʯɺlΏΔ͔ͳҰ؏ੑzͱଊ͑ɺ࠷ॳʹ ߟ͑ͨ͜ͱΛॻ͖ग़ͯ͠ΈΔ
w ܧଓతʹɺlΛଊ͑ΔzͨΊʹ 㾎 lܗࣜzʹશແ͍ͷͰɺશΛࢦ͞ͳ͍ 㾎 ଞͷਓʹlಉۤ͡࿑ͤ͞ͳ͍zͱɺ͜ͷઌ lมΘΓͦ͏ͳͱ͜Ζzͱ͍͏؍ʹྗ͢Δ
ࠓ͞ͳ͔ͬͨ͜ͱ w ࣮ɺʮج४ʯ҉ʹͳΓ͕ͪ w ࣮ɺʮσʔλʯἧ͑Δͷ͍͠ w ʮੳʯʹΑͬͯʮະͷ͜ͱʯมΘΔ͜ͱ͕͋Δ w ݁ہɺἧ͑ͨཁૉΛʮੳʯ͠ɺͦͷ݁ՌΛͲ͏ͬͯ ʮઃܭʯʹܨ͍Ͱ͍͔͘ʁ
࠷ޙʹઃܭʹ͍͖ͭͯͳ ݴ༿Λհͯ͠కΊ·͢
Dick Hamming ʮޡͬͨΛਖ਼͘͠ղ͘ΑΓɺ ਖ਼͍͠Λޡͬͨํ๏Ͱղ͘ํ͕Α͍ʯ
ޚਗ਼ௌ# ͋Γ͕ͱ͏͍͟͝·ͨ͠
ڞಉԽ දग़Խ ࿈݁Խ ໘Խ ҉ ܗࣜ ܗࣜ ҉ ܗ ࣜ
ܗ ࣜ ҉ ҉ தҮ࣍ஶ ʮࣝاۀʯ ʮ҉ʯ˰ʮܗࣜԽʯͱ͍͑ɺ4&$*Ϟσϧ͕ΒΕ͍ͯΔ ྫ͑ϖΞϓϩɺʮڞಉԽʯͷϓϩηεͦͷͷͱݴ͑Δ ʲࢀߟจݙʳ