SlideShare a Scribd company logo
コードレビューの文化を少しず
つ改善していった話
Yasuhiro Kiyota @yasuhiroki
自己紹介
自己紹介
• Yasuhiro Kiyota
• @yasuhiroki
• Twitter: @duck_yasuhiroki
• GitHub: https://github.com/yasuhiroki
• 開発者(個人)のためのJenkins - Git Plugin編
• http://qiita.com/yasuhiroki/items/61a2be613fc7dcfc8682
• そのシェルスクリプトもうちょっとシンプルに書けそう Tips集(Golf/シェル芸ではない)
• http://qiita.com/yasuhiroki/items/fad876db9e5505fceb03
https://certificates.cloudbees.com/10203903
趣味
n=1 s='n=%d40s=%s40eval40$47printf40"#改善レベル ${n}n${s}"40"$((+
+n))"40"${s@Q}"47' eval $'printf "#改善レベル ${n}n${s}" "$((++n))" "${s@Q}"'
本題
謝辞
前回のコード改善#2で発表しました
https://www.slideshare.net/yasuhirokiyota/ss-68577272
前回のコード改善#2への感謝
• 自分の発表に対するTwitterの反応
• 「似たような取り組み自分たちもやってる」
• 「XXな方法もあるよ」
• 他の方の発表
• 自分とは違う視点での改善方法
• 視野が広がった
• 議論タイムでの意見交換
• 自チームを客観的に見ることができた
Agenda
• 前回の発表 (2016/11) から

現在 (2017/06) までの取り組み・成果
• (ちなみに)開発はGitHubで進めています
前回発表のおさらい
前回発表のおさらい
• まずは、とにかく話す
• コードレビューに不慣れな人とまずは話す
• 話したやりとりをGitHub上にも残してもらう
• 自然とGitHubだけでも議論できるようになった
• GitHub テンプレート・ラベルの活用
• WIP、 PleaseReview ラベル
• 初心を忘れない
• どんな思いから、

どんな文化を作りたかったのか忘れない
前回参加時に感じた自チームの <課題>
• テスト書いてない
• typoやインデントのチェックも人間まかせ
• 機械的なレビューは機械に任すべき
• 良いコードとは何か、チームとして答えを持っていな
い
• ふわふわとした不安感
• これでいい…のかなぁ…
前回参加時に感じた自チームの <強い所>
• 全員がレビューワー
• 上司・先輩・後輩 関係なく全員がレビューワー
• コードレビューに対する意識が統一されている
• レビューはお願いするもの
• マージは自分でするもの
• レビューワーへの優しさ
• レビューしやすいcommit粒度にする意識が高い
• “fix” だけのコミットメッセージはない
• 万一あった時は、朝会で愛のある吊し上げにあう
現在の環境
前回から変わった現在の環境
• プロジェクトが変わった
• TypeScript + AngularJS なあれこれ
• TypeScript + Express なあれこれ
• TypeScript + AWS Lambda なあれこれ
• メンバーはほぼ変わらず
• 手探りで作った文化をそのまま継承できた
• 文化はできているので少しずつ改善
取り組んだこと
取り組んだこと
• テスト書いた
• Jenkins で PR 毎に自動ビルド
• 動作検証用の環境をDockerで用意
• 結合テスト用の環境を簡単に用意できる
• 動作確認がスムーズに
取り組んだこと
• プルリクエスト テンプレートの改善
• どういう観点で動作確認したか書くことを必須に
• 開発者QAと呼んでいる
• 「XXした時にYYとなることをUTで担保」
• 「**の処理が最後まで実行されること」
• QAを専門にしてきたメンバーがいるので、

テスト観点のレビューもしてもらっている
• レビューワーは、

仕様通りにテストされているか簡単に知ることがで
きる
開発者QAの背景
• QA担当がチームに1人いる
• 最終的な評価は全てその人任せに
• スケールしない
• その人は別のタスクもある
• 開発者がQAできるようになればいい
• 開発者がQAした内容をレビューしてもらいたい
• コードレビューと同じタイミングでやれば良い
取り組んだこと
• 設計資料もコードレビュー
• PlantUML で システム構成図を書く
• PlantUMLと生成される画像を一緒に git push
• 設計のレビューもGitHub上に残す
• 設計資料もコードと見なして世代管理
• 参考) PlantUML
• http://plantuml.com/
• http://qiita.com/ykawakami/items/
f6688b845945669f0ce5
安心と自信をもって

マージできるように
取り組んだこと
• 朝会でのゲリラレビューを実施
• 朝会で突発的に、適当なプルリクをピックアップ
• 内容をメンバー全員で確認
• がっつりコードレビューするわけではなく、

「こういう書き方 XX さんぽいねー」

「このプルリクもっとレビューしやすくできそう」


などと表面的な意見交換をする
• チームでコードレビューしてる感
意識の変化
• テストしやすいコードとは、を意識するように
• どんなコードだと簡単なのか議論が活発に
• 口頭のやりとりはコードレビューにも残す
• (残せてないもの増えてきたかも…)
• 良いコードとは、の模索がチーム共通の課題に
• たまに朝会で議論
開発者QAの義務化の恩恵
• 何をテストしたか、のエビデンスが残る
• テスト漏れがあった時に振り返られる
• テスト観点に対するレビューも行える
• 全員で品質を守る意識
課題
コードレビューの負荷増
• 開発者QAへのレビューが特に…
• レビューワーの担当が何となく決まっている
• タイミングによっては1人に負荷が集中しがち
• まんべんなくレビューできる人ほど負荷高い
• レビューツールを入れて改善したい..
• Danger を試し中
おしまい

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

コードレビューの文化を少しずつ改善していった話