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
Zen Code Reviews
Search
Xavier F. Gouchet
September 04, 2017
Video
Programming
35
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Zen Code Reviews
Xavier F. Gouchet
September 04, 2017
Video
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
0
84
Being an ethical software engineer
xgouchet
0
350
Libérez votre créativité
xgouchet
0
190
Unleash your Programming Creativity
xgouchet
0
240
Demystifying the Test Pyramid
xgouchet
1
770
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
160
Property Based Testing in Practice
xgouchet
0
140
Develop your CI tools
xgouchet
2
520
How to write a safe and reliable Open Source Library
xgouchet
1
370
Other Decks in Programming
See All in Programming
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
110
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.2k
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
290
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
1
650
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
4
3k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
280
iOSDC2026登壇資料.pdf
riofujimon
0
160
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
スマート反転とウェブアクセシビリティ
camiha
0
210
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
120
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
Featured
See All Featured
How to make the Groovebox
asonas
2
2.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Curse of the Amulet
leimatthew05
3
14k
4 Signs Your Business is Dying
shpigford
187
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
368
27k
Evolving SEO for Evolving Search Engines
ryanjones
0
290
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
New Earth Scene 8
popppiees
4
2.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
Transcript
ZEN CODE REVIEWS THE WAY TOWARDS PAINLESS CODE REVIEWS Droidcon
Berlin 2017 1
ABOUT… XAVIER F. GOUCHET ANDROID ARCHITECT AT ‘MR TOOLS’ /
CI ADMIN / UT ADVOCATE ON ALL SOCIAL NETWORKS @XGOUCHET 2.1
WHO USES CODE REVIEW HERE ? ♫ Put your hands
in the air ♪ — Placebo 3
CODE REVIEWS @ DEEZER 18 Android developers 3 main repositories
Varied experiences and skills 4
WHY ? THE PURPOSES OF CODE REVIEWS 5
FIND DEFECTS EARLY Logic fallacies Typos, spelling Edge cases Potential
technical debt 6
HARMONIZE THE CODE BASE Code style Naming conventions Architecture Libraries
7
GENERATE DISCUSSION AROUND… Choices Algorithm Data Structure Architecture Libraries Features
Best practices 8
TEAM BUILDING Cohesion Trust Lower “Linkedin factor” Asynchronous Pair Programming
9
SHARE KNOWLEDGE Onboard junior / new developers Everyone has something
to teach Everyone has something to learn 10
DOWNSIDES OF CODE REVIEW More time spent per ticket /
less time spent delivering feature Senior developer frustration 11
WHAT ? THE DIFFERENT TYPES OF CODE REVIEWS 12
“AUTOMATIC” CODE REVIEW Static Analysis Android Lints Findbugs, Checkstyle, PMD
Detekt, ktlint Tests (Unit, Integrated, Functionnal) 13
PRE-COMMIT Pro Quality ensured before merge All code must be
reviewed Cons Productivity impact Back & forth Hell ™ 14
POST-COMMIT Pro Continuous development Limit git conflicts Cons Bug can
ship to production Resolution can become non trivial afterwards 15
OPTIONAL CODE REVIEWS by commit author by commit length by
files modified random checks … ? 16
PAIR REVIEW WITH ANOTHER DEVELOPER Provide a single feedack Compare
different viewpoints Tone down negative feedbacks 17
CODE REVIEW MEETING WITH THE AUTHOR 3 to 7 attendees
Only for non trivial reviews Mentor the author Get in depth view Discuss alternatives Immediate feedback 18
HOW ? THE DOS AND DONTS OF CODE REVIEW 19
WRITING REVIEWABLE CODE Keep the commits short git add --patch
/ git add -p Comment the code Use a proper commit message CR Brief for non trivial commits Link to the ticket 20
BEFORE SUBMITTING, REVIEW YOUR OWN CODE Find easy to spot
issues Typos Commented code Duplicates / possible refactoring Copy / Paste errors Take a step back on your code 21
COMMENTING ON ISSUES “If you can't understand that, then yes,
you're crazy. Or just terminally stupid.” — Linus 22
BE PRECISE : WHAT IS THE PROBLEM ? “THIS CODE
IS BAD !” ✗ “THIS LINE COULD CAUSE A MEMORY LEAK…” ✔ 23
ARGUMENT : WHY IS IT A PROBLEM ? “OBVIOUSLY!” ✗
“… BECAUSE THE ACTIVITY REFERENCE IS RETAINED…” ✔ 24
BE HELPFUL : HOW TO FIX THE PROBLEM ? “DEAL
WITH IT!” ✗ “… YOU COULD INSTEAD USE A WEAKREFERENCE.” ✔ 25
DEFINE CRITICITY : HOW IMPORTANT IS THE ISSUE ? “…”
✗ “IT’S NOT CRITICAL, BUT MUST BE FIXED IN A LATER COMMIT BEFORE THE RELEASE CANDIDATE NEXT WEEK.” ✔ 26
EXAMPLES “The name of this variable is ambiguous. You could
rename it as …” “I don’t think this method should be in this class because it’s outside of the class’s responsibility.” “This rule has many edge cases, you should add more unit tests.” 27
VOTING DOWN Avoid blocking commits unnecessarily Always make the reasons
clear Make a full review If an issue has already been raised, don't comment just to say “+1” 28
RECEIVING CRITIQUE Take a step back Stay humble Motivate your
choices Accept the critique (even if it means more work for you) 29
OVERALL BEHAVIOR Stay open minded Make it about the code,
not the people Don't start the flame war Share your knowledge Give as much as you receive 30
GOING FURTHER ? CODEREVIEW.STACKEXCHANGE.COM 31
THANKS FOR YOUR ATTENTION ANY QUESTION ? 32