SlideShare a Scribd company logo
Code Review
Cris Uy
Agenda
• Goals
• Types of Code Review
• Tips for Developers during Code Review
• Tips for Reviewers during Code Review
• General Guidelines
• Control Structures
• Error Handling
• Resource Leaks
• Performance
• Maintainability and Reusability
Goal
• To spot and fix defects early in the process
• Helps to maintain a level of consistency in
design and implementation
• Better shared understanding of the code
base as team members learn from each
other
Types of Code
Review
Formal Code Review
• Involves software developers meeting
together and reviewing relevant code line by
line many times taking the opportunity to
analyze printed copies of the materials
Peer Code Review
• Can be done over the shoulder where the
reviewer looks over the author’s shoulder as
the other goes through the code
• Or can be done via email or version control
system like Git and online conference
Tips for Developers
during Code Review
• The primary reviewer is the author.
• You
• Create a checklist for yourself of the
things that the code reviews tend to
focus on
• Understand and accept that you
will make mistakes
• No matter how much your
knowledge is, someone else will
always know more than you
• Don’t rewrite code without
consultation
• The only constant thing in this
world is change
• Fight for what you believe, but
gracefully accept defeat
• Please note that review meetings
are not problem solving meetings
• Helping to maintain the coding
standards
Tips for Reviewers
during Code Review
• Critique code instead of people – be
kind to the coder, not to the code
• Treat people who know less than
you with respect, deference and
patience
• Ask questions rather than make
statements
• Avoid the why questions
• Remember to praise
• Make sure you have good coding
standards to reference
• Remember that there is often more
than one way to approach a
solution
• You should not rush through a code
review – but also, you need to do it
promptly
• Review fewer than 200 – 400 lines
of code at a time
General Guidelines
• Is the code following coding
guidelines and naming
conventions?
• Reviewer should have a reference
for coding guidelines and
conventions
• Are all compiler warnings fixed?
• Are there leftover code for
testing/development?
• Is the code complexity under the maximum
allowable threshold for a given metric?
• *a class is less than 500 lines
• *a method does not contain more than 15
control structures
Control Structures
• Check for infinite loops?
• Does the loop iterate the correct number of
times?
Error Handling
• Does the code check for null exceptions?
• Does the code check for array out of bounds
exceptions?
Resource Leaks
• Are all allocated memory freed?
• Do all classes perform thorough cleanup on
its destructor (dealloc)?
• Are all notification observers, event listeners,
message receivers or gesture recognizers
removed when not needed?
• Does the code accurately keep track of
reference counting?
Performance
• Are you using blocking system calls when
performance is involved?
• Will the same data be reloaded often?
• Will caching data improve performance?
• Is a large number of big objects being
created and destroyed in a small amount of
time?
• Will reusing objects improve performance?
• Was this optimization really needed?
Maintainability and
Reusability
• Is the code using magic numbers and magic
strings?
• Does the code comply with the DRY (Don’t
Repeat Yourself) principle?
Thank you!

More Related Content

What's hot (19)

PPTX
Code Review
R M Shahidul Islam Shahed
 
PDF
Code Review
Divante
 
PDF
Code Review: How and When
Paul Gower
 
PPTX
Code review at large scale
Mikalai Alimenkou
 
PDF
Code review in practice
Edorian
 
PDF
How to successfully grow a code review culture
Nina Zakharenko
 
PPTX
Unit tests benefits
Kate Semizhon
 
PDF
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
PPT
Code review
dqpi
 
PDF
Code Review Tool Evaluation
Kate Semizhon
 
PPT
Peer Code Review An Agile Process
gsporar
 
PPT
Code Review
rantav
 
PDF
Code Review
Tu Hoang
 
PDF
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
PDF
Code Review
Lukas Rypl
 
PPTX
Top 10 static code analysis tool
scmGalaxy Inc
 
PDF
Manual Code Review
n|u - The Open Security Community
 
PPTX
Improving Code Quality Through Effective Review Process
Dr. Syed Hassan Amin
 
PDF
Alexandru Bolboaca - Unit Testing from the Trenches
Mozaic Works
 
Code Review
Divante
 
Code Review: How and When
Paul Gower
 
Code review at large scale
Mikalai Alimenkou
 
Code review in practice
Edorian
 
How to successfully grow a code review culture
Nina Zakharenko
 
Unit tests benefits
Kate Semizhon
 
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
Code review
dqpi
 
Code Review Tool Evaluation
Kate Semizhon
 
Peer Code Review An Agile Process
gsporar
 
Code Review
rantav
 
Code Review
Tu Hoang
 
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
Code Review
Lukas Rypl
 
Top 10 static code analysis tool
scmGalaxy Inc
 
Improving Code Quality Through Effective Review Process
Dr. Syed Hassan Amin
 
Alexandru Bolboaca - Unit Testing from the Trenches
Mozaic Works
 

Viewers also liked (13)

PDF
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
VincitOy
 
PPTX
Code Quality Management iOS
Arpit Kulsreshtha
 
PPTX
Oracle ATG Commerce Overview for developers
Kate Semizhon
 
PPTX
ATG Advanced Profile Management
Kate Semizhon
 
PPTX
How to improve code quality for iOS apps?
Kate Semizhon
 
PPTX
Common mistakes for ATG applications that affect performance
Kate Semizhon
 
PDF
NDC13: DVCS와 코드리뷰 그리고 자동화를 통한 쾌속 개발
Jinuk Kim
 
PDF
Code Review - DevOn2013
호정 이
 
