SlideShare a Scribd company logo
PULL REQUESTS - The good, the bad
and the ugly
Aaron Weatherall
Senior Software Engineer @ THE ICONIC
Self-confessed API guru
Amateur boat builder
Blogger and writer
Ex-writer of bad pull request
Faithful servant to a fluffy white demigod/cat
named Minx.
G’day!
Disclaimer: All images in these slides were shameless ripped
from Google. #SozNotSoz
So, you want to open
a pull request, huh?1
So, you want to create a PR?
◉ Does it have good, atomic commit
messages?
◉ Ensure standards and best practices are
used
◉ Don’t expect CR without tests.. don’t do it
◉ Always plan for code review
◉ Open it early, but keep it short-lived
Note: This is the most serious slide, it gets better from here, OK?
BEST practices
DO Keep your PRs small
Would you want to review this?
DO use a meaningful title
Does the title summarise the
purpose of the code? Would future
you know what this is about?
DO Include a full description!
Add supporting docs, screenshots or
mockups if applicable!
DO add labels if required
If code shouldn’t be merged yet or
it’s a work in progress, tag it!
Don’t explain your code!
(If you need to explain it, it’s
probably not ready to merge!)
DON’T explain your code!
Don’t ask for approval, ask for
review!
Review, not approval!
Code Review:
The good
Remember: You are NOT your code.
(Except this guy.. he actually is)
Start with a smile!
Try to remember that the code was
written by a competent, intelligent
engineer that we hired.
Do your homework and
understand the context
◉ Review PR title/description
◉ Read supporting
documentation
◉ Pull branch and test
◉ Ask questions
Don’t just check syntax!
Syntax checking if for chumps
◉ Scrutinizer (PHP)
◉ CodeClimate (JS)
◉ Codebeat
◉ Codacy
Don’t syntax check.. automate!
Use questions and
recommendations to drive
dialogue
“Hey do you think this might be
better in it’s own class?”
“This looks like it’d work really well
using the xyz pattern, what do you
think?”
Always add rationale or
examples to comments
“This doesn’t look like it’s following
our standard for array notation in
standard XYZ [link here]”
“This looks like it’d work great with
a pipeline pattern - there’s a great
article about it here [link]”
Collaborate, don’t be a backseat
driver!
“Hey I like what you’ve done here,
but have you considered the
impact of xyz feature?”
VS
“Don’t do this”
Always take the opportunity to
teach.. never judge.
“Hey, I’ve noticed you’re doing a lot
of xyz, have you checked out the
auto-generate feature in ABC? I’m
happy to help you set it up”
VS
“Why would you do this? There are
tools for that”
Leave positive feedback or
emojis for stuff you LIKE!
CR isn’t just about the stuff that’s
wrong, it’s also about the stuff
that’s RIGHT.
Code Review:
The bad
Passing off opinion as fact
“This method should be static”
“No one uses singletons anymore”
“This is an ugly way of doing this”
“Customers won’t like that button”
The avalanche of comments
“Add a linebreak”
“And here”
“Here to”
“Here to”
“Here to”
“And here”
… x 50
Can you solve xyz while you’re
at it?
“Hey since you’re adding this,
simple, innocuous feature, maybe
you should refactor the router to do
xyz instead”
Bad example, but you get the point!
Asking judgemental questions
“Why didn’t you just do ___ here?”
“I’m not sure why you didn’t just do
___ instead”
“Why do people do this?”
Play nice and take the time to
teach, they genuinely might not
have thought of it!
Sarcastic or negative emojis
😭
“Unlearning toxic behaviors in a
code review culture”
by Sandya Sankarram - Engineer @ SurveyMonkey
thei.co/bw7
Twitter
@aaronwritesphp
Medium
@aaronweatherall
Questions?!

More Related Content

What's hot (15)

ODP
Aspect Oriented Programming (AOP) - A case study in Android
Carlos Anjos
 
PPT
Jira and Confluence - How the company behind those products works - Anatoli K...
Dominic Trần
 
PPTX
11 rules for programmer should live by
Ye Win
 
PDF
Testbash Philly: A Mob Testing Experience
Maaret Pyhäjärvi
 
PDF
Style guide driven development
Arvid Torset
 
