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

Polishing on "Polished Ruby Programming" #kaigionrails / kaigionrails 2021

Shintaro Kakutani
October 22, 2021
4.6k

Polishing on "Polished Ruby Programming" #kaigionrails / kaigionrails 2021

Recorded Video: https://youtu.be/EJuKeX7k2rY

Ruby is Nice so We are Nice
https://speakerdeck.com/kakutani/ruby-is-nice-so-we-are-nice
https://youtu.be/NctyqVznddg, https://youtu.be/P7AunfXSOTQ

Polished Ruby Programming
https://www.packtpub.com/product/polished-ruby-programming/9781801072724

Jeremy Evans
https://github.com/jeremyevans
https://twitter.com/jeremyevans0

Lambda Note
https://www.lambdanote.com

n月刊ラムダノート 既刊5冊セット(電子書籍のみ) – 技術書出版と販売のラムダノート https://www.lambdanote.com/collections/frontpage/products/nmonthly-5set-2021-ebook

RubyでつくるRuby ゼロから学びなおすプログラミング言語入門(PDF版のみ) – 技術書出版と販売のラムダノート https://www.lambdanote.com/collections/frontpage/products/ruby-ruby-ebook

エクストリームプログラミング【委託】 - 達人出版会
https://tatsu-zine.com/books/extreme-programming

僕らはエクストリームプログラミングのかけら
https://speakerdeck.com/kakutani/xpmatsuri2019-keynote

Optimizing Partial Backtraces in Ruby 3 by Jeremy Evans - RubyKaigi Takeout 2021
https://rubykaigi.org/2021-takeout/presentations/jeremyevans0.html

Polished Ruby Programming (Amazon.com)
https://www.amazon.com/dp/1801072728

Polished Ruby Programming (Amazon.co.jp)
https://www.amazon.co.jp/dp/B093TH9P7C

Ruby Archaeology by Nick Schwaderer - RubyKaigi Takeout 2021
https://rubykaigi.org/2021-takeout/presentations/schwad4hd14.html
Ruby Archaeology
https://schwaderer-kaigi-2021.herokuapp.com/#33

前提知識が多い。すごくおおい → 最後にまとめて掲載

Rubyist Magazine 0028 号 巻頭言
https://magazine.rubyist.net/articles/0028/0028-ForeWord.html

ワタシハ ルビーカイギ チョットデキル / I can organize RubyKaigi a little
https://speakerdeck.com/kakutani/i-can-organize-rubykaigi-a-little

マッドマックス 怒りのデス・ロード (2015) - IMDb
https://www.imdb.com/title/tt1392190/

日本Rubyの会とは | 一般社団法人 日本Rubyの会
https://ruby-no-kai.org/

RubyKaigi Takeout 2021
https://rubykaigi.org/2021-takeout

RubyConf 2021
https://rubyconf.org/

Rubyにとって決定的に足りないものは何だと思いますか?
https://qr.ae/pGVdZc

状況に埋め込まれた学習―正統的周辺参加 Jean Lave, Etienne Wenger
https://www.amazon.co.jp/dp/4782800843

Kaigi on Rails 2021
https://kaigionrails.org/2021/

FJORD BOOT CAMP(フィヨルドブートキャンプ)
https://bootcamp.fjord.jp/

Ginza Rails27 igaiga - Speaker Deck
https://speakerdeck.com/igaiga/ginza-rails27-igaiga?slide=9

Jeremy Evans on Twitter: "Weighing in at 434 pages, "Polished Ruby Programming" will be available for sale on July 9. Currently, it is the #1 New Release in Ruby Computer Programming! This would probably be more impressive if there was more than one new release. :) https://t.co/wFRn4yHbVC @PacktPub" / Twitter
https://twitter.com/jeremyevans0/status/1407513414646198279

Junya Ogura on Twitter: "池袋のジュンク堂、ついにPythonコーナーが独立した。 https://t.co/nAgaXMnBEz" / Twitter
https://twitter.com/junya/status/1437704432372781060

Amazon.co.jp: 角谷 信太郎:作品一覧、著者略歴 https://www.amazon.co.jp/%E8%A7%92%E8%B0%B7%E4%BF%A1%E5%A4%AA%E9%83%8E/e/B0051LA12K

Kakutani Shintaro on Twitter: "売れる本を書けば本は売れる(迫真" / Twitter https://twitter.com/kakutani/status/1382919795939549184

前提知識がおおい。すごくおおい:

WEB+DB PRESS総集編[Vol.1~120]
https://gihyo.jp/book/2021/978-4-297-12215-7

