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
programming free trial lesson
Search
Masahiro Kamata
April 29, 2019
Programming
0
37
programming free trial lesson
Masahiro Kamata
April 29, 2019
Tweet
Share
More Decks by Masahiro Kamata
See All by Masahiro Kamata
Engineer Onboarding
kamatari
2
930
Engineer Manager & Different Culture
kamatari
1
500
EM 1年目とはじめての壁について
kamatari
1
540
Growth of Employees
kamatari
0
67
Retrospective for startup
kamatari
0
56
KPTスターターキット
kamatari
0
100
なんなんだ Programming / what is programming
kamatari
0
29
Other Decks in Programming
See All in Programming
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Jakarta EE meets AI
ivargrimstad
0
600
Outline View in SwiftUI
1024jp
1
330
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.5k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
イベント駆動で成長して委員会
happymana
1
330
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Click-free releases & the making of a CLI app
oheyadam
2
120
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Writing Fast Ruby
sferik
627
61k
What's new in Ruby 2.0
geeforr
343
31k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
KATA
mclloyd
29
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Building Adaptive Systems
keathley
38
2.3k
Statistics for Hackers
jakevdp
796
220k
Thoughts on Productivity
jonyablonski
67
4.3k
Code Reviewing Like a Champion
maltzj
520
39k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
ϓϩάϥϛϯά ମݧतۀ Kamata masahiro
༰ • ϓϩάϥϛϯάͱʁʹ͍ͭͯ • ϓϩάϥϛϯάԋशͷઆ໌ͱ࣮श
ϓϩάϥϛϯάͱʁ
ϓϩάϥϛϯάͱ w ྫ͑ʜ w ਅౡ͞Μʹ͓ئ͍Λ͢Δͱ͖ɺຊޠͰ͓ئ͍͠·͢ΑͶ ຊޠ ʮਅౡ͞ΜɺࢲͷࣸਅΛࡱ͍ͬͯͩ͘͞ʯ
ϓϩάϥϛϯάͱ w ίϯϐϡʔλʹ͓ئ͍Λ͢Δͱ͖ʹ͏ʮݴ༿ʯ͕ ϓϩάϥϛϯάݴޠͰ͢ ϓϩάϥϛϯάݴޠ QSJOU bEJTQMBZJNBHF`
ϓϩάϥϛϯάͱ • ຊਓʹɺຊޠͰ͓ئ͍͢Δ • ίϯϐϡʔλʹɺϓϩάϥϛϯάݴޠͰ͓ ئ͍͢Δ • ϓϩάϥϛϯάݴޠΛॻ͘͜ͱΛϓϩάϥϛϯά ͱݺΜͰ͍·͢
ϓϩάϥϛϯάͱ • දʹ͢Δͱ͜ͷΑ͏ͳײ͡ ରίϯϐϡʔλ ରຊਓ ϓϩάϥϛϯάݴޠ ຊޠ ϓϩάϥϛϯά ຊޠΛॻ͘ ϓϩάϥϜ
จষ
ϓϩάϥϛϯάͱ • ͱ͜ΖͰɺʮԿΛʯίϯϐϡʔλʹ͓ئ͍͢ Δͷ͔
ϓϩάϥϛϯάͱ ݱࡏɺίϯϐϡʔλࣗͰߟ͑Δ͜ͱ͕Ͱ͖·ͤΜ ͍Ζ͍Ζͳ͜ͱ͕Ͱ͖Δͷɺશͯͷಈ࡞Λਓ͕ؒ ʮYYͨ͠Βɺ˛˛͍ͯͩ͘͠͞ʯͱɺ ϓϩάϥϛϯάݴޠͰ͓ئ͍ͯ͋͠Δ͔ΒͰ͢ ྫ ʮը໘ӈ্ͷϘλϯΛԡͨ͠Βɺը໘Λด͍ͯͩ͘͡͞ʯ ʮਅΜதͷ⾣ϘλϯΛԡͨ͠ΒɺಈըΛ࠶ੜ͍ͯͩ͘͠͞ʯ
ϓϩάϥϛϯάͱ • ʮԿΛʯϓϩάϥϛϯάͰ͓ئ͍͢Δͷ͔ • ͑ɿ ɹ͍Ζ͍ΖͳछྨͷʮYYͨ͠Βɺ˛˛ͯͩ͘͠͞ ͍ʯΛ͓ئ͍͠·͢
ϓϩάϥϛϯάݴޠͷछྨ
ϓϩάϥϛϯάݴޠͷछྨ w ϓϩάϥϛϯάݴޠʹ͍Ζ͍Ζͳछྨ͕͋Γ·͢ w ຊޠͷଞʹɺӳޠதࠃޠ͕͋Δͷͱಉ͡Ͱ͢
ϓϩάϥϛϯάݴޠͷछྨ • ݱͰϝδϟʔͳϓϩάϥϛϯάݴޠ w 1)1 w +BWB4DSJQU w 3VCZ w
4XJGU w +BWB w 1ZUIPO
ϓϩάϥϛϯάݴޠͷछྨ • ͳͥ͜Μͳʹ͍Ζ͍Ζ͋ΔͷͰ͠ΐ͏͔ʁ
ϓϩάϥϛϯάݴޠͷछྨ • ͳͥ͜Μͳʹ͍Ζ͍Ζ͋ΔͷͰ͠ΐ͏͔ʁ • ͑ɿ ΑΓྑ͍ϓϩάϥϛϯάݴޠΛ࡞Ζ͏ͱͯ͠ɺ։ൃ͢Δਓ ୡ͕͍Δ͔ΒͰ͢ ৽͍͠ं͕ͲΜͲΜ։ൃ͞ΕΔͷʹࣅ͍ͯ·͢
ϓϩάϥϛϯάݴޠͷछྨ • ͦΕͧΕͷಛΛ؆୯ʹհ͠·͢ w 1)1ɾɾɾXFCαʔϏεΛͭ͘ΔͨΊͷݴޠɻ'BDFCPPL1)1Ͱ࡞ΒΕ͍ͯ·͢ w +BWB4DSJQUɾɾɾXFCαʔϏεͷը໘ͷಈ͖Λ࡞ΔͨΊʹΑ͘ΘΕ͍ͯ·͢ w 3VCZɾɾɾ1)1ͱಉ༷ʹXFCαʔϏεΛ࡞ΔͷʹΑ͘ΘΕ͍ͯ·͢ w
4XJGUɾɾɾJ1IPOFͷΞϓϦΛ࡞ΔͨΊʹ։ൃ͞ΕͨݴޠͰ͢ w +BWBɾɾɾXFCαʔϏε͚ͩͰͳ͘ɺ"OESPJEͷΞϓϦ࡞Δ͜ͱ͕Ͱ͖·͢ w 1ZUIPOɾɾɾXFCαʔϏε͚ͩͰͳ͘ɺػցֶशσʔλੳͰΘΕ͍ͯ·͢
ϓϩάϥϛϯάݴޠͷछྨ • ࠓ͜ͷݴޠΛ͍·͢
Q & A
ࠓͷԋशͷઆ໌
ಇΫϦοΧʔ
ಇΫϦοΧʔ
ಇΫϦοΧʔ ૯ࢿ࢈1ԯԁΛ Ք͍Ͱ͍ͩ͘͞
ಇΫϦοΧʔ • ޮΑ͘ʮࢿ֨ʯɺʮෆ࿑ॴಘʯΛ֫ಘ͠ ͳ͕ΒɺߴಘΛࢦ͠·͠ΐ͏ • ·ͣ5ͬͯΈ·͠ΐ͏
5 ܭଌ
ಇΫϦοΧʔ • ͍͘ΒՔ͙͜ͱ͕Ͱ͖·͔ͨ͠ʁ • 10ສʙʁ • 100ສʙʁ • 1000ສʙʁ •
1ԯʙʁ
ಇΫϦοΧʔ • 1ԯԁΛՔ͙͍ͬͯ͏ͷ͍ͨΜͩ… • ࣾձ͖ͼ͍͠ • ϓϩάϥϜͰνʔτ͠·͠ΐ͏
ࠓͷԋश
ಇΫϦοΧʔ (ཪ) • ಇΫϦοΧʔΛىಈͨ͋͠ͱʮcʯΛԡ͢ͱ • ήʔϜૢ࡞ΛϓϩάϥϜ͔Βૢ࡞Ͱ͖Δը໘͕
ಇΫϦοΧʔ (ཪ) ←
ಇΫϦοΧʔͰ͑Δίʔυ ᶃ • cash ݱࡏͷ૯ࢿ࢈ • items ݱࡏͷΞΠςϜߪೖ • prices
ݱࡏͷΞΠςϜͷஈ • print(obj); ͨ͠ obj Λ͋Δఔݟͯ͘͢͠ Լ෦ͷࠇ৭ͷ෦ʹදࣔ͠·͢
ಇΫϦοΧʔͰ͑Δίʔυ ᶄ • start(); ήʔϜΛ࢝ΊΔϘλϯΛԡ͠·͢ • work(); ಇ͘ϘλϯΛԡ͠·͢ • purchase(id);
idͰࢦఆͨ͠ΞΠςϜΛങ͍·͢ • id: = 0 ~ 4 • loop(f, ms); ms Ͱࢦఆͨ͠ϛϦඵ͝ͱʹɺ f Λ࣮ߦ͠·͢
ಇΫϦοΧʔͰ͑Δίʔυ ᶄ • JavaScript
ͬͦ͘͞ϓϩάϥϛϯάͯ͠ Έ·͠ΐ͏
ಇΫϦοΧʔͰ͑Δίʔυ ᶃ • cash ݱࡏͷ૯ࢿ࢈ • items ݱࡏͷΞΠςϜߪೖ • prices
ݱࡏͷΞΠςϜͷஈ • print(obj); ͨ͠ obj Λ͋Δఔݟͯ͘͢͠ Լ෦ͷࠇ৭ͷ෦ʹදࣔ͠·͢
͡Ίͯͷϓϩάϥϛϯά // First Program start(); work(); print(' --DEBUG LOG --');
print(cash); print(items); print(prices);
͡Ίͯͷϓϩάϥϛϯά --DEBUG LOG -- 40 { affiliate: 0, kabu: 0,
programming: 0, shikaku: 0, tochi: 0 } { affiliate: 500, kabu: 2000, programming: 17000, shikaku: 10, tochi: 10000 }
ಇΫϦοΧʔͰ͑Δίʔυ ᶄ • start(); ήʔϜΛ࢝ΊΔϘλϯΛԡ͠·͢ • work(); ಇ͘ϘλϯΛԡ͠·͢ • purchase(id);
idͰࢦఆͨ͠ΞΠςϜΛങ͍·͢ • id: = 0 ~ 4 • loop(f, ms); ms Ͱࢦఆͨ͠ϛϦඵ͝ͱʹɺ f Λ࣮ߦ͠·͢
͡Ίͯͷϓϩάϥϛϯά start(); loop(function() { work(); purchase(0); }, 1); • 1msͰಇ͖ͳ͕Βɺࢿ֨Λ࠷Ͱऔಘ͢Δίʔυ
͡Ίͯͷϓϩάϥϛϯά • ͳΜͱͳ͘ݟ͖͑ͯ·͔ͨ͠ʁ • ͍··Ͱʹग़͖ͯͨྫΛͬͯϓϩάϥϜΛ վͯ͠Έ͍ͯͩ͘͞
10 ܭଌ
͡Ίͯͷϓϩάϥϛϯά • Ͳ͏Ͱ͔ͨ͠ʁ
͡Ίͯͷϓϩάϥϛϯά • 2ͭͷػೳͷհ (JavaScriptͷػೳ) • ݅จ • ܁Γฦ͠จ
݅จ start(); loop(function() { work(); if (cash < 1000) {
purchase(0); } }, 1); • ʮ͠ ~ ͳΒʯΛϓϩάϥϜͰॻ͘
݅จ start(); loop(function() { work(); if (cash < 1000) {
purchase(0); } }, 1); • ʮ͠ cash͕ɺ1000ະຬͳΒʯΛϓϩάϥϜͰॻ͘
܁Γฦ͠จ • X ճ ॲཧΛ܁Γฦ͢ ϓϩάϥϜΛॻ͘ͱ͖ start(); for (i=0;i<300;i++){ work();
}
܁Γฦ͠จ • 300 ճ ಇ͘Λ܁Γฦ͢ ϓϩάϥϜΛॻ͘ͱ͖ start(); for (i=0;i<300;i++){ work();
}
JavaScriptͷػೳ // cash ͕ 1000ະຬͷͱ͖͚ͩ purchase(0) Λ࣮ߦ if (cash <
1000) { purchase(0); } // 300ճ work() Λ܁Γฦ͢ for (i=0; i<300; i++) { work() }
30 ܭଌ
݁Ռൃද • ࣮ͷͱ͜Ζʹɺ1ԯΛୡ͕ͨ࣌ؒ͠දࣔ͞Ε ·͢ →
࠷݁Ռ
”ಇΫϦοΧʔ”Ͱݕࡧͯ͠Έ ͍ͯͩ͘͞ https://zeny.io/products/working-clicker/
(༨ஊ) ݱ࣮ੈքͷಇΫϦοΧʔ 1. Սۭͷ໊ٛͰຊΛ੍࡞ 2. Amazon kindleʹແྉͰग़ 3. ϓϩάϥϜͰϢʔβʔΛِͯ͠ɺେྔμϯϩʔυ &
ߴϨϏϡʔ 4. ϥϯΩϯάೖΓ 5. ຊͷ༗ྉԽ 6. ϥϯΩϯάΛݟͯɺҰൠϢʔβʔ͕ߪೖ 7. 2ԯԁͷച্ (Amazon2ؒ ؾ͔ͮͣ)
Q & A
HAPPY HACKING :)