SlideShare a Scribd company logo
1 of 20
Love your Pull Request (PRs)

                Nasir Jamal
                   @_nasj




                           We are hiring
                         www.housetrip.com
What this talk is not about!



 1   Git Commands / process flow




 2   Technical issues around PR issue /
     merging
Before issuing PRs



     Take a break and go through your
     code once again to keep things clean
     and tidy or any obvious refactoring you
 1   need

     As Uncle Bob says:
     *keep the ground cleaner than you
     found it
Before issuing PRs (cont..)



      Do not issue a PR unless you think
      your story is fully complete, i.e. specs,
      integration/cucumber tests
 2
      - Otherwise you are just wasting other
      people's time
      - Don't be sloppy
Before issuing PR (cont..)




     Keep your PRs small
     Max 200 - 400 LOCs
 3   If possible 50-100 LOCs or less

     - easy to review, spot errors, minimal
     comments, etc
After issuing PRs




     Do not merge until all the comments
     have been addressed
 1   - if you have comments from more
     than one person then make sure they
     all have been taken care off
After issuing PRs (cont..)




     Keep your ego away, comments are
 2   feedback about your code learn a trick
     or two
After issuing PRs (cont..)




     Seek to understand reviewers
 3   perspective
When reviewing PRs



     Go at an easy pace because faster is
     not better

 1   - if you don't have time, don't review it
     otherwise you will either end up
     pissing off the dev with your comments
     or you will miss obvious errors
When reviewing PRs (cont..)




     Look for code maintainability and
 2   robustness
When reviewing PRs (cont..)


     Avoid sarcasm or making demands
     instead suggest

     - when suggest, give an example
 3
     - ask the dev what he thinks about it
     or if he has any objections because you
     don't know what was going on his
     mind when he wrote it
When reviewing PRs (cont..)




     Remember you are giving a feedback
 4   or clarifying things that you are not
     sure
When reviewing PRs (cont..)



     Your purpose is to find defects and
     issues but never show that someone is
 5   inferior or you are …

     - if you really want to do it, do it in
     private - and most probably you will
     have your arse kicked
When reviewing PRs (cont..)




     Communicate your ideas clearly
 6
     - Find ways to make code better
When reviewing PRs (cont..)



     Be humble, explicit and if required
     talk in person, clarify and discuss

 7   - to the point & precise without
     sugarcoating
     - be careful with icons or with your
     WTFs (do not offend another person)
When can't agree




     Know when to continue and stop the
 1   debate and accept one or the other
     point of view
When can't agree (cont..)




 2   If required take the discussion offline
     and make a decision quickly
When can't agree (cont..)




     If you can't decide bring in some
 3   mediation and just go with the
     majority unless you can convert the
     majority
Things to remember




 1   there is no best solution, just better




 2   Issuer: Be thankful for the reviewer
     for taking the time out
Things to remember (cont..)




 3   Use it as a means of learning, growing,
     communication, team building and
     keeping the code sane and bug free



     Issuer/Reviewer: Don't take anything
 4   personally, the comments are about
     the code and not about you

More Related Content

Similar to Love Your Pull Requests (PRs): Tips for Effective Code Reviews

Rocking The Tech Interview
Rocking The Tech InterviewRocking The Tech Interview
Rocking The Tech InterviewTim Worboys
 
ProductTank Warsaw - Feedback Culture - Lucjan Samulowski
ProductTank Warsaw - Feedback Culture - Lucjan SamulowskiProductTank Warsaw - Feedback Culture - Lucjan Samulowski
ProductTank Warsaw - Feedback Culture - Lucjan SamulowskiProductTank Warsaw
 
The Story of an Abstract
The Story of an AbstractThe Story of an Abstract
The Story of an Abstractmah_sharonah
 
Interviewing 2012
Interviewing 2012Interviewing 2012
Interviewing 2012flyinrandy
 
Surviving the technical interview
Surviving the technical interviewSurviving the technical interview
Surviving the technical interviewEric Brooke
 
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 201810 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018Lemi Orhan Ergin
 
A Systematic Approach to Design Critique
A Systematic Approach to Design CritiqueA Systematic Approach to Design Critique
A Systematic Approach to Design CritiqueTryMyUI
 
10 Huge Mistakes Interviewers Make [SlideShare]
10 Huge Mistakes Interviewers Make [SlideShare]10 Huge Mistakes Interviewers Make [SlideShare]
10 Huge Mistakes Interviewers Make [SlideShare]Coburg Banks Recruitment
 
7 cs communication
7 cs communication7 cs communication
7 cs communicationahmadraza05
 
eChat for business
eChat for businesseChat for business
eChat for businessMike Ekey
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelinesLalit Kale
 
6 using punctuation for emphasis desktop
6 using punctuation for emphasis desktop6 using punctuation for emphasis desktop
6 using punctuation for emphasis desktopEnglish Online Inc.
 
Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)Dmitrii Ivanov
 
Breaking into product management
Breaking into product managementBreaking into product management
Breaking into product managementSeshadri Vyas
 
Resilience - IITS Module 1.pptx
Resilience - IITS Module 1.pptxResilience - IITS Module 1.pptx
Resilience - IITS Module 1.pptxAbbySiliman
 
Edu4Sure - LinkedIn
Edu4Sure - LinkedInEdu4Sure - LinkedIn
Edu4Sure - LinkedInEdu4Sure
 