PPTX
ATG pipelines
Kate Semizhon
 
ODP
An Introduction to PC-Lint
Ralf Holly
 
PPTX
ATG Tutorials - Promotion.
Sanju Thomas
 
PPTX
ATG Best Practices
Kate Semizhon
 
PPTX
Code review как средство обеспечения качества программного обеспечения
SQALab
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
VincitOy
 
Code Quality Management iOS
Arpit Kulsreshtha
 
Oracle ATG Commerce Overview for developers
Kate Semizhon
 
ATG Advanced Profile Management
Kate Semizhon
 
How to improve code quality for iOS apps?
Kate Semizhon
 
Common mistakes for ATG applications that affect performance
Kate Semizhon
 
NDC13: DVCS와 코드리뷰 그리고 자동화를 통한 쾌속 개발
Jinuk Kim
 
Code Review - DevOn2013
호정 이
 
ATG pipelines
Kate Semizhon
 
An Introduction to PC-Lint
Ralf Holly
 
ATG Tutorials - Promotion.
Sanju Thomas
 
ATG Best Practices
Kate Semizhon
 
Code review как средство обеспечения качества программного обеспечения
SQALab
 
Ad

Similar to Code Review for iOS (20)

PPTX
How to Have Code Reviews That Developers Actually Want
Cameron Presley
 
PPTX
Code Reviews
phildenoncourt
 
PDF
Code reviews
Raúl Araya Tauler
 
PPT
Code Review
Ravi Raj
 
PPTX
Expert Code Review best practices
jeetendra mandal
 
PPTX
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix
 
PPTX
Unit3 software review control software
Reetesh Gupta
 
PDF
Code Reviews Inside Out
Ines Jelovac
 
PDF
Voxxed days 2015-hakansaglam-codereview
Hakan Saglam
 
PDF
Code reviews
Juan Maiz
 
PPT
Static white box testing lecture 12
Abdul Basit
 
PPT
White box testing
Abdul Basit
 
PPTX
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
sarah david
 
PDF
Code review best practice
Oren Digmi
 
PDF
Code Review Matters and Manners
Trisha Gee
 
PDF
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pdf
sarah david
 
PPTX
Effective Code Review
Eyal Kenig
 
PDF
Effective Peer Review
Joel Hooks
 
PPT
Code reviews: a short introduction
FreekDB
 
PPTX
Clean code quotes - Citações e provocações
André de Fontana Ignacio
 
How to Have Code Reviews That Developers Actually Want
Cameron Presley
 
Code Reviews
phildenoncourt
 
Code reviews
Raúl Araya Tauler
 
Code Review
Ravi Raj
 
Expert Code Review best practices
jeetendra mandal
 
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix
 
Unit3 software review control software
Reetesh Gupta
 
Code Reviews Inside Out
Ines Jelovac
 
Voxxed days 2015-hakansaglam-codereview
Hakan Saglam
 
Code reviews
Juan Maiz
 
Static white box testing lecture 12
Abdul Basit
 
White box testing
Abdul Basit
 
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
sarah david
 
Code review best practice
Oren Digmi
 
Code Review Matters and Manners
Trisha Gee
 
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pdf
sarah david
 
Effective Code Review
Eyal Kenig
 
Effective Peer Review
Joel Hooks
 
Code reviews: a short introduction
FreekDB
 
Clean code quotes - Citações e provocações
André de Fontana Ignacio
 
Ad

More from KLabCyscorpions-TechBlog (13)

PDF
Object Calisthenics in Objective-C
KLabCyscorpions-TechBlog
 
PDF
Auto Layout on Xcode 5
KLabCyscorpions-TechBlog
 
PDF
Object Calisthenics
KLabCyscorpions-TechBlog
 
PDF
Why You're A Bad PHP Programmer
KLabCyscorpions-TechBlog
 
PDF
Redis Set Go
KLabCyscorpions-TechBlog
 
PDF
Redis Beyond
KLabCyscorpions-TechBlog
 
PDF
X-Debug in Php Storm
KLabCyscorpions-TechBlog
 
PDF
Software Testing
KLabCyscorpions-TechBlog
 
PDF
Php + MySql Optimization
KLabCyscorpions-TechBlog
 
PDF
Mysql Optimization
KLabCyscorpions-TechBlog
 
PDF
MVC Web Application
KLabCyscorpions-TechBlog
 
PDF
AfNetworking vs. Native + Caching
KLabCyscorpions-TechBlog
 
Object Calisthenics in Objective-C
KLabCyscorpions-TechBlog
 
Auto Layout on Xcode 5
KLabCyscorpions-TechBlog
 
Object Calisthenics
KLabCyscorpions-TechBlog
 
Why You're A Bad PHP Programmer
KLabCyscorpions-TechBlog
 
X-Debug in Php Storm
KLabCyscorpions-TechBlog
 
Software Testing
KLabCyscorpions-TechBlog
 
Php + MySql Optimization
KLabCyscorpions-TechBlog
 
Mysql Optimization
KLabCyscorpions-TechBlog
 
MVC Web Application
KLabCyscorpions-TechBlog
 
AfNetworking vs. Native + Caching
KLabCyscorpions-TechBlog
 

Recently uploaded (20)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
PPTX
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
PDF
Vietnam Street Food & QSR Market 2025-1.pdf
ssuserec8cd0
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
PPTX
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PDF
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
PDF
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
Vietnam Street Food & QSR Market 2025-1.pdf
ssuserec8cd0
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Controller Request and Response in Odoo18
Celine George
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 

Code Review for iOS