Dev Lead Community Rewards
Identifying issues
Improving code quality
Sharing knowledge
Mentoring
Prevent Bugs
Identifying issues
Improving code quality
Sharing knowledge
Mentoring
Prevent Bugs
Identifying issues
Gate-Keeping | Mob | Pairing | RFC
Improving code quality
Gate-Keeping | Mob | Pairing | Show-n-tell
Sharing knowledge
Mob | Pairing | Show-n-tell
Mentoring
Mob | Pairing
Prevent Bugs
Gate-Keeping | Pairing | Mob
Reduce distractions in the code review process when we utilize multiple reviews
"Unclear or vague comments"
"Excessive focus on style"
"Lack of context"
"Personal attacks"
"Delayed feedback"
"Not addressing edge cases"
"No Tests"
"Unrealistic expectations"
"Waiting Forever"
Expectations are agreements made by one side without the other side's consent
Linters
Auto-formatters
CI to build and run Tests
PR Templates
If something comes up in a code review that isn't in style guide then it should be brought up in the Style Guide not the code review.
A Style guide is an agreement
If you can't articulate what problem is being solved is it worth commenting?
We should change this prop from `onClick` to `onClose` because it is more clear when the function is called
nit: This function could return a ternary
"Let's rename this function"
"We should do ABC pattern here"
"You should use XYZ API, it would be more safe"
Let's rename this function, to something like this:
We should do ABC pattern here, like this:
You should use XYZ API, it would be more safe. We can do something like this:
function getThirdPartyDataWithRetry(){
return Array.from({length:5})
.reduce(promise=>{
return promise.catch(()=>{
return thirdPartyApi()
})
}, thirdPartyApi())
}
/**
* API errors unexplicably, but will
* resolve after 1 or 2 times.
* This has 5 retry attempts
* just to be sure.
*/
function getThirdPartyDataWithRetry(){
return Array.from({length:5})
.reduce(promise=>{
return promise.catch(()=>{
return thirdPartyApi()
})
}, thirdPartyApi())
}
Aim to bring up the code a letter grade (or two)
Grade | |
---|---|
A | Excellent code. Maybe a few minor thing or suggestions, but may not even be worth the time to ask for code changes. |
B | Good code with good code coverage. Has some edge cases that needs tests and/or variable naming that could be more clear |
C | Functions correctly with some happy path tests. Some code duplication and naming |
D | Meets minimum functionality, but missing test and is super hard to read. Probably needs a major refactor/de-factor |
F | It doesn't function or so unintelligible you can't be confident it will function |
"I didn't know this API existed"
"I really like this solution. It's simple and elegant."
"This was a difficult task. Good Job."
Read your comments be for sending them.
Make sure the comments are about the code and not about the person who wrote them.
Try to use "we" instead of "you"
Remove trigger words like "just"
❌ Why don't you just refactor this function?
✅ Can we refactor this function? Like this.....