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
Practical Code Review with Gerrit
Search
gmacdougall
February 27, 2014
Programming
91
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Practical Code Review with Gerrit
Presented at ConFoo 2014
gmacdougall
February 27, 2014
More Decks by gmacdougall
See All by gmacdougall
Introduction to Spree (A Ruby on Rails E-Commerce App)
gmacdougall
0
220
Other Decks in Programming
See All in Programming
R8 の設定見直しでアプリサイズ削減
andpad
0
220
contenteditable と日本語入力に向き合う
colorful12
0
200
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
sbt 2.0: takeoff
eed3si9n
0
160
AWSに止められる覚悟してますか?
morizo_1984
2
530
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
140
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The SEO identity crisis: Don't let AI make you average
varn
0
590
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
A Tale of Four Properties
chriscoyier
163
24k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Google's AI Overviews - The New Search
badams
0
1.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
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