Code Review as a Simple Trick to Enhance Reproducibility, Accelerate Learning, and Improve the Quality of Your Team's Research

Am J Epidemiol. 2021 Apr 8:kwab092. doi: 10.1093/aje/kwab092. Online ahead of print.ABSTRACTProgramming for data wrangling and statistical analysis is an essential technical tool of modern Epidemiology, yet many Epidemiologists receive limited formal training in strategies to optimize the quality of our code. In complex projects, coding mistakes are easy to make, even for skilled practitioners. Such mistakes can lead to invalid research claims that reduce the credibility of the field. Code review is a straightforward technique used by the software industry to reduce the likelihood of coding bugs. The systematic implementation of code review in epidemiologic research projects could not only improve science, but also decrease stress, accelerate learning, contribute to team building, and codify best practices. In this paper, we argue for the importance of code review and provide some recommendations for successful implementation: [1] for the research lab, [2] for the code author (the initial programmer), and [3] for the code reviewer. We outline a feasible implementation of code review, though other successful implementations are possible to accommodate the resources and workflow of different research groups, including other practices to improve code quality. Code review isn't always glamorous, but it is critically important for science and reproducibility. Humans are fallible; that's why we need code review.PMID:33834188 | DOI:10.1093/aje/kwab092
Source: Am J Epidemiol - Category: Epidemiology Authors: Source Type: research