Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHPエンジニアによるScalaエンジニアへの転身とその手引き
Search
Shingo Harada
November 11, 2018
Technology
840
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPエンジニアによるScalaエンジニアへの転身とその手引き
Shingo Harada
November 11, 2018
Other Decks in Technology
See All in Technology
kintoneで在庫管理システムを作るときの要件定義・設計ポイント
kai0707
0
190
AIエージェント時代、Kaggleにどう取り組むか
takanao
2
430
AI Search (Foundry IQ) におけるRAGデータの準備と配置
ryomaru0825
1
100
GitHub、使う?使わない?
happysamurai294
0
120
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
240
新米を「売り越さない」、Aurora DSQLで作る在庫ゼロ死守の限定ドロップEC
yama3133
0
110
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
100
Vibe-to-Spec開発_実践ガイド
happysamurai294
0
130
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
490
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
150
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
420
Agent 活用環境の構築・運用のための AWS サービスのご紹介/agentcore-for-building-and-operating-agents
ren8k
1
280
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Design in an AI World
tapps
1
380
Marketing to machines
jonoalderson
1
5.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
380
Deep Space Network (abreviated)
tonyrice
0
390
Between Models and Reality
mayunak
4
530
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
340
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Practical Orchestrator
shlominoach
192
12k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Transcript
ݪాਅޗ 1)1ΤϯδχΞʹΑΔ4DBMBΤϯδ χΞͷసͱͦͷखҾ͖ 4DBMBؔ4VNNJU
2017/11/11 © ChatWork All rights reserved. 2 ࣗݾհ ‣ $IBU8PSLגࣜձࣾαʔόʔαΠυ։ൃ෦
‣ ೖࣾ ݱࡏͰஸ͙Β͍ ‣ 1)1ΤϯδχΞͱͯ͠ೖࣾ ‣ ࠷ۙ4DBMBϓϩμΫτʹKPJO 4DBMBྺϲ݄͙Β͍ɺ +BWBະܦݧ
2017/11/11 © ChatWork All rights reserved. 3 $IBU8PSLʹ͍ͭͯ ‣ ϏδωενϟοταʔϏε
‣ λεΫཧɾϏσΦ௨ ‣ ಋೖاۀ ࣾҎ্
2017/11/11 © ChatWork All rights reserved. 4 5PQJDT ‣ $IBU8PSLͰͷ4DBMBͷऔΓΈ
‣ 4DBMBϓϩμΫτͷࢀՃɻֶशͷ͖᪴ͱղܾํ๏ ‣ 4DBMBΤϯδχΞʹసͯ͠Έͨ݁Ռ
2017/11/11 © ChatWork All rights reserved. 5 $IBU8PSLͱ4DBMBͷؔɾ։ൃܦҢ
2017/11/11 © ChatWork All rights reserved. 6 1)1։ൃ͔Β4DBMB։ൃ ‣ ࠒ͔Β1)1͚ͩͰͳ͘4DBMBϓϩμΫτ։ൃ
‣ 4DBMBϓϩμΫτͷ૿Ճ ‣ 0"VUI ‣ 8FCIPPL ‣ #PY࿈ܞ ‣ *'555࿈ܞ
2017/11/11 © ChatWork All rights reserved. 7 $IBU8PSLͱ4DBMBͷؔ ‣ $IBU8PSLͷ4DBMB࠾༻ϓϩμΫτl'BMDPOzϦϦʔε·Ͱͷࣦഊͱ
ޭͷྺ࢙ 4DBMB.BUTVSJ w IUUQTTQFBLFSEFDLDPNKJLPIJTUPSZPGGBMDPOUIFXBZUPQSPEVDUJPOSFMFBTF ‣ $IBU8PSLͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ "84%FW %BZ5PLZP w IUUQTTQFBLFSEFDLDPNKJLPDIBUXPSLGBMTFYJONFUVTF[JOHVTJTVUFNVXP[IJ FSVKJTIV ‣ 4DBMBBOE"LLBBQQTPO,VCFSOFUFTJO$IBU8PSL 4DBMBؔ 4VNNJU w IUUQTTQFBLFSEFDLDPNIBZBTTIJTDBMBBOEBLLBBQQTPOLVCFSOFUFTJO DIBUXPSL
2017/11/11 © ChatWork All rights reserved. 8 4DBMBϓϩμΫτͷࢀՃ ֶशͷ͖᪴ͱղܾ๏
2017/11/11 © ChatWork All rights reserved. 9 4DBMBϓϩδΣΫτͰΘΕ͍ͯͨࣝ ͱֶशঢ়گ ‣
ΘΕ͍ͯͨϥΠϒϥϦͱݴޠͷဃ w TDBMB[ "LLB LBNPO DJSDF FUDʜ ‣ ࠓ·Ͱܦݧͨ͠ϓϩάϥϛϯάݴޠ w 1)1ɺ1ZUIPOɺ$ʜ
2017/11/11 © ChatWork All rights reserved. 10 1)1ˠ4DBMBֶशͷ݁Ռ
2017/11/11 © ChatWork All rights reserved. 11 *'555࿈ܞΛ4DBMBͰ։ൃˍϦϦʔε ‣ ༻ͯ͠ΔϥΠϒϥϦ
w "LLB)UUQ w "LLB4USFBN w TDBMB[ w DJSDF w FUD
2017/11/11 © ChatWork All rights reserved. 12 *'555࿈ܞ ެࣜυΩϡϝϯτ IUUQTQMBUGPSNJGUUUDPNEPDT
2017/11/11 © ChatWork All rights reserved. 13 4DBMBϓϩμΫτʹࢀՃ
2017/11/11 © ChatWork All rights reserved. 14 େ͖ͳน ϓϩμΫτίʔυͱࣝͷဃ def
create(implicit scheduler: Scheduler): Flow[CreateUserAccountRequest, CreateUserAccountResponse, NotUsed] = Flow[CreateUserAccountRequest].mapAsync(1) { userAccount => (for { id <- userIdGenerator.generateId() result <- userRepository.store( UserAccount( id, Status.Active, EmailAddress(userAccount.emailAddress), HashedPassword(userAccount.password), userAccount.firstName, userAccount.lastName, Clock.now, None ) ) } yield CreateUserAccountResponse(id.value)).runAsync }
2017/11/11 © ChatWork All rights reserved. 15 େ͖ͳน ϓϩμΫτίʔυͱࣝͷဃ def
create(implicit scheduler: Scheduler): Flow[CreateUserAccountRequest, CreateUserAccountResponse, NotUsed] = Flow[CreateUserAccountRequest].mapAsync(1) { userAccount => (for { id <- userIdGenerator.generateId() result <- userRepository.store( UserAccount( id, Status.Active, EmailAddress(userAccount.emailAddress), HashedPassword(userAccount.password), userAccount.firstName, userAccount.lastName, Clock.now, None ) ) } yield CreateUserAccountResponse(id.value)).runAsync }
2017/11/11 © ChatWork All rights reserved. 16 ͳͥ͘͠ײͨ͡ͷ͔ ‣ 4DBMB͓Αͼؔܕݴޠʹ׳Ε͍ͯͳ͍
w লུه๏ɺߴ֊ؔɺ҉ͷύϥϝʔλɺΧϦʔԽɺFUDʜ ‣ +BWBपΓͷࣝ ‣ ετϦʔϛϯάɺฒߦॲཧʹؔ͢Δࣝ
2017/11/11 © ChatWork All rights reserved. 17 1)1ͱ4DBMBͷൺֱ 1)1 4DBMB
ܕ͚ ಈత ੩త ϓϩάϥϜύϥμΠϜ खଓ͖ܕ ΦϒδΣΫτࢦ ؔܕ ΦϒδΣΫτࢦ ӨڹΛड͚ͨݴޠ 1FSM $ +BWB IUUQTKBXJLJQFEJBPSHXJLJϓϩάϥϛϯάݴޠͷൺֱ
2017/11/11 © ChatWork All rights reserved. 18 ྫ ؔͷهड़ελΠϧ͕ෳ͋Δ //
ܕΞϊςʔγϣϯΛ͏ val toInt: (String => Int) = (s: String) => s.toInt // ܕΞϊςʔγϣϯΛলུ((Ҿ) => ຊମ) val toInt2 = (s: String) => s.toInt // ϓϨʔεϗϧμʔΛ༻ͨ͠ܗ val toInt3: (String => Int) = _.toInt w FY TUSJOHΛҾʹͱͬͯɺJOUʹมߋ͢Δؔͷهड़ελΠϧʹͯ͠ύλʔϯ͋ΔΑ͏ ʹࢥ͑ͨ w 1)1ͷ߹ w 4DBMBͷ߹ $toInt = function(string $s) {return (int)$s;}; ‣ ࢀߟ w IUUQTHJTUHJUIVCDPNHBLV[[[[ w IUUQTRJJUBDPNOFTIFFQJUFNTBFDFFGEG
2017/11/11 © ChatWork All rights reserved. 19 ྫ ؔܕ ‣
FY UP·ͰͷͰۮͷͷ͚ͩ حআ͘ Λഒͯ͠ɺ ͦͷ૯ΛٻΊΔ w 1)1ͷ߹ // ᶃarray_**ܥͷؔΛͬͨ߹ $result = array_sum( array_map( function ($i) { return $i * 10; }, array_filter(range(1, 10), function ($i) { return ($i % 2 === 0); }) ) ); // ᶄ݁ہ͜͏ͳΓͦ͏ $result = 0; foreach (range(1, 10) as $int) { if ($int % 2 === 0) { $result += $int * 10; } }
2017/11/11 © ChatWork All rights reserved. 20 ྫ ؔܕ def
stringMatching(matcher: (String) => Boolean) = matcher("sample text") def stringStart(query: String) = stringMatching(_.startsWith(query)) // ҎԼͱಉٛ // strMatching((str: String) => str.startsWith(query)) def stringContain(query: String) = stringMatching(_.contains(query)) ‣ 4DBMBͷ߹ ϫϯϥΠφʔͰهड़Մೳ ‣ ଞͷྫɿ4USJOHΛҾʹͱΓɺCPPMFBOΛฦؔ͢Λ͢ (1 to 10).withFilter(_ % 2 == 0).map(_ * 10).sum
2017/11/11 © ChatWork All rights reserved. 21 +BWBपΓͷࣝ ‣ OVMMͷߟྀ
w /VMM1PJOUFS&YDFQUJPO͕ൃੜͯ͠͠·͏ w SFUVSOWBMVFPSOVMMͷ+BWBϝιουΛݺͼग़࣌͢ʹ0QUJPOBQQMZͰғͬͯ͋ ͛Δ ‣ +BWBϥΠϒϥϦɺύοέʔδͷཧղ w MPHCBDLɺKBWBYDSZQUP w εϨουϓʔϧͷׂ ‣ FUDʜ akka { dispatcher { type = Dispatcher executor = "thread-pool-executor" thread-pool-executor { fixed-pool-size = 32 } throughput = 1 } }
2017/11/11 © ChatWork All rights reserved. 22 ղܾํ๏ ‣ ஈ֊తʹֶΜͰ͍͘
Ұʹଟ͘ͷ͜ͱΛֶͳ͍ ‣ ݱঢ়ࠔͱͳΔཁҼΛׂͯ͠ ̍ͭͣͭ ֶͿ w ؔܕݴޠ w "LLBTUSFBN w +BWBͷࣝ w FUDʜ
2017/11/11 © ChatWork All rights reserved. 23 ॻ੶ɾXFC ڭࡐͰֶश ‣
ݴޠ༷ɺؔܕετϦʔϜͷ֓೦ͳͲΛॏతʹֶश ‣ XFC্Ͱͷใ w 4DBMBશൠ w IUUQTEXBOHPHJUIVCJPTDBMB@UFYU w IUUQTHJUIVCDPNIBUFOB)BUFOB5FYUCPPLCMPCNBTUFS GPVOEBUJPOPGQSPHSBNNJOHTDBMBNE w "LLB4USFBN w IUUQTUIJOLJUDPKQBSUJDMF
2017/11/11 © ChatWork All rights reserved. 24 4DBMB ࣾڭࡐͷ׆༻ ‣
ԋश՝Ͱ࣮ࡍʹखΛಈֶ͔ͭͭ͠श
2017/11/11 © ChatWork All rights reserved. 25 ࣾͷϦιʔεΛ׆༻͢Δ ‣ ༗ࣝऀʹώΞϦϯάˍϖΞϓϩ
‣ 4DBMBઐ༻νϟοτ 4DBMB෦ ͷ׆༻
2017/11/11 © ChatWork All rights reserved. 26 श࡞ͰຒΊΔ ‣ ΑΓ࣮ફతͳ༰ͰϓϩμΫτίʔυͱͷࠩΛঃʑʹຒΊΔ
‣ श࡞ ՝ͷ࣮ࢪ w 4DBMB ࣾڭࡐ w FY 1MBZ'SBNFXPSLͷԋश՝ w "LLB (SBQI4UBHFΛ༻ͯ͠ϑΝΠϧˠ%#ͷ؆୯ͳॲཧ w SBNMQBSTFSͷ࡞ w FUD ‣ ϥΠϒϥϦ࡞ˍΞϓϦέʔγϣϯ։ൃ
2017/11/11 © ChatWork All rights reserved. 27 ஈ֊Λ౿ΜͰՌͷϦϦʔε ՌϦϦʔε श࡞՝
4DBMB ݴޠֶश ϓϩμΫτࢀՃ ࣌ܥྻ
2017/11/11 © ChatWork All rights reserved. 28 4DBMB։ൃͷײ ‣ ੩తܕɺؔܕͷԸܙ
w 1)1ͰػೳՃʹΑΔςετ֬ೝ࡞ۀ͕େม Өڹൣғ͕ݟ͑ʹ͍͘ w ϞσϦϯάɺϦϑΝΫλ͍͢͠ ‣ ֶश͕ਐΉʹͭΕརศੑΛ࣮ײ w հग़དྷͳ͔͚ͬͨͲ NBUDIDBTF 'VUVSFɺ&JUIFSɺ0QUJPOɺFUDʜ ‣ +BWBͷ๛ͳࢿ࢈Λ׆༻Ͱ͖Δ
2017/11/11 © ChatWork All rights reserved. 29 ·ͱΊ ‣ 4DBMBΛֶश͔Βೖͬͯ։ൃग़དྷΔڥ͕͋Δ
‣ ΩϟονΞοϓɺग़དྷΔڥ͕͋Δ ‣ ʮֶशʯˠʮश࡞ʯˠʮϓϩμΫτʯͱ͍ͬͨΑ͏ʹஈ֊Λ౿Ή͜ ͱ͕Ͱ͖ͨ ‣ ࣭͕୲อ͞Εอकɾӡ༻͕͘͢͠ͳΔ ‣ ৽ͨͳߟ͑ΛऔΓೖΕΒΕΔ ‣ ੩తɺؔܕɺඇಉظɺฒߦϓϩάϥϛϯάɺFUDʜ
2017/11/11 © ChatWork All rights reserved. 30 ҰॹʹνϟοτϫʔΫΛྑ͍͖ͯͨ͘͠ ͍ΤϯδχΞͷํΛืूʂ IUUQTDPSQDIBUXPSLDPNKBSFDSVJUFOHJOFFS
2017/11/11 © ChatWork All rights reserved. 31 ͝ਗ਼ௌ͋Γ͕ͱ͏ޚ࠲͍·ͨ͠