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
読みやすいコードを書くために気をつけていること/ be-careful-when-writin...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Masatoshi Moritsuka
February 06, 2020
Programming
0
200
読みやすいコードを書くために気をつけていること/ be-careful-when-writing-readable-code
Masatoshi Moritsuka
February 06, 2020
Tweet
Share
More Decks by Masatoshi Moritsuka
See All by Masatoshi Moritsuka
Rails の CLI ツールの書き方/writing-rails-cli-tool
sanfrecce_osaka
0
33
Time.zone.parse('dark')/time-zone-parse-dark
sanfrecce_osaka
0
94
外部APIが絡むテストをちょっといい感じに書く/a-little-nice-writing-external-api-testing
sanfrecce_osaka
0
25
gem_rbs_collection へのコントリビュートから始める Ruby の型の世界/contributing-gem-rbs-collection
sanfrecce_osaka
0
530
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
450
パターンマッチ使ってるかい?(kyobashi.rb)/use-ruby-s-pattern-matching-on-kyobashi-rb
sanfrecce_osaka
0
220
ApplicationController の継承を分割してエラーを減らした話/dividing-application-controller
sanfrecce_osaka
1
380
Input object ではじめる入力値検証/input-value-validation-using-input-object
sanfrecce_osaka
0
570
実例で学ぶRailsアプリケーションデバッグ入門 〜ログインできちゃってました編〜/rails-application-debug-introduction
sanfrecce_osaka
2
880
Other Decks in Programming
See All in Programming
Basic Architectures
denyspoltorak
0
670
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
Patterns of Patterns
denyspoltorak
0
1.4k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
AgentCoreとHuman in the Loop
har1101
5
240
2026年 エンジニアリング自己学習法
yumechi
0
130
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
240
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.2k
Side Projects
sachag
455
43k
A Tale of Four Properties
chriscoyier
162
24k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Code Reviewing Like a Champion
maltzj
527
40k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The SEO Collaboration Effect
kristinabergwall1
0
350
Bash Introduction
62gerente
615
210k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Spectacular Lies of Maps
axbom
PRO
1
520
Transcript
ಡΈ͍͢ίʔυΛॻͨ͘Ίʹ ؾΛ͚͍ͭͯΔ͜ͱ ௩ɹਅ(@sanfrecce_osaka) 2020/2/6ɹOmotesando.rb #omotesandorb
ࣗݾհ ➤ ௩ ਅ ➤ GitHub: @sanfrecce-osaka ➤ Twitter: @sanfrecce_osaka
➤ Qiita: @sanfrecce_osaka ➤ 9݄: େࡕ → ொా ➤ ruby-jpͷॅਓ ➤ גࣜձࣾϥάβΠΞ
ձࣾհ ➤ RubyɾRailsͷडୗ։ൃձࣾ ➤ at ொా ➤ ձࣾͷۙลͰՈ͕͍҆ʂ ➤ ະܦݧ͔ΒͰ2ϲ݄ͷݚम༗
➤ We are hiring!
ʲએʳMachida.rb͡Ί·ͨ͠
લஔ͖ ➤ ࣮RubyMineωλͰͦ͏ͱͯ͠அ೦͠·ͨ͠ ➤ ʮؾΛ͚͍ͭͯΔ͜ͱʯͳͷͰ࣮ફͰ͖͍ͯΔͱݶΒͳ͍ ➤ Ұ෦͜Ε͔Β͍ͬͯ͜͏ͱՃͨ͠ͷ͋Γ·͢ ➤ ίʔυྫશ͘༻ҙͰ͖ͯͳ͍Ͱ͢ ➤
ҙݟɾҟ͋ΕࢦఠΒ͑Δͱ͋Γ͕͍ͨͰ͢
ΠϯλʔϑΣʔεʹؾΛ͚ͭΔ ➤ ྑ͍ΠϯλʔϑΣʔεͱ(ݸਓతݟղ) ➤ ڍಈɾҾ͕ཧղ͍͢͠ ➤ ܕ͕ͳͯ͘ཧղͰ͖Δ(͋ͬͨํ͕ศར͚ͩͲ)
ΠϯλʔϑΣʔεͷཁૉ(ϝιουͷ߹) ➤ ໊લ ➤ ɾॲཧ༰͕දݱ͞Ε͍ͯΔ͔ ➤ ೖྗ ➤ ԿΛड͚औΔ͔ ➤
͍ͭɾͲ͜Ͱड͚औΔ͔ ➤ ग़ྗ ➤ ԿΛฦ͔͢
໋໊େࣄ ➤ ͍͞͞ͳͷͰ໋໊͢Δ ➤ ୯७ͳ݅ఆࣜΛϝιουʹΓग़͢ ➤ ϒϩοΫΛprocΛฦ͢ϝιουʹΓग़͢ ➤ ໋໊ͰखΛൈ͘ͱ͋ͱͰΊͪΌͪ͘Όਏ͍ ➤
໌ͷࣗผਓ ➤ ଞਓࣗͷ಄ͷதͷίϯςΩετΘ͔Βͳ͍ ➤ ్த͔Βࢀըͨ͠ਓʹྺ࢙తܦҢഎܠΘ͔Βͳ͍
None
ͦͷଞ ➤ ࠷ॳࡶʹॻ͘ ➤ ൚༻తʹ࡞Βͳ͍ ➤ ࠷ॳ͔Β100%ೲಘͷ͍͘ίʔυॻ͚ͳ͍ ➤ ϘʔΠεΧτɾϧʔϧʹଇͬͯίʔυΛॻ͘ ➤
ׂΕ૭ཧ ➤ SOLIDݪଇ
ʲࢀߟʳSOLIDݪଇ ➤ ୯Ұͷݪଇ(Single Responsibility Principle) ➤ ΦʔϓϯɾΫϩʔζυͷݪଇ(Open/closed principle) ➤ Ϧείϑͷஔݪଇ(Liskov
substitution principle) ➤ ΠϯλʔϑΣʔεͷ๏ଇ(Interface segregation principle) ➤ ґଘؔٯసͷݪଇ(Dependency inversion principle)
ࢀߟʹͳΔ υΩϡϝϯτɾॻ੶
Ruby on RailsΛͬͨ։ൃͰࢀরͯ͠Α͍υΩϡϝϯτ https://qiita.com/hanachin_/items/76a24bcef889edb59d19
style guide ➤ ruby-style-guide ➤ https://github.com/fortissimo1997/ruby-style-guide/blob/ japanese/README.ja.md ➤ rails-style-guide ➤
https://github.com/satour/rails-style-guide/blob/master/ README-jaJA.md ➤ rspec-style-guide ➤ https://github.com/willnet/rspec-style-guide ➤ ReactVueɺCSSʹstyle-guide͕͋Δ
Ϧʔμϒϧίʔυ
ίʔυίϯϓϦʔτ
Sandi Metzຊ
ΦϒδΣΫτࢦઃܭݪଇͱ https://qiita.com/UWControl/items/98671f53120ae47ff93a
ϓϥεЋ
ίϛοτ ϝοηʔδ
ίϛοτϝοηʔδΛॻ͘ͱ͖ʹؾΛ͚͍ͭͯΔ͜ͱ https://sinsoku.hatenablog.com/entry/2019/08/17/020954
ίϛοτϝοηʔδ͔ͬ͠Γॻ͘ཧ༝ ➤ ϨϏϡΞʔָ͕ ➤ ҙਤɾഎܠ͕Θ͔Δ ➤ ίʔυΛಡ·ͳͯ͘େےΛཧղͰ͖Δ ➤ ϨϏϡʔΠָ ➤
ޙʹϖΞɾϞϒϨϏϡʔ͕͋ͬͯରԠͰ͖Δ ➤ ͋ͱͰίʔυΛಡΉਓָ ➤ ྺ࢙తܦҢ͕Θ͔Δ ➤ ಡΉࡍͷใ͕૿͑Δ
ࣗͷ߹(ۀಉ͡ײ͡Ͱ͢) https://github.com/pocke/ruboty-ruby-jp/pull/24
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