$PQZSJHIU+VO*JP
ࣗݾհ
w தԝେֶࠃࡍใֶ෦ʢJ5-ʣڭत
w ಛఆඇӦར׆ಈ๏ਓਓؒத৺ઃܭਪਐػߏཧࣄ
w Ұൠࣾஂ๏ਓ͜ͱͷ·ͳͼཧࣄ
w ത࢜ʢֶʣٕज़࢜ʢใֶ෦ʣ
w ਓؒத৺ઃܭਪਐػߏೝఆਓؒத৺ઃܭઐՈ
w ܦྺ
w ݄
ʙ݄ɹגࣜձࣾࡾඛ૯߹ݚڀॴۈ
w ݄ʙɹதԝେֶจֶ෦ࣾձใֶઐ߈
w ݄ʙɹݱ৬
w ઐ
w γεςϜͱਓؒͷΠϯλϥΫγϣϯʹؔ͢Δݚڀʹैࣄ
w ϢʔβΠϯλϑΣʔεɼײੑใֶɼը૾ใॲཧɼιϑτΣΞ
ֶɼߦಈใੳɼͳͲ
Slide 3
Slide 3 text
$PQZSJHIU+VO*JP
ຊͷ༰
w ΠϯλϑΣʔεʹͨ͠*5ڭҭ
w ؔఆ͔ٛΒ8FCΞϓϦ·Ͱ
w ࠷ۙͷΞϓϦߏஙࣄྫ
w ͍͔ͭ͘ͷ۩ମྫΛհ
w ΦϯϥΠϯͰߦ͏ϓϩάϥϛϯάԋश
w ΦϯϥΠϯͰʮصؒ८ճʯΛͲ͏͢Δ͔ʁ
Slide 4
Slide 4 text
ΠϯλϑΣʔεʹ
ͨ͠*5ڭҭ
Slide 5
Slide 5 text
$PQZSJHIU+VO*JP
ϝΠϯςʔϚ
w ਓؒͱγεςϜͷΠϯλϥΫγϣϯݚڀ
Slide 6
Slide 6 text
$PQZSJHIU+VO*JP
ͭͷํੑ
Slide 7
Slide 7 text
$PQZSJHIU+VO*JP
ਓ͔ؒΒγεςϜΛݟΔ
w ਓ͕͍͍ؒ͢γεςϜͷ͋Γํͱʁ
w Ωʔϫʔυ
w ϢʔβΠϯλϑΣʔε
w ਓؒத৺ઃܭ
w ϢʔβϏϦςΟ
w ϢʔβɾΤΫεϖϦΤϯεʢ69ʣ
w σβΠϯࢥߟ
Slide 8
Slide 8 text
$PQZSJHIU+VO*JP
γεςϜ͔ΒਓؒʢࣾձʣΛݟΔ
w ਓؒͷߦಈΛγεςϜͰੳ͢Δ
w Ωʔϫʔυ
w ࣾձใֶ
w ܭྔࣾձֶ
w ߦಈใੳ
w ߦಈ؍ࣨʢ'ɼࣨʣ
w $(.ʢ$POTVNFS(FOFSBUFE.FEJBʣ
Slide 9
Slide 9 text
$PQZSJHIU+VO*JP
ΠϯλϑΣʔεʹணͨ͠*5ڭҭ
w ϓϩάϥϜͷॻ͖ํΛ͚֮͑ͨͩͰΞϓϦ
γεςϜΛ࡞ΕΔΑ͏ʹͳΒͳ͍
w ͳ͔ͥʁ
w ͦΕϓϩάϥϜͷॻ͖ํҎ֎ʹ͍Ζ͍Ζͱ
ʹ͚ͳ͚ΕͳΒͳ͍͕ࣝ͋Δ͔Βʂ
w Ͳ͏ͨ͠Β࡞ΕΔΑ͏ʹͳΔ͔ʁ
w ͜͜ͰʮΠϯλϑΣʔεʯʹணͯ͠ɼஈ֊
తʹशಘ͢ΔಓےΛݕ౼͢Δ
Slide 10
Slide 10 text
$PQZSJHIU+VO*JP
ॳֶऀ๊͕͑Δҙࣝ
w ʮϓϩάϥϛϯάجૅʯͰϓϩάϥϛϯά
ΛֶΜͰɼΞϓϦγεςϜΛ࡞ΕΔΑ
͏ʹͳΒͳ͍ʜʜ8IZʁ
w ใγεςϜͷϞσϧΛৼΓฦΔ
Slide 11
Slide 11 text
$PQZSJHIU+VO*JP
ϓϩάϥϛϯάجૅʁ
Basic Programming Course focuses
on the knowledge only in this scope
Slide 12
Slide 12 text
$PQZSJHIU+VO*JP
γεςϜ։ൃʹඞཁͳࣝ
w ϓϩάϥϜͷॻ͖ํˡϓϩάϥϛϯάجૅ
w ΄͔ʹʹ͚ͳ͚ΕͳΒͳ͍͜ͱ
w ద͔ͭޮతͳϩδοΫͷߏங
w ܭࢉਫ਼ޡࠩɼίʔυମܥͷબͳͲ
w σʔλͷೖग़ྗʢΠϯλϑΣʔεʣ
w σʔλͷӬଓԽʢσʔλϕʔεͷར༻ʣ
w Τϥʔॲཧɼྫ֎ॲཧɼηΩϡϦςΟରԠ
w ςετ։ൃख๏ͷڞ༗ʢιϑτΣΞֶʣ
w ϓϩδΣΫτͷϚωδϝϯτɼFUDʜʜ
Slide 13
Slide 13 text
$PQZSJHIU+VO*JP
w ΠϯλϑΣʔεͷߏஙʹؔ͢Δࣝͷशಘ
ΠϯλϑΣʔεʹண
Interface
Slide 14
Slide 14 text
$PQZSJHIU+VO*JP
-FWFMTPG%FWFMPQJOH*OUFSGBDF
w -FWFMGVODUJPOT
w -FWFMDPNNBOEMJOFJOUFSGBDF $-*
w -FWFMDIBUCPU
w -FWFMHSBQIJDBMVTFSJOUFSGBDF (6*
w -FWFMXFCBQQMJDBUJPO
Slide 15
Slide 15 text
$PQZSJHIU+VO*JP
-FWFMGVODUJPOT
w ZG Y
w 'VODUJPOEFGJOJUJPO JO1ZUIPO
def square(x):
y = x * x
return y
*OQVU
1SPDFTT
0VUQVU
$PQZSJHIU+VO*JP
-FWFM$-* DPOU`E
w 3&1-ʢ3&1-PPQʣͱ
w 3FBEʢ*OQVUʣ
w &WBMʢ1SPDFTTʣ
w 1SJOUʢ0VUQVUʣ
w -PPQʢ'FFECBDLʣ
ڭҭ্ͷղͷҰͭͱͯ͠
+VQZUFS/#ʢ͘͠(PPHMF
$PMBCPSBUPSZʣ͕ʜʜ
ͨͩ͠ɼൃలੑ͕ͳ͍
Slide 18
Slide 18 text
$PQZSJHIU+VO*JP
-FWFMDIBUCPU
w -*/&#PUX("4
w -*/&%FWFMPQFSొ
w (PPHMF"QQT4DSJQU
ͰɼϨεϙϯεΛฦ͢
ΞϓϦΛ࡞
w -*/&.FTTBHJOH"1*
ͰΞϓϦΛొ
*OQVU
0VUQVU
$PQZSJHIU+VO*JP
-*/&#PUར༻ͷ՝
w ͑ΔΑ͏ʹͳΔ·Ͱ͕ʢʣ໘
w ࣮ࡍͷॲཧΛΓग़͕͢ඞཁ
w ྫ͑ɼԼهͷΑ͏ʹͯ͠GVOD
ΛΓग़͢
const in_msg = json.events[0]…
out_msg = func(in_msg)
…
'message': ['Text': out_msg ]]
Slide 21
Slide 21 text
$PQZSJHIU+VO*JP
-FWFM(6*
Slide 22
Slide 22 text
$PQZSJHIU+VO*JP
-FWFM(6* DPOU`E
w Ϟμϯͳ(6*ϓϩάϥϛϯάʹඞཁͳࣝ
w 8*.1
w 8JOEPX*DPO.FOV1PJOUFS
w 8JEHFUʢEJTQMBZDPNQPOFOUTʣ
w 1BHFUSBOTJUJPO
w &WFOUESJWFOQSPHSBNNJOH
$PQZSJHIU+VO*JP
(6*ϓϩάϥϛϯάͷ՝
w *OQVUͱ0VUQVU͕વҰମͰ͋Δ͕ɼ͔Γʹ͍͘
w ڥඋ͕ʢʣ໘
w ϓϩάϥϛϯάํ๏͕ڥʹେ͖͘ґଘ
w ΦϒδΣΫτࢦͱ૬ੑ͕Α͍
w ࿈݁ɾذɾ෮ɾݺग़ͷߏԽϓϩάϥϛϯάʢͱ
͘ʹʮ࿈݁ʯʜʜ্͔Βॱ൪ʹ࣮ߦ͞ΕΔʣʹ͠Μ
Ͱ͍ΔͱΠϕϯτۦಈܕͷཧղʹൃͷస͕ඞཁ
w ͨͩ͠ɼ8FCΞϓϦجຊతʹΠϕϯτۦಈܕ
Slide 25
Slide 25 text
$PQZSJHIU+VO*JP
-FWFMXFCBQQMJDBUJPO
w ҰൠతͳΞϓϦέʔγϣϯͱͷҧ͍
w த৺తͳॲཧαʔό্Ͱಈ࡞͢Δ
w ϢʔβΠϯλϑΣʔεʹΣϒϒϥβΛ
༻
w ΠϯετʔϧෆཁͰ͑Δ
w ༷ʑͳΫϥΠΞϯτڥʹରԠՄೳ
w ࠷ۙͰϞόΠϧσόΠελʔήοτʹ
Slide 26
Slide 26 text
$PQZSJHIU+VO*JP
ҰൠతͳΞϓϦͱ8FCΞϓϦͷҧ͍
Slide 27
Slide 27 text
$PQZSJHIU+VO*JP
ΫϥΠΞϯτɾαʔόɾγεςϜ
w $MJFOU4FSWFSʢ$4γεςϜʣ
ϦΫΤετʹԠͯ͡ಈ࡞
ҰछͷΠϕϯτۦಈܕϓϩάϥϛϯά
ͱ͍͑Δ
*OQVU
1SPDFTT
0VUQVU
$PQZSJHIU+VO*JP
8FCΞϓϦͷ՝
w *OQVUͷΞϓϩʔν͕ʢʣෳࡶ
w )551Λཧղ͢Δඞཁ͕͋Δ
w (&5ͱ1045ͷҧ͍
w ύεύϥϝʔλɼΫΤϦύϥϝʔλɼϦΫ
Τετύϥϝʔλͷҧ͍ͳͲ
w ϧʔςΟϯάͷ֓೦ΛֶͿඞཁ͕͋Δ
w ηΩϡϦςΟͷجૅΛ͓͔ͬͯͶͳΒͳ͍
w ωοτΛհͯ͠ѱҙ͋ΔୈࡾऀʹΞΫηε͞Ε
ΔՄೳੑ͕͋ΔͨΊ
Slide 30
Slide 30 text
$PQZSJHIU+VO*JP
8FCΞϓϦͷ՝ DPOU`E
w 0VUQVUͷΞϓϩʔνʢʣෳࡶ
w Ϧονͳը໘ੜʹςϯϓϨʔτඞਢ
w )551ͷࠜຊతͳ՝ͱͦͷରԠ͕ɼෳࡶ
w ʮߦ͍ͬͯ͜ʯܕͷ௨৴Ϟσϧ
w ηογϣϯཧͳͲͷޙ͚
w ͦΕΒΛղফ͢Δ"+"9ͳͲΛཧղ͢Δʹ
ϑϨʔϜϫʔΫͷར༻͕ඞਢ
Slide 31
Slide 31 text
$PQZSJHIU+VO*JP
.7$Ϟσϧ
w ΞϓϦέʔγϣϯͷߏΛɼϞσϧʢ.PEFMʣɼϏ
ϡʔʢ7JFXʣɼίϯτϩʔϥʢ$POUSPMMFSʣͷͭ
ʹ͚ͯઃܭ͢Δख๏
w ʹθϩοΫεͷύϩΞϧτݚڀॴʢ9FSPY
1"3$ʣͰ"MBO$VSUJT,BZ͕։ൃͨ͠4NBMMUBMLʹ
Λൃ͢Δߟ͑ํ
w ଟ͘ͷ8FCΞϓϦέʔγϣϯ։ൃϑϨʔϜϫʔΫͰ
࠾༻͞Ε͍ͯΔ
w ͳͷͰɼ͖ͪΜͱཧղ͓ͯ͘͠ͱΑ͍
Slide 32
Slide 32 text
$PQZSJHIU+VO*JP
.7$ϞσϧΛར༻͢ΔϝϦοτ
w σʔλϞσϧઃܭ
w γεςϜσβΠϯͷࠜװΛͳ͢
w σʔλઃܭ͕͔ͬ͠Γ͍ͯ͠ΕɼΞϓϦͷมߋগͳ
͍
w Ϗϡʔઃܭ
w ϢʔβɾΠϯλϑΣʔεʢը໘ʣ෦ઃܭσβΠφ୲
w ίϯτϩʔϥઃܭ
w ௨ৗ͋·ΓखΛՃ͑Δඞཁͳ͍ʢଟ͘ͷΞϓϦͰί
ϯτϩʔϧͷϩδοΫ΄΅ಉ͡ʣ
Slide 33
Slide 33 text
$PQZSJHIU+VO*JP
Practical Programming must take
error handling into account!
ຊϞσϧ͕ෆ͍ͯ͠Δ
&SSPS-PH
Slide 34
Slide 34 text
࠷ۙͷߏஙࣄྫ
Slide 35
Slide 35 text
$PQZSJHIU+VO*JP
ݸਓใอޢήʔϜ
Slide 36
Slide 36 text
$PQZSJHIU+VO*JP
ݸਓใอޢήʔϜ
w ੜͷνʔϜ͕࡞
w ൧ඌʮΞΠσΞʯͷΈఏڙ
w +BWB4DSJQUʢ7VFKTʣ
ʴ(PPHMF'JSFCBTFͰߏங
w )FSPLVͰӡ༻
w ๏ֶ෦ɾཧֶ෦ͷઌੜํͱͷֶڞಉݚ
ڀͷҰͱͯ͠ɼֶੜࢀՃ͍ͯ͠Δ
Slide 37
Slide 37 text
$PQZSJHIU+VO*JP
өըϙελʔͷҹධՁ
Slide 38
Slide 38 text
$PQZSJHIU+VO*JP
өըϙελʔͷҹධՁ
w ੜ͕ΞΠσΞ
w ʢ࣮΄΅ࢲʜʜXʣ
w ੜ͚ʹआΓ͍ͯΔαʔό্ʹߏங
w +2VFSZʢϑϩϯτΤϯυʣͱ3BJMTʢόο
ΫΤϯυʣͰߏங
w өըϙελʔͷஶ࡞ݖΫϦΞ
w 5.%CΛར༻
Slide 39
Slide 39 text
$PQZSJHIU+VO*JP
՝ͷෛՙΛՄࢹԽ
Slide 40
Slide 40 text
$PQZSJHIU+VO*JP
՝ͷෛՙΛՄࢹԽ
Slide 41
Slide 41 text
$PQZSJHIU+VO*JP
՝ͷෛՙΛՄࢹԽ
w ੜͷνʔϜ͕࡞
w ϑϩϯτଆ5BNQFSNPOLFZͰطଘͷ-.4ʹࡉ
w -.4͔Βμϯϩʔυͨ͠ϒϥβଆͰɼใΛ
औಘ͢ΔϓϩʔϒΛೖΕ͍ͯΔ
w όοΫΤϯυ3BJMTͰߏங
w )FSPLVͰӡ༻
w ڭһͷઆ໌ӡ༻ΛͲ͏͢Δ͔Λݕ౼͍ͤͯ͞
Δ
Slide 42
Slide 42 text
ΦϯϥΠϯͰͷ
ϓϩάϥϛϯάԋश
Slide 43
Slide 43 text
$PQZSJHIU+VO*JP
ڭҭվળͷతɾඪ
w "*ਓࡐҭʹؔ͢Δ
ࡦ
ˠʮ"*ɾσʔλαΠ
Τϯεશֶϓϩάϥ
ϜʯΛ࣮ࢪ
w J%4ϓϩάϥϜ
w ʙ࣮࣍ࢪɼ
શֶతԋश
Slide 44
Slide 44 text
$PQZSJHIU+VO*JP
தԝେֶͷֶ෦ߏ
w ଟຎΩϟϯύε
w ๏ֶ෦
w ܦࡁֶ෦
w ֶ෦
w จֶ෦
w ૯߹ࡦֶ෦
w ࠃࡍܦӦֶ෦
w ޙָԂΩϟϯύε
w ཧֶ෦
w ࢢ୩ాொΩϟϯύε
w ࠃࡍใֶ෦
$PQZSJHIU+VO*JP
तۀͷ֓ཁ
w "*ɾσʔλαΠΤϯεԋश
w J%4ʢ*OUFSNFEJBUF1SPHSBNGPS%BUB
4DJFODFBOE"*ʣϓϩάϥϜ
w ʙੜɼؒͷθϛφʔϧ
w શֶԣஅతθϛ׆ಈ
w ͔Βɼθϛʢ൧ඌͷ୲θϛ
ΛؚΉʣ͕ελʔτ
Slide 48
Slide 48 text
$PQZSJHIU+VO*JP
୲͍ͯ͠Δԋश
w શֶ͔ΒडߨऀΛืूʢཤमऀ໊ʣ
w ࣗͷॴଐֶ෦͔ΒΤϯτϦͳ͠ʂ 5@5
w ༧Ҏ্ʹ*5εΩϧऑͦ͏ͳͷͰɼ·ͣ
͔ͦ͜Βʜʜ
w ʢҰ෦ͷֶੜͦΕͳΓʹεΩϧΛ͍࣋ͬͯ
ΔΑ͏ͳͷͰɼֶੜಉ࢜ͷֶͼ߹͍ʹظʣ
w ใॲཧͷجૅɼσʔλͷѻ͍ํɼཧతഎ
ܠͳͲɼڭ͑Δ͖ཁૉଟ͍
Slide 49
Slide 49 text
$PQZSJHIU+VO*JP
ֶशঢ়گҰཡϓϥοτϑΥʔϜ
w .VMUJ7JFXɹIUUQTXXXJJPKVODPN.VMUJ7JFXNWIUNM
w 8FCΞϓϦͱͯ͠ఏҊ
Slide 50
Slide 50 text
$PQZSJHIU+VO*JP
ڭҭޮՌͱͦͷ֬ೝ
Slide 51
Slide 51 text
$PQZSJHIU+VO*JP
ֶੜʹΑΔධՁ
Slide 52
Slide 52 text
$PQZSJHIU+VO*JP
ֶੜʹΑΔධՁ
Slide 53
Slide 53 text
$PQZSJHIU+VO*JP
ֶੜʹΑΔධՁ
Slide 54
Slide 54 text
$PQZSJHIU+VO*JP
·ͱΊ
w ΠϯλϑΣʔεʹͨ͠*5ڭҭʹ͍ͭͯ
આ໌͠·ͨ͠
w 8FCΞϓϦߏஙʹΑΔ*5ڭҭͷྫͱͯ͠
࠷ۙͷΞϓϦߏஙࣄྫΛհ͠·ͨ͠
w ΦϯϥΠϯͰߦ͏ϓϩάϥϛϯάԋशʹͭ
͍ͯղઆ͠·ͨ͠
w )BQQZ)BDLJOHʘ ?P?
ʗ