Code Review Overview


Why Do Code Review?

Code review is the process of having your code read by another programmer (or yourself; or better, in pairs) in order to:

Not only do we want to catch any bugs in code, but code review aims to make sure that there is a standard set of rules for code that you want to uphold within a lab, or collaborative group, allowing for consistent and higher quality code.

Ideally you would want there to be good communication about what the standards are, and whether they are being met throughout the entire process from conception of the idea to the finished code. This involves sitting down and thinking carefully about the design of the project, and defining the standards of the code along with frequent code review as it is being written.

If you often pair up to review eachother’s code, you learn new tips and tricks, and you may find alternative approaches to the same task, and also to write a coherent script pipeline. This is particularly important if you each code different parts of the project.

Many studies have found code review to be effective not only to improve the code, but for knowledge transfer and team awareness (see here and here for examples).

Tips on Conducting Code Review

Ways to Code Review

Review using Github

Code review is of course built on good version control. So, by now, you probably use Github (Gitlab) or other resources to do version control and share the work with collaborators. You can furthere utilize Github for reviewing each other’s code. Using Github, the code review happens between the first pull request by the original author, before it is merged:

Resources

https://mozillascience.github.io/codeReview/intro.html (and other links therein)
https://blog.fogcreek.com/effective-code-reviews-9-tips-from-a-converted-skeptic/

https://the-turing-way.netlify.com/reviewing/reviewing.html