Business communication final_tridat
Business communication final_tridatBusiness communication final_tridat
Business communication final_tridatswapnilgyani
 

Similar to Love Your Pull Requests (PRs): Tips for Effective Code Reviews (20)

Code reviews
Code reviewsCode reviews
Code reviews
 
Rocking The Tech Interview
Rocking The Tech InterviewRocking The Tech Interview
Rocking The Tech Interview
 
ProductTank Warsaw - Feedback Culture - Lucjan Samulowski
ProductTank Warsaw - Feedback Culture - Lucjan SamulowskiProductTank Warsaw - Feedback Culture - Lucjan Samulowski
ProductTank Warsaw - Feedback Culture - Lucjan Samulowski
 
The Story of an Abstract
The Story of an AbstractThe Story of an Abstract
The Story of an Abstract
 
Interviewing 2012
Interviewing 2012Interviewing 2012
Interviewing 2012
 
Surviving the technical interview
Surviving the technical interviewSurviving the technical interview
Surviving the technical interview
 
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 201810 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
 
A Systematic Approach to Design Critique
A Systematic Approach to Design CritiqueA Systematic Approach to Design Critique
A Systematic Approach to Design Critique
 
10 Huge Mistakes Interviewers Make [SlideShare]
10 Huge Mistakes Interviewers Make [SlideShare]10 Huge Mistakes Interviewers Make [SlideShare]
10 Huge Mistakes Interviewers Make [SlideShare]
 
7 cs communication
7 cs communication7 cs communication
7 cs communication
 
Booklet
BookletBooklet
Booklet
 
eChat for business
eChat for businesseChat for business
eChat for business
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelines
 
Note taking 101
Note taking 101Note taking 101
Note taking 101
 
6 using punctuation for emphasis desktop
6 using punctuation for emphasis desktop6 using punctuation for emphasis desktop
6 using punctuation for emphasis desktop
 
Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)
 
Breaking into product management
Breaking into product managementBreaking into product management
Breaking into product management
 
Resilience - IITS Module 1.pptx
Resilience - IITS Module 1.pptxResilience - IITS Module 1.pptx
Resilience - IITS Module 1.pptx
 
Edu4Sure - LinkedIn
Edu4Sure - LinkedInEdu4Sure - LinkedIn
Edu4Sure - LinkedIn
 
Business communication final_tridat
Business communication final_tridatBusiness communication final_tridat
Business communication final_tridat
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Love Your Pull Requests (PRs): Tips for Effective Code Reviews

  • 1. Love your Pull Request (PRs) Nasir Jamal @_nasj We are hiring www.housetrip.com
  • 2. What this talk is not about! 1 Git Commands / process flow 2 Technical issues around PR issue / merging
  • 3. Before issuing PRs Take a break and go through your code once again to keep things clean and tidy or any obvious refactoring you 1 need As Uncle Bob says: *keep the ground cleaner than you found it
  • 4. Before issuing PRs (cont..) Do not issue a PR unless you think your story is fully complete, i.e. specs, integration/cucumber tests 2 - Otherwise you are just wasting other people's time - Don't be sloppy
  • 5. Before issuing PR (cont..) Keep your PRs small Max 200 - 400 LOCs 3 If possible 50-100 LOCs or less - easy to review, spot errors, minimal comments, etc
  • 6. After issuing PRs Do not merge until all the comments have been addressed 1 - if you have comments from more than one person then make sure they all have been taken care off
  • 7. After issuing PRs (cont..) Keep your ego away, comments are 2 feedback about your code learn a trick or two
  • 8. After issuing PRs (cont..) Seek to understand reviewers 3 perspective
  • 9. When reviewing PRs Go at an easy pace because faster is not better 1 - if you don't have time, don't review it otherwise you will either end up pissing off the dev with your comments or you will miss obvious errors
  • 10. When reviewing PRs (cont..) Look for code maintainability and 2 robustness
  • 11. When reviewing PRs (cont..) Avoid sarcasm or making demands instead suggest - when suggest, give an example 3 - ask the dev what he thinks about it or if he has any objections because you don't know what was going on his mind when he wrote it
  • 12. When reviewing PRs (cont..) Remember you are giving a feedback 4 or clarifying things that you are not sure
  • 13. When reviewing PRs (cont..) Your purpose is to find defects and issues but never show that someone is 5 inferior or you are … - if you really want to do it, do it in private - and most probably you will have your arse kicked
  • 14. When reviewing PRs (cont..) Communicate your ideas clearly 6 - Find ways to make code better
  • 15. When reviewing PRs (cont..) Be humble, explicit and if required talk in person, clarify and discuss 7 - to the point & precise without sugarcoating - be careful with icons or with your WTFs (do not offend another person)
  • 16. When can't agree Know when to continue and stop the 1 debate and accept one or the other point of view
  • 17. When can't agree (cont..) 2 If required take the discussion offline and make a decision quickly
  • 18. When can't agree (cont..) If you can't decide bring in some 3 mediation and just go with the majority unless you can convert the majority
  • 19. Things to remember 1 there is no best solution, just better 2 Issuer: Be thankful for the reviewer for taking the time out
  • 20. Things to remember (cont..) 3 Use it as a means of learning, growing, communication, team building and keeping the code sane and bug free Issuer/Reviewer: Don't take anything 4 personally, the comments are about the code and not about you