Save 37% off PRO during our Black Friday Sale! »

新規プロジェクトのリードエンジニアになるために

4edb44c4292fa5bd1cbe463d0e80ecbd?s=47 Kaoru Hotate
December 14, 2019

 新規プロジェクトのリードエンジニアになるために

2019/12/14 平成Ruby会議#01 登壇資料

4edb44c4292fa5bd1cbe463d0e80ecbd?s=128

Kaoru Hotate

December 14, 2019
Tweet

Transcript

  1. ৽نϓϩδΣΫτͷ ϦʔυΤϯδχΞʹͳΔͨΊʹ ,BPSV)PUBUF!QVSVOLBPSV ฏ੒3VCZձٞ IFJTFJSVCZLBJHJ 1

  2. อཱ֜ ,BPSV)PUBUF  5XJUUFS!QVSVOLBPSV ϝυϐΞͱ͍͏ձࣾͷ ΤϯδχΞͰ͢ ฏ੒ݩ೥ੜ·ΕͰ͢ ࣗݾ঺հ 2

  3. ৽نϓϩδΣΫτͷϦʔυΤϯδχΞͷ໾ׂ 3 اըཱҊ࢓༷࡞੒ αʔϏεاը࢓༷࡞੒ ΫϥΠΞϯτͱͷ΍ΓऔΓ ٕज़બఆ1+5্ཱ͛ ٕज़બఆݟੵ΋Γ SBJMTOFXίʔυͷن໿࡞੒ ϓϩδΣΫτ؅ཧ ਐḿ֬ೝใࠂ

    վળҊͷཱҊόά਺ͷ؅ཧ ϝϯόʔڭҭɾධՁ ϝϯόʔڭҭධՁ ৽ϝϯόʔͷΞαΠϯ
  4. ࠓ೔࿩͢͜ͱ 4 SBJMTOFXʙ։ൃͷيಓʹ৐Δ·Ͱʹඞཁͳ͜ͱΛ࿩͠·͢ ‣ ϓϩδΣΫτͷੑ࣭ʹΑΔࠩ෼͕গͳ͍ͷͰɺ ࣄલ४උΛద༻ͤ͞΍͍͢ ‣ ͜ͷϑΣʔζͷ଎౓ɾਫ਼౓͕ɺޙʑେ͖͘Өڹ͕ग़Δ

  5. 5 ʮͳΜͰϦϑΝΫλϦϯά޷͖ͳΜͩΖ͏ʁʯ

  6. 6 ޷͖ͳՊ໨ ࢉ਺ɹಛʹ৔߹ͷ਺ ‣ ܾ·ͬͨղ͖ํɾߟ͑ํ͕͋Δʢύλʔϯʣ ‣ ύζϧײ֮Ͱɺʮ͋ͯ͸ΊΔʯʮ͘Έ͋ΘͤΔʯ ύλʔϯʹ͍࣋ͬͯͨ͘ΊʹʮͻΒΊ͖ʯʮ࣮ݧʯΛߦ͏ ࣗ෼ͳΓͷύλʔϯɾࢦ਑Λߏங͢Δ ‣

    ͨ͘͞Μͷ໰୊Λղ͍ͯɺ ৽͍͠ύλʔϯΛֶͿɾ࢖͍ํΛशಘ͢Δ ࢖͍͜ͳͨ͠ύλʔϯͷྔɺ͍࣋ͬͯΔࢦ਑ͷਫ਼౓ͷߴ͕͞ɺ ૉૣ͘ਖ਼֬ͳճ౴Λಋ͘ ๻ͷੲ࿩͠·͢
  7. ϦϑΝΫλϦϯά΋͍ۙͱ͜Ζ͕͋Δ 7 ‣ ͔֬Β͍͠ύλʔϯɾݪଇɾ੍໿΋͋Δ ྫ σβΠϯύλʔϯ40-*%ݪଇ-JOUFS ‣ ݪཧݪଇΛͦͷ··མͱ͠ࠐΊΔέʔε͸গͳ͍ ʮͻΒΊ͖ʯʮ࣮ݧʯ͕ඞཁ ࣗ෼ͳΓͷύλʔϯɾࢦ਑Λߏங͢Δ

    ‣ ͨ͘͞ΜͷέʔεΛ௨ͯ͡ɺ ݪཧݪଇΛ࢖͍͜ͳ͍ͯ͘͠ ࢖͍͜ͳͨ͠ύλʔϯͷྔɺ͍࣋ͬͯΔࢦ਑ͷਫ਼౓ͷߴ͕͞ɺ ૉૣ͘ਖ਼֬ͳίʔυΛಋ͘
  8. ύλʔϯΛ࡞ΔϝϦοτ 8 ‣ εϐʔυΛ্͛Δ ‣ ࣭Λ্͛Δ ψέɾϞϨΛ๷͛Δ ୭͕΍ͬͯ΋ಉ͡Α͏ʹͳΔ ʮ৽نϓϩδΣΫτͷ্ཱ͛ʯʹ΋ɺ ύλʔϯԽΛద༻Ͱ͖ΔͷͰ͸ͳ͍͔

  9. ৽نϓϩδΣΫτΛ يಓʹ৐ͤΔͨΊʹ४උ͢Δ͜ͱ 9

  10. ϦʔυΤϯδχΞͷ͓࢓ࣄ 10 ‣ ॳظஈ֊ʢνʔϜϝϯόʔ͕ಈ͖ग़͢લʹ΍Δ͜ͱʣ ‣ SBJMTOFX ‣ ։ൃϧʔϧͷ࡞੒ ‣ ίʔσΟϯάن໿

    ‣ ੩తղੳνΣοΫͷϧʔϧ ‣ ϥΠϒϥϦΞοϓσʔτͷස౓ νʔϜϝϯόʔ͕ಈ͖ग़͢લʹ͜͜·ͰऴΘΒͳ͍ͱɺ ͋ͱͰख໭Γ͕ൃੜ͢Δέʔε͕ଟ͍  SBJMTUFNQMBUF  ࣗ෼ͳΓͷ ίʔσΟϯάن໿
  11. ϦʔυΤϯδχΞͷ͓࢓ࣄ 11 ‣ தظஈ֊ʢνʔϜϝϯόʔͱ։ൃதʹ΍Δ͜ͱʣ ‣ ઃܭɾػೳ։ൃ ‣ ෛ࠴ʹͳΓͮΒ͍ίʔυ΁ ϨϏϡʔ΍ϦϑΝΫλϦϯά ‣

    ͋ͱ͔Βࢀըͨ͠ਓʹ ఻ୡͰ͖Δ࢓૊Έͮ͘Γ  ϦϑΝΫλϦϯά ύλʔϯͷ໌จԽ ෛ࠴ʹͳΓͮΒ͍ίʔυΛߏங͢ΔͨΊͷ࢓૊Έͮ͘Γ͕ඞཁ
  12. ৽͍͠ϓϩδΣΫτΛ࡞Δલʹߦ͏ͭͷ͜ͱ 12 ‣ SBJMTUFNQMBUF ‣ ࣗ෼ͳΓͷίʔσΟϯάن໿ ‣ ϦϑΝΫλϦϯάύλʔϯͷ໌จԽ

  13. SBJMTUFNQMBUF 13 UFNQMBUFSC 3BJMTΨΠυIUUQTSBJMTHVJEFTKQSBJMT@BQQMJDBUJPO@UFNQMBUFTIUNMࢀর generate(:scaffold, "person name:string") route "root to:

    'people#index'" rails_command("db:migrate") after_bundle do git :init git add: "." git commit: %Q{ -m 'Initial commit' } end $ rails new project_name -m path/to/template.rb
  14. SBJMTUFNQMBUF 14 ๻ͷSBJMTUFNQMBUFͷ঺հ IUUQTHJUIVCDPNIPUBUFLBPSVSBJMT@UFNQMBUF ‣ ෆཁͳϑΝΠϧͷ࡟আɾඞཁͳϑΝΠϧͷ௥Ճ ‣ ։ൃʹඞཁͳHFNΛɺ࠷ॳ͔Β(FNGJMFʹొ࿥͢Δ ‣ ߹ΘͤͯɺඞཁͳઃఆϑΝΠϧ΋σϑΥϧτͰ௥Ճ͢Δ

    ‣ ଘࡏ͢ΔDPOGJHϑΝΠϧʹɺ௥Ճ͍ͨ͠ઃఆΛͿͪ͜Ή ‣ ޙ͔Βઃఆ͕ඞཁͳ΋ͷ͸UPEPNEʹ·ͱΊΔ
  15. SBJMTUFNQMBUF 15 Rails.application.configure do (Ұ෦লུ) # N + 1͸໰౴ແ༻Ͱ500ը໘ʹભҠͤ͞Δ config.after_initialize

    do Bullet.enable = true Bullet.console = true Bullet.rails_logger = true Bullet.raise = true end end DPOGJHFOWJSPONFOUTEFWFMPQNFOUSC # Install JavaScript dependencies system('bin/yarn') CJOTFUVQSC / ͕͋ΔͱʹͳΔઃఆΛ௥Ճ SBJMTOFXͰࣗಈͰ࡞ΒΕΔ CJO഑ԼͷઃఆϑΝΠϧΛमਖ਼
  16. SBJMTUFNQMBUF 16 UFNQMBUFͷϝϦοτ ‣ ʮര଎ʯͰSBJMTͷ։ൃ؀ڥΛߏஙͰ͖Δ ‣ ࡞ۀͷൈ͚࿙Ε͕ͳ͘ͳΔ UFNQMBUFͷσϝϦοτ ‣ UFNQMBUFͷϝϯςίετ͕͔͔Δ

    ʢSVCZ΍SBJMTͷόʔδϣϯΞοϓ͝ͱʹඞཁʣ
  17. SBJMTUFNQMBUF 17 طଘͷϓϩδΣΫτΛίϐϖ͢Ε͹͍͍ͷͰ͸ʁ ‣ Կ͕ඞཁɾෆඞཁ͔൑ผ͢Δͷ͕೉͍͠ ‣ ೥قͷܦͬͨϓϩδΣΫτͷϧʔϧΛ ৽͍͠ϓϩδΣΫτʹ࣋ͪࠐΉͷ͸ةݥ

  18. ࣗ෼ͳΓͷίʔσΟϯάن໿Λ࡞͓ͬͯ͘ 18 ίʔσΟϯάن໿Λ࡞ΔϝϦοτ ‣ ϨϏϡʔͰࢦఠ͢Δ಺༰ΛݮΒ͢ ‣ ίʔυͷ࣭ΛߴΊΔ ‣ ϦϑΝΫλϦϯάʹ͔͔Δ࣌ؒΛݮΒ͢

  19. ࣗ෼ͳΓͷίʔσΟϯάن໿Λ࡞͓ͬͯ͘ 19 ωʔϜεϖʔεɾΫϥε໊Λ࠷ॳʹ౷Ұ͓͖͍ͯͨ͠ ‣ 3BJMTϓϩδΣΫτ͸ɺͨ͘͞ΜͷΫϥε͕Ͱ͖΍͍͢ ‣ ౷Ұ໋໊ͨ͠ϧʔϧ͕͋Δͱɺ ໊લ෇͚Λߟ͑Δίετ͕ݮΔɻ ·ͨɺྨࣅͷҙຯΛ࣋ͭΫϥεΛ୳͠΍͍͢ ‣

    Ϋϥε໊Λݟ͚ͨͩͰɺத਎Λ༧૝Ͱ͖Δ )PHF$SFBUPSΫϥε%#ʹอଘ͢Δ )PHF'PSNΫϥεWBMJEBUJPO΍CVJME·ͰͰอଘ͸͠ͳ͍  ࢀߟIUUQTHJTUHJUIVCDPNIPUBUFLBPSVGBEEGFFBG ҎԼͷ0CKFDUͷϧʔϧΛهࡌͯ͠·͢ 7JFX0CKFDU $PMMFDUPS0CKFDU 2VFSZ0CKFDU 4FSWJDF0CKFDU $SFBUPS6QEBUFS0CKFDU 'PSN0CKFDU 7BMJEBUF0CKFDU 7BMVF0CKFDU 1PMJDZ0CKFDU
  20. ϦϑΝΫλϦϯάύλʔϯͷ໌จԽ 20 ϦϑΝΫλϦϯάύλʔϯΛ໌จԽ͢ΔϝϦοτ ‣ ࠷ॳ͔ΒϦϑΝΫλϦϯά͕ෆཁͳίʔυΛ࣮૷͢Δ ‣ ϦϑΝΫλϦϯάʹ͔͔Δ࣌ؒΛݮΒ͢ ϦϑΝΫλϦϯά͕ಘҙʹͳΔͱɺʢதུʣѱ͍ίʔυΛॻ͘ͷΛ΍Ίɺ ѱ͍׳शʹै͏ͷΛ΍ΊɺϓϨϑΝΫλϦϯάΛ࢝ΊΔͷͩɻʢதུʣ ίʔυͷϦϑΝΫλϦϯά͸ɺίʔυΛॻ͘ͱ͖ʹͯ͠͸͍͚ͳ͍͜ͱɺ

    ୅ΘΓʹ͢΂͖͜ͱΛֶͿ্Ͱ࠷଎ͷํ๏ͷͭͳͷͩɻ %BWJE4DPUU#FSOTUFJOஶʮϨΨγʔίʔυ͔Βͷ୤٫ʯΑΓ
  21. ϦϑΝΫλϦϯάύλʔϯͷ໌จԽ 21 ϦϑΝΫλϦϯάύλʔϯͷྫ ‣ DPODFSOͷ࢖͍ॴͱআڈ͢Δํ๏ !XJMMOFU͞Μʮ$PODFSOTBCPVU$PODFSOTʯ IUUQTTQFBLFSEFDLDPNXJMMOFUDPODFSOTBCPVUDPODFSOT ‣ 'PSN0CKFDUΛ࢖͏ํ๏ ϝυϐΞ։ൃϒϩάʮGPSNPCKFDUΛ࢖ͬͯΈΑ͏ʯ

    IUUQTUFDINFEQFFSDPKQFOUSZ ‣ 'BU.PEFMΛ୤٫͢Δํ๏ ʮ'BU.PEFMʹରॲ͢ΔͭͷϦϑΝΫλϦϯάύλʔϯʯ IUUQTTQFBLFSEFDLDPNIPUBUFLBPSVGBUNPEFMOJEVJDIVTVSVUVGBMTFSJIVBLVUBSJOHVQBUBO
  22. ৽نϓϩδΣΫτͷϦʔυΤϯδχΞʹͳΔͨΊʹ ‣ SBJMTUFNQMBUF SBJMTOFXͷ͋ͱɺʮര଎ʯͰʮϞϨͳ͘ʯඞཁͳઃఆ͕Ͱ͖Δ ‣ ࣗ෼ͳΓͷίʔσΟϯάن໿ ‣ ϦϑΝΫλϦϯάύλʔϯͷ໌จԽ ϨϏϡʔʹॻ͚Δ࣌ؒΛݮΒ͠ɺίʔυͷ࣭Λ্͛Δ ·ͱΊ

    22
  23. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 23