Upgrade to Pro — share decks privately, control downloads, hide ads and more …

「Rubyメソッドかるた」 王者への道 ~ 万葉チームのガチな取り組みを大公開 ~

Yasuko Ohba
October 15, 2023

「Rubyメソッドかるた」 王者への道 ~ 万葉チームのガチな取り組みを大公開 ~

2023/10/5に開催された大江戸Ruby会議10での、Rubyメソッドかるたの攻略手法についてのトーク資料です。

Yasuko Ohba

October 15, 2023
Tweet

More Decks by Yasuko Ohba

Other Decks in Technology

Transcript

  1. ʮ3VCZϝιου͔Δͨʯ
    Ԧऀ΁ͷಓ
    ʙສ༿νʔϜͷΨνͳऔΓ૊ΈΛେެ։ʙ

    !OBZɹେ৔ɹɹɹ
    !X@F@C@DPGGFFɹീ໦

    !S@@IBOEBɹ൒ా

    View full-size slide

  2. 3VCZϝιου͔Δͨͱ͸
    IUUQTCMPHBHJMFFTNDPKQFOUSZSVCZNFUIPELBSVUB
    w Ӭ࿨γεςϜϚωδϝϯτ
    ͞Μ͕࡞੒
    w 3VCZ,BJHJͰ഑෍
    w छྨͷϝιου
    w ͦΕͧΕऔࡳɾಡࡳ͕
    ͋Δ

    View full-size slide

  3. দా͞ΜͷൃҊΛ͖͔͚ͬʹɺ
    Ӭ࿨͞Μ͔Βର߅ઓͷ͓༠͍Λ͍ͨͩ͘

    View full-size slide

  4. ͳͥສ༿͔ͱ͍͏ͱʜ
    ສ༿͸ɺڝٕ͔ΔͨʢඦਓҰटʣܦݧऀͷେ
    ৔ɾٱอ͕૑ۀͨ͠ձࣾ
    ࣮͸ɺ͔ΔͨΞϓϦΛൢച͍ͯͨ͠Γɺ͔Δ
    ͨͷେձʹڠࢍ͍ͯͨ͠Γ͢Δ
    प೥ه೦ύʔςΟʔͰ͸౦େ͔Δͨձͷ
    બखʹ໛ٖࢼ߹Λ൸࿐ͯ͠΋Βͬͨ
    3VCZίϛϡχςΟ಺ͷر๬ऀʹɺ͔Δͨମ
    ݧΛͯ͠΋Βͬͨ͜ͱ΋͋Δ
    ஌Δਓͧ஌Δl͔ΔͨΨν੎ͷձࣾz

    View full-size slide

  5. ͋ΕΑ͋ΕΑͱ۩ମԽ
    ˠܾઓͷ೔͸ʹܾఆʂʂ

    View full-size slide

  6. ँࣙ
    Ӭ࿨͞Μɺʮ3VCZϝιου͔ΔͨʯΛ։
    ൃͯͩͬͯ͋͘͠͞Γ͕ͱ͏͍͟͝·͢
    ର߅ઓͷ͓༠͍Λ͋Γ͕ͱ͏͍͟͝·͢
    େߐށ3VCZձٞͰͷൃදͷ৔·Ͱ͍ͨͩ
    ͍ͯͱͯ΋خ͍͠Ͱ͢
    ͜ͷൃදͰʮ3VCZϝιου͔Δͨʯ߈ུ
    ͷϨϕϧײΛര্͛͢Δͧ

    View full-size slide

  7. ର߅ઓͷͨΊʹ
    ԿΛ΍͍͔ͬͯͬͨ
    ϝϯόʔק༠
    ର߅ઓͷϧʔϧɾࢼ߹ਐߦΛܾΊΔ
    τϨʔχϯάͷͨΊͷԼ४උ
    τϨʔχϯά

    View full-size slide

  8. ϝϯόʔ
    Ӭ࿨͞Μ͸બखਓͳͷͰɺબ
    खΛਓूΊ͔͕ͨͬͨ

    ՌͨͤͣਓνʔϜ
    ಡखͷ!LVLP͕

    ௚લͰΠϯϑϧʹ౗Εͯɺ

    ࿥ԻσʔλͰͷࢀՃ
    ΧϝϥϚϯ༧ఆͩͬͨ
    !UBUTVPTBLVSBJʹɺ

    ٸᬎɺ࠶ੜ୲౰Λґཔ
    !OBZ
    !S@@IBOEB
    !LVLP
    !X@F@C@DP
    ff
    FF
    ؂ಜɾબख
    બख
    ಡख
    બख
    !UBUTVPTBLVSBJ
    ΧϝϥϚϯˠɹ࠶ੜ୲౰

    View full-size slide

  9. ࿥Իσʔλʁ
    ڝٕ͔ΔͨͰ͸࿥ԻσʔλΛ࢖͏͜ͱ͕Α͋͘ΔͷͰɺ
    !LVLP͕ࣾ಺࿅श༻ʹ࿥Իͯ͘͠Ε͍ͯͨ
    !X@F@C@DPGGFF͕ϑΝΠϧͱͯ͠੾Γग़ͯ͠ɺ࢖͑Δঢ়ଶʹ
    ੔ཧͯ͘͠Εͨ
    ͓͔͛ͰɺٸͳΠϯϑϧͰ΋ର߅ઓ͕։࠵Ͱ͖ͨ
    ެ։͠·ͨ͠ͷͰ࿅श౳ʹ͝׆༻͍ͩ͘͞ʂ
    ˞ӳޠ༝དྷͷ༻ޠͷൃԻ͕؁͍Օॴ͕͋Δ͔΋͠Ε·ͤΜ͕͝༰͍ࣻͩ͘͞
    IUUQTHJUIVCDPNFWFSZMFBGSVCZ@NFUIPE@DBSUBUSFFNBJOSFBEJOHT

    View full-size slide

  10. ϧʔϧɾࢼ߹ਐߦ
    ಡΈࡳͷʮઆ໌ʯͷத਎ΛಡΈ্͛ͯɺऔࡳΛऔΔͱ͍͏ํࣜʹͨ͠
    όϥΤςΟΛָ͠ΊΔΑ͏ʹҎԼͷ̎छྨͱͨ͠
    ͪΒ͠औΓ

    ʢݸਓઓɺऔͬͨࡳͷຕ਺߹ܭͰνʔϜউෛʣ
    ڝٕ͔Δͨʹ͍ۙɺ෷͍͋Γͷʮݯฏʯ

    ʢνʔϜઓʣ
    IUUQTHJUIVCDPNFWFSZMFBGSVCZ@NFUIPE@DBSUBCMPCNBJOSVMFTDPOUFTU@@@@SVMFNE

    View full-size slide

  11. τϨʔχϯάͷԼ४උ
    ʮܾ·ΓࣈʯΛ೺Ѳ͢Δ
    ࡳΛॏཁ౓Ͱ੔ཧ
    ʮ֮͑ํʯΛ࡞Δ
    ݯฏ༻ͷʮฒ΂ํʯΛ࡞Δ
    ׬શʹϓϩͷखޱ
    ͜͜·Ͱ΍͍͍ͬͯͷͩΖ͏͔ͱࣗ໰͢Δ೔ʑ

    View full-size slide

  12. ܾ·ΓࣈΛ೺Ѳ͢Δ
    ܾ·Γࣈͱ͸

    ʮͦ͜·Ͱฉ͍ͨ࣌఺Ͱऔࡳ͕̍ຕʹಛఆ͞ΕΔʯಡΈͷઌ಄
    ෦෼ͷ͜ͱ
    ܾ·ΓࣈΛநग़ͯ͘͠ΕΔ3VCZϓϩάϥϜΛॻ͍ͨ
    IUUQTHJUIVCDPNFWFSZMFBGSVCZ@NFUIPE@DBSUBUSFFNBJOLJNBSJKJ

    View full-size slide

  13. ܾ·Γࣈදʢ͍͋͏͓͑ॱʣ͕Ͱ͖ͨ

    View full-size slide

  14. ࡳΛॏཁ౓Ͱ੔ཧ
    ͍͋͏͓͑ॱͰ͸τϨʔχϯάʹ͸࢖͑ͳ͍
    ຕࡳɺຕࡳʜͳͲɺʮ࠷ॳͷԻ͕ಉ͡
    ࡳʯ͕Կຕ͋Δ͔Ͱ੔ཧ͢Δ
    ʮ࠷ॳͷԻ͕ಉ͡ࡳʯ͕গͳ͍

    ͸΍͘lܾ·ΔʢࣈࡳʹมԽ͢Δʣz

    ઓུతʹॏཁ
    ॏཁ

    View full-size slide

  15. ࣈࡳ͕ຕʂʂ
    ֮͑΍͘͢ฒ΂ͯΈͨ
    ͍͕͋ͯ΁ͦΑΘͻΐ
    ʢ૬ख͕ϔιऑͦ͏ʁʣ

    View full-size slide

  16. શମͷࡧҾͱ͍͏ܗͰ
    ֮͑΍͘͢੔͑Δ
    ͍͕͋ͯ΁ͦΑΘͻΐ
    ͤΊ͢ͺɾ͸Εɾ͓΋ɾ͔͡ͻ
    ͪͳΈʹڝٕ͔ΔͨʢඦਓҰटʣͰ͸
    Ή͢Ί;͞΄ͤɾ͏ͭ͠΋Ώɾ͍ͪͻ͖ɾ͸΍Α͔ʜ
    ͳͲͱ͍͏ߏ଄ʹͳΓ·͢

    View full-size slide

  17. ʮ֮͑ํʯΛ࡞Δ
    ͢΂ͯͷࡳʹɺ֮͑΍͍͢ϑϨʔζΛ༻ҙ
    ܾ·Γࣈ औࡳ ֮͑ํ ಡΈͷ࠷ॳ
    ͋ )BTIDPNQBDU ͍͋ͨͷίϯύΫτ ஋͕OJMͷ΋ͷΛʜ
    ͍ %BUBEF
    fi
    OF Πϛϡʔλϒϧͳ%BUB Πϛϡʔλϒϧͳ஋ʜ
    ͯ 4ZNCPMBMM@TZNCPMT ఆٛࡁΈͷBMM@TZNCPMT ఆٛࡁΈͷ͢΂ͯͷʜ
    ͕ ($EJTBCMF ($͸Ψʔϕʔδ ΨʔϕʔδίϨΫτʜ

    View full-size slide

  18. ॏཁ౓੔ཧ֮͑ํlދͷרz
    ʮಡΈࡧҾʯͱͯ͠ެ։͍ͯ͠·͢ʂ
    IUUQTHJUIVCDPNFWFSZMFBGSVCZ@NFUIPE@DBSUBCMPCNBJOSFBEJOH@JOEFYQEG

    View full-size slide

  19. ݯฏ༻ͷʮฒ΂ํʯΛ࡞Δ
    ݯฏͰ͸ࣗ෼ͷਞ͸޷͖ʹฒ΂ΒΕΔ
    ฒ΂ํΛܾΊ͓͚ͯ͹ɺʮ͋Δͱ͢Ε͹͜ͷล
    ʹ͋Δ͸ͣʯͱ͍͏͜ͱͰɺҐஔΛ֮͑ͣʹɺ
    ػցతʹऔΕΔ
    ࡳΛඈ͹͞Εͨޙ΋ɺಉ͡Α͏ʹฒ΂ΒΕΔɻ
    ͜Ε͸ɺ૬ख΁ͷϚφʔͱͯ͠΋େࣄ

    View full-size slide

  20. ฒ΂ํʹ͸ఆੴ͕͋Δ
    ࣗ෼
    େࣄͳࡳ͸୺ͬ͜
    ૬ख͔Βԕ͘
    ಉ͡Ի͕ଟ͍
    ॏཁ౓ͷ௿͍΋ͷ͸
    ্ஈͳͲʹ
    த͘Β͍ͷॏཁ౓

    View full-size slide

  21. ࡞੒ͨ͠ฒ΂ํ
    IUUQTHJUIVCDPNFWFSZMFBGSVCZ@NFUIPE@DBSUBCMPCNBJOOBSBCFQEG
    ͜Ε΋ެ։ͯ͠·͢

    View full-size slide

  22. ஈ֊తτϨʔχϯά
    ࣈࡳͷ҉ه
    ࣈࡳͷ҉ه
    ήʔϜͷྲྀΕɺ
    ҉هΛͲ͏࢖͏͔ɺ
    ࣗ୐࿅शͷ࢓ํʢࡳམͱ͠ʣΛઆ໌
    ࿅शձᶃ
    ࿅शձᶄ
    ΦϯϥΠϯ
    .5(
    ΦϯϥΠϯ
    .5(
    ΦϯϥΠϯ
    .5(
    ΦϑϥΠϯ
    ࿨ࣨձ৔
    ΦϑϥΠϯ
    ࿨ࣨձ৔

    View full-size slide

  23. ࠷ڧͷϝϯόʔΛ
    πϞ͍ͬͯͨ͜ͱ͕൑໌͢Δ
    ճ໨ͷ࿅श·Ͱʹ͔ͳΓࡳΛ͍֮͑ͯͨ
    ൓ࣹਆܦ΋هԱྗ΋͔ͳΓྑ͍
    ී௨ʹʮ͔Δͨձͷ༗๬ͳ৽ਓʯͩͬͨ
    ࿅शࢼ߹ͰͲΜͲΜٵऩɻ߈ΊɾकΓ΍ɺૹΓࡳ
    ͳͲͷઓज़Ϩϕϧʹ౸ୡ͢Δײ͡ʹ

    View full-size slide

  24. ࢀߟ
    ͔Δͨͷઓज़
    ߈ΊఢਞΛͱΔ
    कΓࣗਞΛͱΔ
    ૂ͍ಛʹڧ͘ҙࣝ͢Δࡳ͸଎͘ͱΕΔ
    ͕ɺ౓ʹૂ͑Δࡳ͸਺͕ݶΒΕΔ
    ૹΓࡳఢਞͷࡳΛͱͬͨΓ૬खͷ͓खͭ
    ͖ͳͲͰ૬खʹࡳΛૹΔͱ͖͸ɺͲͷࡳΛ
    ૹΔ͔બ΂Δɻઓज़ੑ͕ߴ͍ɻ

    View full-size slide

  25. ܴͦͯ͑ͨ͠
    ର߅ઓ౰೔ʂ

    View full-size slide

  26. ༧૝Ҏ্ʹΞπΠઓ͍

    View full-size slide

  27. ࢼ߹݁Ռ
    ͪΒ͠औΓ
    Ӭ࿨͞Μ
    ສ༿
    WTͰສ༿ͷউͪ
    ݯฏ ૊ରઓʣ
    ສ༿উ
    ܹઓΛ੍ͨ͠ͷ͸ສ༿νʔϜʂʂ
    ന೤ͨ͠ࢼ߹͹͔ΓͰͱͯ΋ָ͔ͬͨ͠

    View full-size slide

  28. ମݧஊ
    3VCZϝιου͔Δͨର߅ઓʹ
    બखͱͯ͠ࢀՃͯ͠Έͯ
    Ͳ͏͔ͩͬͨʁ
    ͸Μͩ
    !X@F@C@DP
    ff
    FF
    બख બख

    View full-size slide

  29. ҙຯ͕Α͗ͬͯ
    औΕͳ͍͜ͱ͕͋Δ

    View full-size slide

  30. ʮͻ͖͢͏ͷʜʯ
    "SSBZJODMVEF
    4USJOHJODMVEF

    View full-size slide

  31. ʮҾ਺ͷจࣈྻؚ͕·ΕΔ͔൑ఆ͢Δʯ
    "SSBZJODMVEF
    4USJOHJODMVEF

    View full-size slide

  32. ʮҾ਺ͷจࣈྻؚ͕·ΕΔ͔൑ఆ͢Δʯ
    "SSBZJODMVEF
    4USJOHJODMVEF
    ʮϨγʔόʔ͕Ҿ਺ΦϒδΣΫτͱ
    Ͱ౳͍͠ཁૉΛ͔࣋ͭ൑ఆ͢Δɻʯ

    View full-size slide

  33. 3VCZϝιου͔Δͨ
    ͳΒͰ͸ͷ೉͠͞
    ʮҾ਺Λʙʙ͢Δʯͱೝ͍ࣝͯ͠Δϝ
    ιουͷઆ໌จ͕ʮϨγʔόʔΛʙʙʯ
    ࣈ໘Ͱ҉ه͍ͯ͠Δͷʹҙຯ͕Α͗ͬͯ
    ஗ΕΔ
    ඦਓҰटͰ͸͋·Γͳͦ͞͏

    View full-size slide

  34. 0CKFDU
    ͓Ϳ͐͘͡ͱͷͲ͏͍ͪͤΛͻ͔͘͢Δ
    0CKFDUFRVBM
    ͓Ϳ͐͘͡ͱͷͲ͏͍͍ͭͤΛͻ͔͘͢Δ
    ͔Δͨͱͯ͠΋3VCZͱͯ͠΋
    ͍͍ײ͡ʹ֮͑ΒΕͯษڧʹͳΔ

    View full-size slide

  35. ମݧஊ͓ΘΓ

    View full-size slide

  36. ௅ઓऀ͸͍·͔͢ʁ

    ͪΐͬͱ๨Ε͖͚ͯͨͲɺ௅ઓ͍ͨ͠
    νʔϜ͕͍ͨΒडཱ͚ͯͯΔ͔΋
    ࠓճͷݚڀ੒ՌҰࣜΛެ։͍ͯ͠Δͷ
    Ͱɺ3VCZϝιου͔ΔͨΛ߈ུ͍ͨ͠
    ํ͸ɺͥͻ͝׆༻͍ͩ͘͞

    View full-size slide

  37. ສ༿͸
    ΤϯδχΞͷ࠾༻Λ
    ߦ͍ͬͯ·͢ʂ
    3VCZͰͨͷ͘͠։ൃ͍ͨ͠ํɺ
    Α͔ͬͨΒҰॹʹಇ͖·͠ΐ͏ʂ

    View full-size slide