Code can be written by several developers in a large project. This adds developer power to the software project (which does not necessarily increase the productivity; Brooks Jr et al., 1995) More developers might allow practices that can increase software quality.
Pair programming refers to practices having two developers working on the same code at the same time. One of them, the driver, is responsible for writing the code. The other one, the observer, examines the code, provides comments and feedback and can consider the wider context and its design. The roles change during the development process. This allows teams to bring different experiences, thus improving the knowhow available. In a multidisciplinary setting, this could refer to skills in social sciences and in computer sciences. This also allows the observer to focus on the wider, more strategic choices about software development or focus on the research question and how it should be translated into code. Furthermore, this means that there is a second pair of eyes checking the code. Because of these elements, pair programming has been shown to have a small positive effect on improving software quality; however, these depend on the difficulty of the task and experience of the developers. Pair programming is particularly effective when task complexity is high and correctness is an important value (Hannay et al., 2009).
Code review refers to externals going through the code when it is ready, often when it is being merged with other code in the repository. There are several aims, including improving code quality, finding bugs, sharing knowledge and examining alternative solutions (Hannay et al., 2009). The reviewer seeks to provide feedback on aspects such as code style and smells in the code. Often, code review is recommended as a continuous practice, taking place with small incremental changes. Code review can even be a requirement before the changes are merged with the repository. There are tools that help in the code review process; for example, GitHub has extensive support in place. Code review can also take place in one go (which requires more time), such as before running the code on a large data set in high-performance clusters.