Code review tips for Pythonistas
2019/08/17 | Masataka Arai
Who am I?
PyCon Korea for the first time in 3 years
Are you writing codes within a team? 🙋
Are you doing code reviews? 🙋
Code review is an essential part of team development, but surprisingly difficult and can be frustrating 😵
In this talk, I'll introduce code review tips that you can use from today 👍
And these tips are usually practiced in SQUEEZE Inc.
Agenda
Style Guide / Formatter
Common story 1
Style Guide
Style Guide
🚨 Warning
Example: In assertEqual (A, B), you must give the expected value to A and the actual value to B.
=> But either is OK in Python unittest.
Style Guide
Formatter
This division of labor is important.
We have limited time to use, so let's automate if possible!
How to write Pull Requests
Common story 2
Pull Request rules
Pull Request template in SQUEEZE Inc.
Pull Request rules
screenshots or GIF animations
Checking Pull Request size
Common story 3
Common story 3
Split Pull Request into small pieces
Checking diff size by Danger
dangerfile.js
Sharing WIP
GitHub provides draft Pull Request
How to write review comments
Common story 4
Comment prefix
Example case:
When a hotfix release, you can decide to fix only the [must] part now and fix [nits] and [IMO] later.
※ Sorry for Japanese comments
※ Sorry for Japanese comments
Question using [ask] prefix
What to do if a long discussion occurs
Common story 5
Let's talk face-to-face
Move to Issue
Mob code review
Common story 6
Mob code review
> Mob programming is a software development approach where the whole team works on the same thing, at the same time, in the same space, and at the same computer.
https://en.wikipedia.org/wiki/Mob_programming
Mob code review
Mob code review
Playful comments
Common story 7
Playful comments
Let's express your emotions by using these!!!
LGTM image
LGTM image
emoji
Summary
Summary
=> Let's work on essential reviews with ❤️ for team members!!!
Summary
Through better code reviews,
Let's practice Readability counts.
Thanks :)
PyCon Korea 2019
제목 텍스트