Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Practical Code Review with Gerrit
Search
gmacdougall
February 27, 2014
Programming
0
86
Practical Code Review with Gerrit
Presented at ConFoo 2014
gmacdougall
February 27, 2014
Tweet
Share
More Decks by gmacdougall
See All by gmacdougall
Introduction to Spree (A Ruby on Rails E-Commerce App)
gmacdougall
0
210
Other Decks in Programming
See All in Programming
Microservices rules: What good looks like
cer
PRO
0
1.2k
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
430
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.5k
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
390
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
420
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
700
AIコーディングエージェント(Gemini)
kondai24
0
210
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
240
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
150
生成AIを利用するだけでなく、投資できる組織へ
pospome
1
310
Featured
See All Featured
Navigating Team Friction
lara
191
16k
Code Review Best Practice
trishagee
74
19k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing Experiences People Love
moore
143
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Transcript
Practical Code Review with Gerrit by Gregor MacDougall Twitter: @GrMacDougall
Website: http://www.freerunningtech.com/
About Me Gregor MacDougall Sr. Software Developer @ FreeRunning Technologies
For Our Clients High Quality is IMPORTANT
Why I Love Code Review! • Code Review Stops Bugs
• Keeps Your Code Readable • Fosters Learning • Keeps Your Team Honest
Process of Code Review? • Does your team do code
review? • How do you do it? / How will you do it? • How often?
Gerrit • Developed by folks at Google • Provides an
automated web interface for code review • Used by popular projects ◦ Android, Chromium, Cyanogen, Eclipse, LibreOffice, MediaWiki, and many more
None
Based on Git • Gerrit is a remote git server
• Your code lives in Gerrit • Permissions Management System
Pushing a Change (Basic Way)
Fork & Pull Request
Fork & Pull vs. Gerrit • Gerrit based on commit
• Fork & Pull based on a branch • Gerrit updates by amending existing change • Fork & Pull updates by adding new commit • Gerrit is a tool designed explicitly for code review
Pushing a Change (Gerrit Way)
Magic Branch
Gerrit User Interface
Gerrit Review Window
Review Mode +2 Looks good to me, approved +1 Looks
good to me, but someone else must approve 0 No score -1 I would prefer that you didn't submit this -2 Do not submit
What To Look For in Code Review • obviously broken
code • performance and environment issues • console.log, print’s, debugging statements • more effective code • team conventions • style issues • adding additional responsibilities • localization and internationalization • missing/poor tests
What is wrong with this SQL? SELECT COUNT(*) FROM comments
WHERE email = ?;
What To Look For in Code Review • obviously broken
code • potential environmental issues • console.log, print’s, debugging statements • more effective code • team conventions • style issues • adding additional responsibilities • localization and internationalization • missing/poor tests
What To Look For in Code Review • obviously broken
code • potential environmental issues • console.log, print’s, debugging statements • more effective code • team conventions • style issues • adding additional responsibilities • localization and internationalization • missing/poor tests
Complexity
None
Amending a Commit
None
None
None
Interactive Rebase $ touch 2; git add 2; git commit
-m "Commit #2" $ touch 3; git add 3; git commit -m "Commit #3" $ touch 1; git add 1; git commit -m "Commit #1" $ touch 4; git add 4; git commit -m "Commit #4"
Interactive Rebase git rebase -i HEAD~4
Re-ording & Modifying Commits
Completing my Rebase
Adding Continuous Integration Jenkins • Install Dependencies • Bootstrap Database
• Run Complete Test Suite • Publish Build Results
Automatically Verifying Builds Code Review • Approved by humans •
Meets the teams standards Verified • Build successful • Meets automated code quality checks
Gerrit Trigger w/ Jenkins
Verify +1/-1 Automated Trigger Builds
Why this system works? Everything Gets Reviewed Everyone Reviews You
learn from feedback you get from others You learn from code you see others write
How to be most effective • Commit Often • Push
Often • Review Often
Words of Warning • This is a tool for developers
• Configuration is a little challenging • Will bring team dysfunction to the surface
For More Information Gerrit https://code.google.com/p/gerrit/ http://jenkins-ci.org/ FreeRunning Technologies http://www.freerunningtech.com/
About Me Twitter: @GrMacDougall Github: https://github.com/gmacdougall E-mail:
[email protected]
Slides: http://www.freerunningtech.com/confoo