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
su-kun1899
December 15, 2018
Programming
8
7.6k
複雑なドメインに泥臭く立ち向かう
2018/12/15 JJUG CCC 2018 Fall での登壇資料です。
#jjug_ccc #ccc_e4
su-kun1899
December 15, 2018
Tweet
Share
More Decks by su-kun1899
See All by su-kun1899
はじめての Ruby と Ruby On Rails
sukun1899
0
64
息をするようにエラー監視する
sukun1899
0
3.1k
Java屋さんがGoのFAQを読んでみた
sukun1899
0
430
SpringBootとMyBatisでデータベースを可視化する
sukun1899
4
2.4k
ぼくらのコードレビュー
sukun1899
3
630
モノリスの分割
sukun1899
4
770
なまえをだいじに
sukun1899
1
490
Other Decks in Programming
See All in Programming
たのしいparse.y
ydah
3
120
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
110
快速入門可觀測性
blueswen
0
370
Exploring: Partial and Independent Composables
blackbracken
0
100
선언형 UI에서의 상태관리
l2hyunwoo
0
180
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
470
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
130
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
Zoneless Testing
rainerhahnekamp
0
120
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How GitHub (no longer) Works
holman
311
140k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
GitHub's CSS Performance
jonrohan
1030
460k
Transcript
ෳࡶͳυϝΠϯʹ టषཱ͔ͪ͘͏ #ccc_e4 2018/12/15 JJUG CCC 2018 Fall גࣜձࣾΤεɾΤϜɾΤε 1
ձࣾհ #ccc_e4 2
10ޙͷຊΛΑ͘͢ΔࣄΛ͠Α͏ #ccc_e4 3
#ccc_e4 4
ࣗݾհ @su_kun_1899 ϞϒϓϩάϥϚɻΤϞɻ ৺͍ͭͰεΫϥϜϚελʔɻ จܥΤϯδχΞɻ Spockͱ͔ςετͷ͖ɻ web/java/kotlin/agile/scrum ࠷ۙGo͕͖Ͱ͢ɻ #ccc_e4 5
͢͜ͱ #ccc_e4 6
ෳࡶͳυϝΠϯͱઓ͏ͨΊʹ • Ͳ͏ͬͯ࢝ΊΔ͔ • Ͳ͏ͬͯਐΊΔ͔ • (ࢲ͕ͨͪ) Ͳ͏͍ͬͯΔ͔ #ccc_e4 7
͞ͳ͍͜ͱ • ಛఆͷઃܭख๏ • DDD, OOP... • ٕज़ͷৄࡉ • Kotlin,
SpringBoot... #ccc_e4 8
Ͳ͏ͬͯ͡ΊΔ͔ #ccc_e4 9
ෳࡶͳυϝΠϯʁ #ccc_e4 10
• Ξϯίϯτϩʔϥϒϧ • ๏ɾ੍ɾϧʔϧ • ొਓɾγεςϜ • ΦϖϨʔγϣϯ • ࣌ؒ࣠
• εςʔλε • etc... #ccc_e4 11
հޢอݥ #ccc_e4 12
• հޢܦӦࢧԉαʔϏε • ࠾༻ɺӦۀɺڅ༩ɺۈଵɻɻ • հޢอݥٻ • WebΞϓϦέʔγϣϯ • Kotlin
+ SpringBoot #ccc_e4 13
ਆಸݝࠃຽ݈߁อݥஂମ࿈߹ձHP http://www.kanagawa-kokuho.or.jp/kaigo/ 14
հޢอݥͷෳࡶ͞ • څ, Ҭ୯Ձ • հޢ, ݶֹ • αʔϏεछྨ, αʔϏείʔυ
• Ճࢉɾݮࢉ, ࢉఆߏ • ๏վਖ਼ • ެඅ, ฦ • ࣏ࣗମ͝ͱͷಛྫ • etc... #ccc_e4 15
๏վਖ਼ • ̏ຖʹେ෯ݟ͠ • ෳࡶͳͷΑΓෳࡶʹͳ͍ͬͯ͘ • ෳࡶ͞มԽ͢Δ #ccc_e4 16
ݱ࣮ੈք γεςϜͷͨΊͷͷͰͳ͍ #ccc_e4 17
ҰຊಓΛݟ͚ͭΔ #ccc_e4 18
Ұຊಓ • Not ཁٻͷચ͍ग़͠ • Not Ձఏڙͷ୯Ґ • But υϝΠϯͷ࠷খ୯Ґ
#ccc_e4 19
Why? • ҭͯΔ • ؒҧ͑Δ • Γ͢ • มԽΛͨΓલʹ͢Δ #ccc_e4
20
ҰຊಓΛݟ͚ͭग़͢ #ccc_e4 21
υϝΠϯͷֶश #ccc_e4 22
࣮ͷϩʔϧϓϨΠ #ccc_e4 23
ϢʔβʔετʔϦʔϚοϐϯά ϢʔβʔετʔϦʔϚοϐϯά https://www.oreilly.co.jp/books/9784873117324/ 24
ਆಸݝࠃຽ݈߁อݥஂମ࿈߹ձHP http://www.kanagawa-kokuho.or.jp/kaigo/ 25
1. հޢࣄۀऀ͕ར༻ऀຖͷεέδϡʔϧͷ࣮Λ֬ఆ͢Δ • ར༻ऀຖͷٻॻʢอݥʣ 2. հޢࣄۀऀ͕ࠃͷٻֹۚΛ֬ఆ͢Δ • հޢࣄۀऀຖͷٻॻʢอݥʣ 3. αʔϏεࣄۀऀ͕ར༻ऀͷٻֹۚΛ֬ఆ͢Δ
• ར༻ऀຖͷٻॻʢࣗඅʣ #ccc_e4 26
#ccc_e4 27
՝ཧ • όοΫϩά • TODOϦετ • ͙͢ʹ͢ #ccc_e4 28
ελʔτϥΠϯʹཱͬͨ #ccc_e4 29
Ͳ͏ͬͯਐΊΔ͔ #ccc_e4 30
υϝΠϯʹϑΥʔΧε͢Δ #ccc_e4 31
ϞσϧϕʔεͷΞϓϩʔν • (ཁٻ) -> ֓೦ • (֓೦) -> Ϟσϧ #ccc_e4
32
The complexity is complicated. #ccc_e4 33
Good programmers write code that humans can understand. — -Martin
Fowler #ccc_e4 34
υϝΠϯͷཧղΛ໌Β͔ʹ͢Δ • ʮ୭͕ԿΛΔ͔ʁʯ • ཧղΛදݱ͢Δ࡞ۀ • (ཁٻ) -> ֓೦ •
(֓೦) -> Ϟσϧ #ccc_e4 35
Ϟσϧͷநग़ #ccc_e4 36
! #ccc_e4 37
(ࢲ͕ͨͪ) Ͳ͏͍ͬͯΔ͔ #ccc_e4 38
Ϟσϧͷநग़ • ҰຊಓͷݴޠԽ • ໊ࢺͷநग़ • σʔλͱͦͷ࣋ͪओ #ccc_e4 39
#ccc_e4 40
ᝦͱϗϫΠτϘʔυ 1. Write and Talk! 2. Write and Talk!! 3.
Write and Talk!!! #ccc_e4 41
#ccc_e4 42
Talk is cheap. Show me the code. — Linus Torvalds
#ccc_e4 43
ίʔυΛॻ͘ #ccc_e4 44
Service • ΞϓϦέʔγϣϯ͕࣮ݱ͍ͨ͜͠ͱ • ϢʔεέʔεΛදݱ͢Δॲཧͷ୯Ґ • ϞσϧΛ͏ #ccc_e4 45
ઃܭͷͨΊͷςετ • ݱ࣮ੈքΛදݱ͢Δͷ͕తͰͳ͍ • ServiceͷςετΛॻ͍ͯΈΔ • ࣮ݱ͍ͨ͜͠ͱΛݟࣦΘͳ͍ #ccc_e4 46
TDD Live in 50 minutes https://speakerdeck.com/twada/tdd-live-in-50-minutes 47
def "ࠃͷٻॻΛ࡞͢Δʹ"() { given: // Կ͕ඞཁͰ when: // ॲཧΛ࣮ߦ͢Δͱ then:
// Կ͕Ͱ͖͕͋Δͷ͔ʁ } #ccc_e4 48
໋໊ • ୈೋݴޠ(ӳޠ)ͷஔ͖͑ • ຊޠ͔ͩΒ௨͡Δɺ·͔͠ • ओޠͷ໌֬Խ #ccc_e4 49
/** * ݶֹཧର୯Ґͷɺڅରͷ୯Ґ */ fun benefitPointAppliedToPointLimit(): Point { return min(
pointAppliedToPointLimit() - adjustmentPoint.total(), insuranceLicense.gradingMaxPoint ) } #ccc_e4 50
Ϟσϧͷߏ #ccc_e4 51
"ଟ͘ͷใΛूΊͨوॏͳσʔλ" • σʔλ୯ͳΔ • σʔλ࡞Γग़ͤͳ͍ • σʔλΛΈ߹Θͤͨҙຯͷ͋Δใ • ใσʔλ͔Β࡞Γग़ͤΔ SQLΞϯνύλʔϯ
https://www.oreilly.co.jp/books/9784873115894/ 52
• σʔλ͔ΒϞσϧΛੜ • ίϯετϥΫλͰσʔλΛ͢ • ใΛϞσϧ(ͷϝιου)͕ఏڙ • σʔλΛΈ߹ΘͤɾՃ͢Δ #ccc_e4 53
લా͞Μ͕ ࠓ݄ อݥڅඅΛ ͍͘Β͑Δͷ͔ #ccc_e4 54
հޢࣄۀॴA͕લా͞Μʹ࣮ࢪͨ͠αʔϏε • 11/10 ମհޢ 394୯Ґ • 11/20 ੜ׆ԉॿ 181୯Ґ •
11/30 ମհޢ 394୯Ґ #ccc_e4 55
// σʔλͷऔಘ val serviceSection = serviceSectionRepository.findBy(sectionNumber) val insuranceLicense = insuranceLicenseRepository.findBy(licenseNumber,
monthProvided) val actualResult = actualResultRepository.findBy(monthProvided, sectionNumber, licenseNumber) // Ϟσϧͷੜ val estimate = Estimate(insuranceLicense, serviceSection, actualResult) // ใͷఏڙ estimate.amount() // ߹ܭֹۚ estimate.benefitAmount() // อݥڅֹۚ estimate.careReceiverAmount() // ར༻ऀෛ୲ֹ estimate.amountBy(careType) // αʔϏεछྨ͝ͱͷֹۚ #ccc_e4 56
! #ccc_e4 57
// σʔλͷऔಘ val serviceSection = serviceSectionRepository.findBy(sectionNumber) val insuranceLicense = insuranceLicenseRepository.findBy(licenseNumber,
monthProvided) val actualResult = actualResultRepository.findBy(monthProvided, sectionNumber, licenseNumber) // Ϟσϧͷੜ val estimate = Estimate(insuranceLicense, serviceSection, actualResult) // ใͷఏڙ estimate.amount() // ߹ܭֹۚ estimate.benefitAmount() // อݥڅֹۚ estimate.careReceiverAmount() // ར༻ऀෛ୲ֹ estimate.amountBy(careType) // αʔϏεछྨ͝ͱͷֹۚ #ccc_e4 58
σʔλͱใΓޱʹΑͬͯมΘΔ • ඞཁͳσʔλϞσϧͱͯ͠ѻ͏ • ϞσϧσʔλΛѻ͏୯Ґ • σʔλΛநԽ͢ΔͱϞσϧʹͳΔ • ϞσϧใΛఏڙ͢Δ #ccc_e4
59
! ٻॻ " ར༻ऀ # $! ඃอݥऀূ # $! ࢧڅݶ୯Ґ
# $! ୯Ґ " հޢࣄۀॴ # $! ୯Ґ୯Ձ # $! Ձ֨ $ ࣮εέδϡʔϧ #ccc_e4 60
ٻॻͷσʔλͱใ • ར༻ऀ -> ٻઌ • հޢࣄۀॴ -> ٻݩ •
࣮εέδϡʔϧ -> ٻ໌ࡉ #ccc_e4 61
! ٻॻ " ར༻ऀ # $! ඃอݥऀূ # $! ࢧڅݶ୯Ґ
# $! ୯Ґ " հޢࣄۀॴ # $! ୯Ґ୯Ձ # $! Ձ֨ $ ࣮εέδϡʔϧ #ccc_e4 62
Ϟσϧͷநग़ • ୭͕ • ͲͷʮσʔλʯΛ͍ͬͯͯ • ԿͷʮใʯΛఏڙ͢Δ • ͱߟ͑Δͷ͔ #ccc_e4
63
ਖ਼ղͳ͍ • ΓޱΛܾΊΔͷࣗͨͪ • "खࠒͳେ͖͞" • ୯Ұ • ςετ #ccc_e4
64
#ccc_e4 65
ڥ #ccc_e4 66
#ccc_e4 67
#ccc_e4 68
#ccc_e4 69
• ։ൃऀ5໊ • ϗϫΠτϘʔυ • ᝦͱϖϯ • େ͖ͳϞχλ #ccc_e4 70
αΠΫϧͷΓସ͑ίετΛͳ͘͢ #ccc_e4 71
υϝΠϯͷཧղΛ໌Β͔ʹ͢Δ • ʮ୭͕ԿΛΔ͔ʁʯ • ཧղϨϕϧΛදݱ • શһ͕ཧղ͍ͯ͠Δඞཁ͕͋Δ #ccc_e4 72
ͻͱͭͷ͜ͱΛ ΈΜͳͰΔ #ccc_e4 73
ϞϒϓϩɾϞϒϫʔΫ • ू߹ • ใڞ༗ • ڭҭޮՌ WEB+DB PRESS Vol.102
https://gihyo.jp/magazine/wdpress/archive/2018/vol102 74
Agile Games 2017 - Mob Programming Conference https://2017.agilegamesnewengland.com/index.php/mob-programming-conference 75
Ϟϒͷམͱ݀͠ • ฏۉʹͳ͍ͬͯͳ͍͔ʁ • ׂ୲ͳ͍͔ʁ • ࠷ߴ্͕͍ͬͯΔ͔ʁ • ϞϒϫʔΫثͷҰͭ #ccc_e4
76
ใڞ༗ͱυΩϡϝϯςʔγϣϯ #ccc_e4 77
Flow and Stock • Twitter ͱ YouTube • Chat ͱ
Wiki #ccc_e4 78
όέʔγϣϯͷࣸਅ #ccc_e4 79
#ccc_e4 80
• FlowΛSlackʹ͢ • FlowΛesaʹ͢ • StockΛesaʹ͢ #ccc_e4 81
#ccc_e4 82
ܭըͱ;Γ͔͑Γ #ccc_e4 83
͍αΠΫϧ • يಓमਖ਼ • ҙࢥܾఆ • ਐḿ #ccc_e4 84
5ஈ֊ͷҙࢥܾఆ ! શʹಉҙ " Α͍ͱࢥ͏ # ͬͯΈΔ͔ $ Ҿ͔͔ͬΔ͚ͲɺͬͯΈΔ͔.. %
ࢍಉͰ͖ͳ͍ͳ & ઈରʹμϝͩ #ccc_e4 85
#ccc_e4 86
ਐḿ #ccc_e4 87
Working software is the primary measure of progress. Principles behind
the Agile Manifesto https://agilemanifesto.org/iso/en/principles.html 88
Appendix #ccc_e4 89
ϚΠΫϩαʔϏε • Ί͓ͯ͜͏ • ४උͰ͖Δ ϚΠΫϩαʔϏεΞʔΩςΫνϟ https://www.oreilly.co.jp/books/9784873117607/ 90
ഊࢭ • ੍ࣗମͷ • ݱߦιϑτΣΞͷ༷ • ӡ༻্ͷ੍ • etc #ccc_e4
91
Beware the Share. Check Your context. — Udi Dahan ϓϩάϥϚ͕Δ͖97ͷ͜ͱ
https://www.oreilly.co.jp/books/9784873114798/ 92
·ͱΊ #ccc_e4 93
• ࠎ֨ʹͳΔҰຊಓΛݟ͚ͭग़͢ • ֆΛඳ͘ɺݴ༿ʹ͢Δ • ಈ࡞͢ΔίʔυΛॻ͘ • ࣦഊ͠ͳ͕ΒҭͯΔ #ccc_e4 94
#ccc_e4 95
ϞσϧΛҭͯΔ ࡞Γͳ͕ΒܾΊ͍ͯ͘ #ccc_e4 96
MAKE MISTAKS FASTR #ccc_e4 97
Usable Feasible Valuable #ccc_e4 98
None