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
LGTMについて
Search
amacou
June 28, 2016
Programming
6
100k
LGTMについて
社内の新卒研修でコードレビューについての私見を共有しました
amacou
June 28, 2016
Tweet
Share
More Decks by amacou
See All by amacou
MVPのようなものをチームに提案した話
amacou
3
2.4k
Other Decks in Programming
See All in Programming
Re:PandasAI:生成AIがデータ分析業務にもたらすパラダイムシフト【増補改訂版】
negi111111
1
1.1k
Compose Multiplatform과 Ktor로 플랫폼의 경계를 넘어보자
kwakeuijin
0
280
DevFest Android in Korea 2024 - 안드로이드의 문단속 : 앱을 지키는 암호화 이야기
mdb1217
1
160
Cohesion in Modeling and Design
mploed
3
220
現場から考えるソフトウェアエンジニアリングの価値と実験
nomuson
1
130
"noncopyable types" の使いどころについて考えてみた
andpad
0
160
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.2k
Micro Frontends for Java Microservices - dev2next 2024
mraible
PRO
0
210
自分だけの世界を創るクリエイティブコーディング / Creative Coding: Creating Your Own World
chobishiba
2
1.8k
게임 개발하던 학생이이 세계에선 안드로이드 개발자?
pangmoo
0
110
tsconfig.jsonの最近の新機能 ファイルパス編
uhyo
7
1.7k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
190
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
51
13k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Designing the Hi-DPI Web
ddemaree
280
34k
Practical Orchestrator
shlominoach
186
10k
4 Signs Your Business is Dying
shpigford
180
21k
The Language of Interfaces
destraynor
154
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.5k
Into the Great Unknown - MozCon
thekraken
31
1.4k
Transcript
LGTMʹ͍ͭͯ GMO ϖύϘ @amacou
ࣗݾհ • @amacou • ݩSIer:2~3ಇ͍ͨޙɺؒ;Β;Βͯͨ͠ • 20144݄25ʹGMO ϖύϘೖࣾ • ԬͷminneνʔϜʹଐ
• 20156݄ʹ౦ژͷminneνʔϜʹҠಈ • ͖ͳ৯:মௗͱഅ
LGTM
LGTM • Looks good to meʂ(Αͦ͞͏ʂ) • ࠓճɺ͍͍ͭͬͯΔʮLGTMʯͲ͏ ͍͏ͱ͜Ζ͕ʮΑͦ͞͏ʯͱࢥͬͯॻ͍͍ͯ Δ͔Λ·ͱΊ·͢
ࠓ͢͜ͱ • ίʔυϨϏϡʔͷత • ͳʹΛϨϏϡʔ͢Δͷ͔ • TipsΛ͚ͩ͢͜͠
ͪΖΜݸਓͷݟղΛଟʹؚΜ Ͱ͍·͢
ίʔυϨϏϡʔͱ ίʔυϨϏϡʔʢӳ: Code reviewʣɺιϑ τΣΞ։ൃఔͰݟա͝͞ΕͨޡΓΛݕग़ɾ मਖ਼͢Δ͜ͱΛతͱͯ͠ιʔείʔυͷମܥ తͳݕࠪʢࠪಡʣΛߦ͏࡞ۀͷ͜ͱɻ (ग़య)https://ja.wikipedia.org/wiki/ίʔυϨϏϡʔ
ίʔυϨϏϡʔͱ ίʔυϨϏϡʔʢӳ: Code reviewʣɺιϑ τΣΞ։ൃఔͰݟա͝͞ΕͨޡΓΛݕग़ɾ मਖ਼͢Δ͜ͱΛతͱͯ͠ιʔείʔυͷମܥ తͳݕࠪʢࠪಡʣΛߦ͏࡞ۀͷ͜ͱɻ (ग़య)https://ja.wikipedia.org/wiki/ίʔυϨϏϡʔ
ݟա͝͞ΕͨޡΓ ϓϩάϥϚͷεΩϧʹΑΒͣɺॻ͖ԼΖ͞Ε͔ͨΓͷιʔείʔυજࡏతʹό άηΩϡϦςΟϗʔϧʢॻࣜจࣈྻɺڝ߹ঢ়ଶɺϝϞϦϦʔΫɺόοϑΝΦʔ όʔϥϯͳͲʣͳͲͷෆ۩߹͕ೖΓࠐΜͰ͍Δ͜ͱ͕ଟ͍ɻ ιϑτΣΞ࣭ΛߴΊΔͨΊʹ͜ͷΑ͏ͳෆ۩߹Λআڈ͍ͯ͘͠ඞཁ͕͋Δɻ ͜ͷෆ۩߹Λൃݟ͠मਖ਼͢ΔͨΊͷ1ͭͷํ๏͕ɺιʔείʔυͷࠪಡΛߦ͏͜ ͱɺ͢ͳΘͪίʔυϨϏϡʔͰ͋Δɻ ΦϯϥΠϯͷιϑτΣΞϦϙδτϦʢಗ໊ͷCVSͳͲʣΛ͏ͱɺෳͷݸਓ͕ ڞಉͰίʔυϨϏϡʔΛߦ͏͜ͱ͕Ͱ͖Δɻ ίʔυϨϏϡʔΛࣗಈԽ͢ΔιϑτΣΞΛ͏ͱɺιϑτΣΞ։ൃऀͷΘΓ
ʹయܕతͳηΩϡϦςΟϗʔϧΛݟ͚ͭΔ࡞ۀΛߦͬͯ͘ΕΔɻͦͷΑ͏ͳιϑτ ΣΞͷྫͱͯ͠ɺFlawfinder Rough Auditing Tool for Security(RATS) ͳͲ͕ ͋Δɻ (ग़య)https://ja.wikipedia.org/wiki/ίʔυϨϏϡʔ
ͭ·Γ ΈΜͳͰόάηΩϡϦςΟʔϗʔ ϧΛݟ͚ͭΔ࡞ۀ
ͰຊʹͦΕ͚ͩͳͷ͔ʁʁ
ίʔυϨϏϡʔͷత • Λڞ༗͢Δ • ଐਓԽΛഉআ͢Δ • ίʔυͷ࣭Λ্͛Δ
Λڞ༗͢Δ • ϨϏϡʔ͢Δ͜ͱͦͷίʔυʹରͯ͠ Λ࣋ͭ͜ͱ • ͦͷίʔυʹ͕ͳ͍ͱ͍͏͜ͱͷอূ ਓʹͳΔ • ࣗࣄʹ͢Δ •
ೲಘ͢Δ·Ͱ͠߹͏ඞཁ͕͋Δ
ίʔυϨϏϡʔͷత • Λڞ༗ • ଐਓԽΛഉআ͢Δ • ίʔυͷ࣭Λ্͛Δ
ଐਓԽΛͳ͘͢ • ʮࠓʓʓ͞Μ͕ٳΈ͔ͩΒରԠͰ͖ͳ͍ʯ ʹͳΒͳ͍Α͏ʹ͢Δ • ͩΕͰͯ͢ͷίʔυΛϝϯςͰ͖ΔΑ ͏ʹͳΔ
ίʔυϨϏϡʔͷత • Λڞ༗ • ଐਓԽΛഉআ͢Δ • ίʔυͷ࣭Λ্͛Δ
ίʔυͷ࣭Λ্͛Δ • ίʔυΛཧղͰ͖Δ͔ • ޡΓ(όά)ͳ͍͔ • ϛΫϩͳόά • ϚΫϩͳόά •
ίʔυอकͰ͖Δ͔ • ૉΒ͍͠ίʔυͳ͍͔
ίʔυΛཧղͰ͖Δ͔ • ίʔυΛཧղ͢ΔͨΊʹ͕ࣝඞཁ • ݴޠ • ϑϨʔϜϫʔΫ • ϥΠϒϥϦ •
ΞϧΰϦζϜ • αʔϏε(ϏδωεϩδοΫ) • ࣝͷڞ༗ • ͩΕ͕ཧղͰ͖ΔΑ͏ʹͳΒͳ͍ͱଐਓԽ ͕͢͢Ή
ίʔυΛཧղͰ͖Δ͔ • Ͳ͏ͬͯཧղ͢Δ͔ • ͦͷίʔυͲ͏ͯ͠ඞཁͳͷ͔?Λҙࣝ͠ ͯಡΉ • Θ͔Βͳͯ͘٧·ͬͨΒฉ͘
ίʔυΛཧղͰ͖Δ͔ • Θ͔Βͳͯ͘٧·ͬͨΒฉ͘ • ͜ΕཱͳίʔυϨϏϡʔ • ฉ͔Εͨํɺઆ໌͢Δ͜ͱͰཧղ͕ਂ· Δ • ͓ޓ͍ͷػձͱͳΔ
͍͢͝ΤϯδχΞ͞Μ͕ҙຯΘ͔ Μͳ͍ίʔυॻ͍ͨΒόάͷՄೳ ੑ͕ߴ͍(ؾ͕͢Δ)
·͕ͪͬͯɺ ʰʮ͋ͷਓʯͷ͜ͱ͔ͩΒɺ͜ͷ ίʔυʹࢲͷߟ͕͑ٴͳ͍ਸ ߴͳཧ༝͕͋Δʹҧ͍ͳ͍ʱ ͳͲͲࢥͬͯޱΛ͙ͭ·ͳ͍͜ͱɻ ·ͣฉ͜͏ɻ
ίʔυͷ࣭Λ্͛Δ • ίʔυΛཧղͰ͖Δ͔ • ޡΓ(όά)ͳ͍͔ • ϛΫϩͳόά • ϚΫϩͳόά •
ίʔυอकͰ͖Δ͔ • ૉΒ͍͠ίʔυͳ͍͔
ϛΫϩͳόά • ϧʔϓ • ifͷ݅ • typo͕ͳ͍͔ • ʹͳ͍͔
ϛΫϩͳόά • ඞཁͳ͕ࣝগͳ͘ɺؒҧ͍͕͖ͬΓͱࢦ ఠͰ͖ΔͷͰίετ • linter(੩తίʔυղੳπʔϧ)Ͱػցతʹݟͭ ͚Δ͜ͱ͕Ͱ͖Δ͜ͱଟ͍ • ex) rubocop
ػցʹͰ͖Δ͜ͱͳΔ͘ػ ցʹͬͯΒ͍·͠ΐ͏
ίʔυͷ࣭Λ্͛Δ • ίʔυΛཧղͰ͖Δ͔ • ޡΓ(όά)ͳ͍͔ • ϛΫϩͳόά • ϚΫϩͳόά •
ίʔυอकͰ͖Δ͔ • ૉΒ͍͠ίʔυͳ͍͔
ϚΫϩͳόά • αʔϏεͱͯؒ͠ҧ͍ͬͯͳ͍͔ • ࠓ·Ͱͷ༷ͱໃ६ͳ͍͔ • ฏߦͯ͠࡞͍ͬͯΔଞͷػೳͱͷໃ६ͳ͍ ͔ • ಛఆͷ݅ͷ࣌ʹഁ͠ͳ͍͔
ϚΫϩͳόά • ݟ͚ͭΔͷൺֱత͍͠ • αʔϏεͷ͕ࣝඞཁʹͳΔ • ͔͔࣌ؒΔ͠ߴίετ
αʔϏεʹଐ͞Ε͙ͯ͢ݟͭ ͚Δͷ͍͠
Ͳ͏͢Εݟ͚ͭΒΕΔ͔?
ࣝΛ૿͔͢͠ͳ͍
ଐ͞Ε͙ͯ͢ʹ͜ͷϨϕϧͷ ϨϏϡʔٻΊΒΕͳ͍ͷͰɺয Βͣʹண࣮ʹ͍͜͏
ίʔυͷ࣭Λ্͛Δ • ίʔυΛཧղͰ͖Δ͔ • ޡΓ(όά)ͳ͍͔ • ϛΫϩͳόά • ϚΫϩͳόά •
ίʔυอकͰ͖Δ͔ • ૉΒ͍͠ίʔυͳ͍͔
ίʔυอकͰ͖Δ͔ • ίʔυγϯϓϧ͔ • Մಡੑߴ͍͔ • ςετΓ͍ͯΔ͔
ίʔυγϯϓϧ͔ • ૄ݁߹ͳΫϥεʹͳ͍ͬͯΔ͔ • DRYʹͳ͍ͬͯΔ͔ • ܧঝਂ͗͢ͳ͍͔ • Ϋϥεେ͖͗͢ͳ͍͔ •
ૣ͗͢Δ࠷దԽͳ͍͔
ίʔυอकͰ͖Δ͔ • ίʔυγϯϓϧ͔ • Մಡੑߴ͍͔ • ςετΓ͍ͯΔ͔
Մಡੑߴ͍͔ • ୭ͰಡΊॲཧͷ༰͕Θ͔Δίʔυ͕ඞ ཁ • ࣍୭͕ฤू͢Δ͔Θ͔Βͳ͍ • ͦͦ໌ͷࣗଞਓ
໊͚ • Ϋϥε໊/ϝιου໊/ม໊ͳͲΛదͳ໊ લʹ͢Δ͜ͱ • ՄಡੑΛߴΊΔͨΊʹదͳ໊લ͕ඞཁ • ΊͬͪΌ͍͠ • Αٞ͘ʹͳΔ
ద • దͳ໊લ͕͍͍ͯΔͱॲཧͷৄࡉΛ͏ճ ͕ݮΔ • a1, a2ͱ͍͏ϝιου໊ͱ, delete, nameͱ͍͏ ϝιου໊
• ϝιουʹӕ͕ͳ͍͔Ͳ͏͔ΛΑ͘ߟ͑ͳ͍ͱό άͷԹচʹͳΔ • deleteͰupdateΛ͍ͯͨ͠ͱ͔ɺdeleteͰࣦഊ ͯ͠trueΛฦ͍ͯͨ͠ͱ͔
ίʔυอकͰ͖Δ͔ • ίʔυγϯϓϧ͔ • Մಡੑߴ͍͔ • ςετΓ͍ͯΔ͔
ςετΓ͍ͯΔ͔ • ྫ͑ • rubyͷόʔδϣϯΞοϓ • railsͷόʔδϣϯΞοϓ • େ͖ΊͷػೳͷϦϑΝΫλϦϯά •
࣮֬ʹྑ͘ͳΔͣͳͷʹɺςετ͕ͳ͍ͱාͯ͘Ͱ͖ ͳ͘ͳͬͯ͠·͏ • ͍ͭͷؒʹ͔࠷৽ʹ͍͚ͭͳΔ • ηΩϡϦςΟʔϦεΫ • Ͳ͏ͤͳΒॻ͖ͨ͠΄͏͕͍ͷͰ
ίʔυͷ࣭Λ্͛Δ • ίʔυΛཧղͰ͖Δ͔ • ޡΓ(όά)ͳ͍͔ • ϛΫϩͳόά • ϚΫϩͳόά •
ίʔυอकͰ͖Δ͔ • ૉΒ͍͠ίʔυͳ͍͔
ૉΒ͍͠ίʔυͳ͍͔ • ૉΒ͍͠ίʔυΛݟ͚ͭͨΒੵۃతʹڞ༗ ͠Α͏ • ྑ͍ίʔυΈΜͳͰ๙ΊΑ͏ • ͔࣍ΒΈΜͳͰͦΜͳίʔυΛ͔͚ΔΑ ͏ʹͳΖ͏
ʑͷϨϏϡʔͰؾΛ͚ͭΔ͜ͱ
ϨϏϡʔස • Ͱ͖Δ͚ͩૣ͘ϨϏϡʔ͠Α͏ • ΘΕͳ͍ίʔυ͙͢Δ • ίʔυॻ͍ͨޙ͔ΒΕ͍ͯ͘ • ϨϏϡʔ →
मਖ਼ → ࠶ϨϏϡʔͷαΠΫϧ খ͍͞΄͏͕Φʔόʔϔου͕গͳ͍
ٞʹ٬؍ੑ͕Γͳ͍࣌ • ϝιου໊ͳͲͰAͱBͲ͕ͬͪΘ͔Γ͍͢ ͔அͰ͖ͳ͍͕࣌͋Δ • ୈࡾऀ͕Ͳ͏͍͏அΛ͍ͯ͠Δ͔ΛௐΔ ͱೲಘͰ͖Δ͜ͱ͕ଟ͍ • ex)ݴޠͰͲ͏͍͏نଇͰ໊લΛ͚͍ͭͯ Δ͔?/ϑϨʔϜϫʔΫ?/ϥΠϒϥϦ?
ϨϏϡʔΛॻ͘ͱ͖ • ཧ༝Λॻ͘ • ྫΛग़͢ ͱฦ͍͢͠
ʮ͜ͷॲཧԿ͕͍ͨ͠ͷ?ʯ ↑Ͳ͏͑·͔͢?
ʮ͜ͷॲཧʓʓͱ͍͏͜ͱΛΓ͍ͨΑ͏ʹ ݟ͑ΔͷͰ͕͢ɺͦΕͳΒ☓☓☓ͱ͍͏ॻ͖ํ ʹม͑ͨ΄͏͕γϯϓϧʹͳΓͦ͏Ͱ͢ʯ ↑Ͳ͏͑·͔͢?
࠷ޙʹ
େࣄͳ͜ͱ • αʔϏεΛյ͞ͳ͍͜ͱΛνʔϜͰ୲อ͢Δ • ະདྷʹΘͨͬͯ։ൃΛଓ͚ΒΕΔΑ͏ʹ͢Δ • ͕ࣗͨͪ͢Δ
ͬͱΘ͔Γ͍͢ࢿྉͳ͍ͷ? • ࠓճͷࢿྉΛॻ͖ऴ͑ͯʮ͏ʙΜΘ͔Γʹ͘ ͍ͳ͊ͬͯʯͬͯࢥͬͯάάͬͨΒɺಉ྅͕2 લʹॻ͍ͨࢿྉ͕͋ͬͨɻ • ͥΜͥΜιονͷ΄͏͕Θ͔Γ͍͢Α • https://speakerdeck.com/hisaichi5518/ kodorebiyufalsehua
ϨϏϡʔؔͰ͖ͳεϥΠυ • ͦ͘ίʔυͷ http://www.slideshare.net/ rootmoon/7-37892729 • ϨϏϡʔ͓͡͞Μͷ https:// speakerdeck.com/seri/ turakunaikodorebiyufalseyun-yong
ίʔυϨϏϡʔͯ͠Β͏ଆͷ • http://techlife.cookpad.com/entry/ 2015/03/30/174713