PDF
What rails taught me – Eugene Pirogov
Ruby Meditation
 
PDF
Agile2016: Exploratory Testing an API
Maaret Pyhäjärvi
 
PPTX
Let's Do Kano Analysis of Agile Cymru
David Grant
 
PDF
Getting better through Katas
Nola Stowe
 
PPTX
Devoxx2015: It started with a whiteboard in the kitchen - Experiences from an...
Saskia Vermeer-Ooms
 
PDF
WordCamp Nashville 2016
Bobby Bryant
 
PPTX
Scrum is good - but kanban is better
Neal Champion
 
PDF
A Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
Equal Experts
 
PDF
TestWorksConf: Exploratory Testing an API in Mob
Maaret Pyhäjärvi
 
PPTX
Test Driven Development with Laravel
Tyler Johnston
 
Aspect Oriented Programming (AOP) - A case study in Android
Carlos Anjos
 
Jira and Confluence - How the company behind those products works - Anatoli K...
Dominic Trần
 
11 rules for programmer should live by
Ye Win
 
Testbash Philly: A Mob Testing Experience
Maaret Pyhäjärvi
 
Style guide driven development
Arvid Torset
 
What rails taught me – Eugene Pirogov
Ruby Meditation
 
Agile2016: Exploratory Testing an API
Maaret Pyhäjärvi
 
Let's Do Kano Analysis of Agile Cymru
David Grant
 
Getting better through Katas
Nola Stowe
 
Devoxx2015: It started with a whiteboard in the kitchen - Experiences from an...
Saskia Vermeer-Ooms
 
WordCamp Nashville 2016
Bobby Bryant
 
Scrum is good - but kanban is better
Neal Champion
 
A Whole Team Approach to Quality in Continuous Delivery - Lisa Crispin
Equal Experts
 
TestWorksConf: Exploratory Testing an API in Mob
Maaret Pyhäjärvi
 
Test Driven Development with Laravel
Tyler Johnston
 

Similar to #SydPHP - Pull Requests - The Good, The Bad & The Ugly (20)

PDF
How to review a pull request
rouanw
 
PPTX
Level Up Your Python Code Reviews to Ship It Faster - WWCodeDigital - 2020
Syeda Kauser Inamdar
 
PDF
Code reviews
Raúl Araya Tauler
 
PDF
Effective code reviews
Sebastian Marek
 
PPTX
Pull requests do's and don'ts
Arie Bregman
 
PDF
Code Reviews @ Quatico
Jan Wloka
 
PPTX
Improving Code Quality Through Effective Review Process
Dr. Syed Hassan Amin
 
PDF
Hidden sides of Code Review (MMM-2023)
Dmitrii Ivanov
 
ODP
Documenting code yapceu2016
Søren Lund
 
PPTX
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix
 
PDF
The perfect PR
Patricia Gao
 
PDF
Writing code for people
Alexey Ivanov
 
PDF
Practical pointers for better code review
khink
 
PDF
Code reviews
UNICORNS IN TECH
 
PPTX
How to successfully grow a code review culture
Danylenko Max
 
PDF
Code review best practice
Oren Digmi
 
PDF
How to write good quality code
Hayden Bleasel
 
PPTX
Effective Code Review
Eyal Kenig
 
PDF
Hidden sides of Code Review (Do-iOS)
Dmitrii Ivanov
 
PDF
How to successfully grow a code review culture
Nina Zakharenko
 
How to review a pull request
rouanw
 
Level Up Your Python Code Reviews to Ship It Faster - WWCodeDigital - 2020
Syeda Kauser Inamdar
 
Code reviews
Raúl Araya Tauler
 
Effective code reviews
Sebastian Marek
 
Pull requests do's and don'ts
Arie Bregman
 
Code Reviews @ Quatico
Jan Wloka
 
Improving Code Quality Through Effective Review Process
Dr. Syed Hassan Amin
 
Hidden sides of Code Review (MMM-2023)
Dmitrii Ivanov
 
Documenting code yapceu2016
Søren Lund
 
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix
 
The perfect PR
Patricia Gao
 
Writing code for people
Alexey Ivanov
 
Practical pointers for better code review
khink
 
