SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Similar a 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 a 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
 

Último

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Último (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

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