メタプログラミングRuby 第2版
https://www.oreilly.co.jp/books/9784873117430/

オブジェクト指向設計実践ガイド ~Rubyでわかる 進化しつづける柔軟なアプリケーションの育て方
https://gihyo.jp/book/2016/978-4-7741-8361-9

リファクタリング 既存のコードを安全に改善する(第2版)
https://tatsu-zine.com/books/refactoring-2ed

テスト駆動開発
https://tatsu-zine.com/books/test-driven-development

実践テスト駆動開発 テストに導かれてオブジェクト指向ソフトウェアを育てる
https://www.shoeisha.co.jp/book/detail/9784798124582

Rubyのしくみ Ruby Under a Microscope
https://tatsu-zine.com/books/ruby-under-a-microscope-ja

Clean Architecture 達人に学ぶソフトウェアの構造と設計
https://tatsu-zine.com/books/clean-architecture

リーダブルコード
https://www.oreilly.co.jp/books/9784873115658/

Rubyソースコード完全解説(全文)
https://i.loveruby.net/ja/rhg/book/

Java言語で学ぶデザインパターン入門 第3版
https://www.hyuki.com/dp/

Specification by Example
https://www.manning.com/books/specification-by-example

The RSpec Book
https://www.shoeisha.co.jp/book/detail/9784798121932

The Well-Grounded Rubyist, Third Edition,
https://www.manning.com/books/the-well-grounded-rubyist-third-edition

Exceptional Ruby: Master the Art of Handling Failure in Ruby
https://pragprog.com/titles/ager/exceptional-ruby/

Ruby Performance Optimization: Why Ruby Is Slow, and How to Fix It https://pragprog.com/titles/adrpo/ruby-performance-optimization/

Rubyによるデザインパターン
https://www.amazon.co.jp/dp/4894712857

明解!Ruby―奥深いRubyの文化を身に付けるテクニック
https://www.amazon.co.jp/dp/4864011095

ドメイン特化言語 パターンで学ぶDSLのベストプラクティス46項目
https://www.amazon.co.jp/dp/4864010471

Shintaro Kakutani

October 22, 2021
Tweet

