Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
読みやすいコードを書くために気をつけていること/ be-careful-when-writin...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Masatoshi Moritsuka
February 06, 2020
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
読みやすいコードを書くために気をつけていること/ be-careful-when-writing-readable-code
Masatoshi Moritsuka
February 06, 2020
More Decks by Masatoshi Moritsuka
See All by Masatoshi Moritsuka
拙者、『型は欲しいが型は書きたくない』者たちとの和睦を結び、るびぃにおける型の領地安堵を実現せんと欲す者也 #sekigahara01/sekigahara01
sanfrecce_osaka
4
2.6k
Rails の CLI ツールの書き方/writing-rails-cli-tool
sanfrecce_osaka
0
86
Time.zone.parse('dark')/time-zone-parse-dark
sanfrecce_osaka
0
140
外部APIが絡むテストをちょっといい感じに書く/a-little-nice-writing-external-api-testing
sanfrecce_osaka
0
39
gem_rbs_collection へのコントリビュートから始める Ruby の型の世界/contributing-gem-rbs-collection
sanfrecce_osaka
0
650
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
500
パターンマッチ使ってるかい?(kyobashi.rb)/use-ruby-s-pattern-matching-on-kyobashi-rb
sanfrecce_osaka
0
300
ApplicationController の継承を分割してエラーを減らした話/dividing-application-controller
sanfrecce_osaka
1
450
Input object ではじめる入力値検証/input-value-validation-using-input-object
sanfrecce_osaka
0
620
Other Decks in Programming
See All in Programming
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
JRuby: Past, Present, and Future
headius
0
190
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
910
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
スマート反転とウェブアクセシビリティ
camiha
0
210
Family mrubyの進捗
kishima
1
130
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.2k
Jetpack Compose メカニズム
skydoves
0
470
What We Talk About When We Talk About XP
m_seki
2
680
すこし踏み込む CancellationToken
htkym
2
880
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
3.5k
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
330
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
The agentic SEO stack - context over prompts
schlessera
0
940
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Faster Mobile Websites
deanohume
310
32k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
540
First, design no harm
axbom
PRO
2
1.3k
Building the Perfect Custom Keyboard
takai
2
880
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
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