Code Review is a systematic examination (often as peer review) of computer source code intended to find and fix mistakes that are overlooked in the initial development phase.
This presentation on Code Review is prepared by Shiva Bhusal. He is a senior Ruby on Rails developer at Jyaasa Technologies.
3. Introduction
- A systematic examination (often as peer review) of computer source code
- It is intended to find and fix mistakes overlooked in the initial
development phase
- Results high quality software along with enhanced developer skills
4. Why do we even need this??
- we always need others to find our problems
- Other’s verification is good thing to have
5. Advantages
- finds bugs that developer might have left
- get suggestion for more better idea to solve problem
- get remainder for missing edge cases
- get suggestion for industry best practices
- get review on code’s readability
- Gives you ideas about what's happening in other modules
- Very useful while mentoring junior developers
6. Automated Code reviews
Cloud based Code reviewing platforms
- CodeClimate (Only CLI Is opensource)
- http://phabricator.org/ (OpenSource)
Local:
- Rubocup
- Integrating Static Code-analyzer with IDE
- Docker based Codeclimate CLI
7. Things to be considered
Review fewer than 200-400 lines of code at a time
Make sure you always break your task efficiently
You can only suggest
You can comment even when you are unknown to some language
constructs
9. Tracking Status Of Code-Review
- If code reviewed?
- If code ok?
- Comment :+1: →
- else
- comment what is the issue with the code
- Comment if there is better alternative
- Comment even if you have no idea what that code does?
- Comment if the code is compromising the readability/simplicity
- If comments in code-review responded?
- Comment :ok: →
Note:
- Nobody merges his own code;
- If possible make other developer test your work
10. Disadvantage
- It takes time to review the code
- Even more time to respond to the code-review comments