Transcript

  1. lզʑ͸ɺιϑτ΢ΣΞ։ൃʹ͓͍ͯ৽ͨͳࣾձߏ଄ Λ࡞Γग़͠ɺͦͷͳ͔ で ٕज़తͳߴΈͱ ビジ ωεͷ ビ ジ ϣϯΛ݁ び

    ෇͚ɺಠࣗͷ バ ϦϡʔΛ࣋ͬͨ プ ϩ ダ Ϋ τ΍αʔ ビ εΛੜΈग़͢ػձΛ͍࣋ͬͯΔɻ 
 ͜Ε が զʑͷڧΈ だ ɻ ɹ91ͷ੒ޭ͸ɺ৴པ で ͖Διϑτ΢ΣΞͷ͢ ば ΍͍ ݟੵΓɺ࣮૷ɺ デプ ϩΠ がで ͖Δ༏लͳ プ ϩ グ ϥϚʔ ͷ૿Ճʹ͔͔͍ͬͯΔɻ ڧௐ౳͸Ҿ༻ऀʹΑΔ
  2. “This book is aimed at intermediate Ruby programmers and focuses

    on teaching principles of Ruby programming, as well as trade-offs to consider when making implementation decisions. !"#$%&'()*+,-./0123456)*+,-./078/(9:;%< =>?@ABCD(EF2GHIAJKLM;3NOAPQ6QRCS — Jeremy Evans (RubyKaigi Takeout 2021)
  3. Polished Ruby Programming #ŪŰ w ίϛϡχςΟͷlेશత࣮ફऀzʹΑΔٱͼ͞ͷେܕॻ੶ w ෦ߏ੒ શষ 3VCZରԠ

    w ୈ෦3VCZͷlجૅz ϝιουҾ਺ʹҟ༷ʹ͘Θ͍͠  w ୈ෦࣮ફͷlݪଇͱτϨʔυΦϑz w ୈ෦+FSFNZͷओுP ff UIF3BJMT %# 8FC ηΩϡϦςΟ  w ϖʔδ จষͱίʔυ͔͠ͳ͍ ͔ͨ͘ͳʹਤ͕ແ͍  w l8PSL $PSSFDU 'VOʜBOE'BTUz w αϯϓϧίʔυ͕པ΋͍͠ པ΋͗͢͠Δ͔΋😂
  4. album_artists = {} album_track_artists = {} album_infos.each do |album, track,

    artist| (album_artists[album] ||= []) << artist (album_track_artists[[album, track]] ||= []) << artist end album_artists.each_value(&:uniq!) པ΋͍͠αϯϓϧίʔυͷ͘͝؆୯ͳྫ )BTIͷΤϯτϦʹ഑ྻΛ֨ೲ͢ΔࡍʹɺΤϯτϦ͕OJMͷ৔߹͸ۭ഑ྻͰॳظԽ͔ͯ͠ΒཁૉΛ௥Ճ ͢Δͷ͸ߦͰॻ͚ͯ΂ΜΓɺͱ͍͏͜ͱʹ͍ͭͯಛʹຊจͰઆ໌ෆཁͳͷ͕ର৅ಡऀͷதڃऀͩΑ 
 ଞʹ΋ɺsuper ͷ࢖͍ํ͕΍ͨΒͱ্खͳͷ͕ҹ৅ʹ࢒Γ·ͨ͠ɻࢀߟʹͳΔ😵💫
  5. Polished Ruby Programming #?? w ίʔσΟϯάελΠϧ͕ŧŔŕŪŝŬūſʜ w checkϝιουͩ ௚આ๏Ͱͳ໋͘ྩ๏ʜͬͯŠŪ 

    w do…end͔ΒͷϝιουνΣΠϯ͕ؾʹͳͬͪΌ͏ 
 ࢲ͸l5IF8FJSJDI$POWFOUJPOz೿ͳͷͰʜ  w ৘ใݯ͕লུ͞Ε͕ͪͳͷ͕ŝŬūſʜ एׯŰŘŠƃũŝţŪ͔΋  w 3VCZରԠʜແŰƅŦŖƃŵŕŧ ແ3BDUPS ແ3F fi OFNFOUT w લఏ஌͕͓͓͍ࣝɻ͓͓͍͘͢͝
  6. ૊ΈࠐΈΫϥε ม਺ ϝιουҾ ਺ ྫ֎ॲཧ ಠࣗΫϥεઃܭ  3VCP$PQ Ϟδϡʔϧ ϝλϓϩ

    άϥϛϯά %4- ςετ ΠσΟ ΦϚςΟοΫ3VCZ ϦϑΝΫλϦ ϯά σβΠϯύλʔϯ ࠷దԽʜ
  7. ༁ॻઈ൛ ༁͕ඍົ ະ༁ॻ੶ ݹ͍ େ෦ͳͷ΋ڍ͛ͯ·͢ ৭͕ബ͍΍ͭ 
 8&# %#13&44͸LPͷ࿈ࡌl3VCZͷ΢ϥΨϫz͕ඞಡd 


    ૯ूฤʹશ෦͸ऩ࿥͞Εͯͳ͍ͷͰԿ߸͔ݸผͰങ͏ 
 ʰ3VCZιʔείʔυ׬શղઆʱ 3)( ͸΢ΣϒͰશจಡΊ·͢
  8. lզʑ͸ɺιϑτ΢ΣΞ։ൃʹ͓͍ͯ৽ͨͳࣾձߏ଄ Λ࡞Γग़͠ɺͦͷͳ͔ で ٕज़తͳߴΈͱ ビジ ωεͷ ビ ジ ϣϯΛ݁ び

    ෇͚ɺಠࣗͷ バ ϦϡʔΛ࣋ͬͨ プ ϩ ダ Ϋ τ΍αʔ ビ εΛੜΈग़͢ػձΛ͍࣋ͬͯΔɻ 
 ͜Ε が զʑͷڧΈ だ ɻ ɹ91ͷ੒ޭ͸ɺ৴པ で ͖Διϑτ΢ΣΞͷ͢ ば ΍͍ ݟੵΓɺ࣮૷ɺ デプ ϩΠ がで ͖Δ༏लͳ プ ϩ グ ϥϚʔ ͷ૿Ճʹ͔͔͍ͬͯΔɻ ڧௐ౳͸Ҿ༻ऀʹΑΔ
  9. ƂŦŢŰ ſűƄŖŜŘŝƄ ŧŔŕŪũƄŝſ / I can organize RubyKaigi a little

    https://speakerdeck.com/kakutani/i-can-organize-rubykaigi-a-little 3VCZίϛϡχςΟ͸࿭੕ʹͻͱͭ ஍ٿ্ʹແ਺ʹଘࡏ͢Δࠃ΍஍Ҭɺൃ࿩͢Δࣗવݴޠɺڵຯɾؔ৺ʹΑΔαϒίϛϡχςΟͦΕͧΕ͕ॏͳΓͱͭͳ͕ΓΛ࣋ ͭ͜ͱͰ3VCZʹ·ͭΘΔଟ૚తͳ࣮ફڞಉମΛ஍ٿ্ʹߏ੒͢Δͷͩɻଟ༷Ͱ͋ͬͯ΋෼அ͸͞Εͯ΄͘͠ͳ͍Αɻ3VCZ࠾ ༻اۀͷ৬৔ʹ΋3VCZͷ࣮ફڞಉମͱͯ͠ͷଆ໘͕͋ΔΑɻ෼அ͞Ε͍ͯͳ͍ͱߟ͑ͯΈͯ͸Ͳ͏ͩΖ͏͔ʁ
  10. “This book is aimed at intermediate Ruby programmers and focuses

    on teaching principles of Ruby programming, as well as trade-offs to consider when making implementation decisions. !"#$%&'()*+,-./0123456)*+,-./078/(9:;%< =>?@ABCD(EF2GHIAJKLM;3NOAPQ6QRCS — Jeremy Evans (RubyKaigi Takeout 2021)
  11. Polished Ruby Programming #ŪŰ w ίϛϡχςΟͷlेશత࣮ફऀzʹΑΔٱͼ͞ͷେܕॻ੶ w ෦ߏ੒ શষ 3VCZରԠ

    w ୈ෦3VCZͷlجૅz ϝιουҾ਺ʹҟ༷ʹ͘Θ͍͠  w ୈ෦࣮ફͷlݪଇͱτϨʔυΦϑz w ୈ෦+FSFNZͷओுP ff UIF3BJMT %# 8FC ηΩϡϦςΟ  w ϖʔδ จষͱίʔυ͔͠ͳ͍ ͔ͨ͘ͳʹਤ͕ແ͍  w l8PSL $PSSFDU 'VOʜBOE'BTUz w αϯϓϧίʔυ͕པ΋͍͠ པ΋͗͢͠Δ͔΋😂
  12. ༁ॻઈ൛ ༁͕ඍົ ະ༁ॻ੶ ݹ͍ େ෦ͳͷ΋ڍ͛ͯ·͢ ৭͕ബ͍΍ͭ 
 8&# %#13&44͸LPͷ࿈ࡌl3VCZͷ΢ϥΨϫz͕ඞಡd 


    ૯ूฤʹશ෦͸ऩ࿥͞Εͯͳ͍ͷͰԿ߸͔ݸผͰങ͏ 
 ʰ3VCZιʔείʔυ׬શղઆʱ 3)( ͸΢ΣϒͰશจಡΊ·͢
  13. lզʑ͸ɺιϑτ΢ΣΞ։ൃʹ͓͍ͯ৽ͨͳࣾձߏ଄ Λ࡞Γग़͠ɺͦͷͳ͔ で ٕज़తͳߴΈͱ ビジ ωεͷ ビ ジ ϣϯΛ݁ び

    ෇͚ɺಠࣗͷ バ ϦϡʔΛ࣋ͬͨ プ ϩ ダ Ϋ τ΍αʔ ビ εΛੜΈग़͢ػձΛ͍࣋ͬͯΔɻ 
 ͜Ε が զʑͷڧΈ だ ɻ ɹ91ͷ੒ޭ͸ɺ৴པ で ͖Διϑτ΢ΣΞͷ͢ ば ΍͍ ݟੵΓɺ࣮૷ɺ デプ ϩΠ がで ͖Δ༏लͳ プ ϩ グ ϥϚʔ ͷ૿Ճʹ͔͔͍ͬͯΔɻ ڧௐ౳͸Ҿ༻ऀʹΑΔ
  14. lզʑ͸ɺιϑτ΢ΣΞ։ൃʹ͓͍ͯ৽ͨͳࣾձߏ଄ Λ࡞Γग़͠ɺͦͷͳ͔ で ٕज़తͳߴΈͱ ビジ ωεͷ ビ ジ ϣϯΛ݁ び

    ෇͚ɺಠࣗͷ バ ϦϡʔΛ࣋ͬͨ プ ϩ ダ Ϋ τ΍αʔ ビ εΛੜΈग़͢ػձΛ͍࣋ͬͯΔɻ 
 ͜Ε が զʑͷڧΈ だ ɻ ɹ91ͷ੒ޭ͸ɺ৴པ で ͖Διϑτ΢ΣΞͷ͢ ば ΍͍ ݟੵΓɺ࣮૷ɺ デプ ϩΠ がで ͖Δ༏लͳ プ ϩ グ ϥϚʔ ͷ૿Ճʹ͔͔͍ͬͯΔɻ ڧௐ౳͸Ҿ༻ऀʹΑΔ