Code reviews
UNICORNS IN TECH
 
How to successfully grow a code review culture
Danylenko Max
 
Code review best practice
Oren Digmi
 
How to write good quality code
Hayden Bleasel
 
Effective Code Review
Eyal Kenig
 
Hidden sides of Code Review (Do-iOS)
Dmitrii Ivanov
 
How to successfully grow a code review culture
Nina Zakharenko
 
Ad

Recently uploaded (20)

PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Ad

#SydPHP - Pull Requests - The Good, The Bad & The Ugly

  • 1. PULL REQUESTS - The good, the bad and the ugly
  • 2. Aaron Weatherall Senior Software Engineer @ THE ICONIC Self-confessed API guru Amateur boat builder Blogger and writer Ex-writer of bad pull request Faithful servant to a fluffy white demigod/cat named Minx. G’day!
  • 3. Disclaimer: All images in these slides were shameless ripped from Google. #SozNotSoz
  • 4. So, you want to open a pull request, huh?1
  • 5. So, you want to create a PR? ◉ Does it have good, atomic commit messages? ◉ Ensure standards and best practices are used ◉ Don’t expect CR without tests.. don’t do it ◉ Always plan for code review ◉ Open it early, but keep it short-lived Note: This is the most serious slide, it gets better from here, OK?
  • 7. DO Keep your PRs small Would you want to review this?
  • 8. DO use a meaningful title Does the title summarise the purpose of the code? Would future you know what this is about?
  • 9. DO Include a full description! Add supporting docs, screenshots or mockups if applicable!
  • 10. DO add labels if required If code shouldn’t be merged yet or it’s a work in progress, tag it!
  • 11. Don’t explain your code! (If you need to explain it, it’s probably not ready to merge!) DON’T explain your code!
  • 12. Don’t ask for approval, ask for review! Review, not approval!
  • 14. Remember: You are NOT your code. (Except this guy.. he actually is)
  • 15. Start with a smile! Try to remember that the code was written by a competent, intelligent engineer that we hired.
  • 16. Do your homework and understand the context ◉ Review PR title/description ◉ Read supporting documentation ◉ Pull branch and test ◉ Ask questions Don’t just check syntax!
  • 17. Syntax checking if for chumps ◉ Scrutinizer (PHP) ◉ CodeClimate (JS) ◉ Codebeat ◉ Codacy Don’t syntax check.. automate!
  • 18. Use questions and recommendations to drive dialogue “Hey do you think this might be better in it’s own class?” “This looks like it’d work really well using the xyz pattern, what do you think?”
  • 19. Always add rationale or examples to comments “This doesn’t look like it’s following our standard for array notation in standard XYZ [link here]” “This looks like it’d work great with a pipeline pattern - there’s a great article about it here [link]”
  • 20. Collaborate, don’t be a backseat driver! “Hey I like what you’ve done here, but have you considered the impact of xyz feature?” VS “Don’t do this”
  • 21. Always take the opportunity to teach.. never judge. “Hey, I’ve noticed you’re doing a lot of xyz, have you checked out the auto-generate feature in ABC? I’m happy to help you set it up” VS “Why would you do this? There are tools for that”
  • 22. Leave positive feedback or emojis for stuff you LIKE! CR isn’t just about the stuff that’s wrong, it’s also about the stuff that’s RIGHT.
  • 24. Passing off opinion as fact “This method should be static” “No one uses singletons anymore” “This is an ugly way of doing this” “Customers won’t like that button”
  • 25. The avalanche of comments “Add a linebreak” “And here” “Here to” “Here to” “Here to” “And here” … x 50
  • 26. Can you solve xyz while you’re at it? “Hey since you’re adding this, simple, innocuous feature, maybe you should refactor the router to do xyz instead” Bad example, but you get the point!
  • 27. Asking judgemental questions “Why didn’t you just do ___ here?” “I’m not sure why you didn’t just do ___ instead” “Why do people do this?” Play nice and take the time to teach, they genuinely might not have thought of it!
  • 28. Sarcastic or negative emojis 😭
  • 29. “Unlearning toxic behaviors in a code review culture” by Sandya Sankarram - Engineer @ SurveyMonkey thei.co/bw7