Code Review as a Simple Trick to Enhance Reproducibility, Accelerate Learning, and Improve the Quality of Your Team's Research
- PMID: 33834188
- DOI: 10.1093/aje/kwab092
Code Review as a Simple Trick to Enhance Reproducibility, Accelerate Learning, and Improve the Quality of Your Team's Research
Abstract
Programming 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 the present article, we argue for the importance of code review and provide some recommendations for successful implementation for 1) the research laboratory, 2) the code author (the initial programmer), and 3) the code reviewer. We outline a feasible strategy for implementation of code review, though other successful implementation processes are possible to accommodate the resources and workflows 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.
Keywords: code review; implementation; learning; reproducibility crisis; team building.
© The Author(s) 2021. Published by Oxford University Press on behalf of the Johns Hopkins Bloomberg School of Public Health. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com.
Comment in
-
Invited Commentary: Code Review-An Important Step Toward Reproducible Research.Am J Epidemiol. 2021 Oct 1;190(10):2178-2179. doi: 10.1093/aje/kwab090. Am J Epidemiol. 2021. PMID: 33834182
-
Vable et al. Respond to "Code Review-A Step Toward Reproducibility".Am J Epidemiol. 2021 Oct 1;190(10):2180. doi: 10.1093/aje/kwab091. Am J Epidemiol. 2021. PMID: 33834195 No abstract available.
Similar articles
-
The future of Cochrane Neonatal.Early Hum Dev. 2020 Nov;150:105191. doi: 10.1016/j.earlhumdev.2020.105191. Epub 2020 Sep 12. Early Hum Dev. 2020. PMID: 33036834
-
Opportunities for Epidemiologists in Implementation Science: A Primer.Am J Epidemiol. 2018 May 1;187(5):899-910. doi: 10.1093/aje/kwx323. Am J Epidemiol. 2018. PMID: 29036569 Free PMC article.
-
Implementing code review in the scientific workflow: Insights from ecology and evolutionary biology.J Evol Biol. 2023 Oct;36(10):1347-1356. doi: 10.1111/jeb.14230. J Evol Biol. 2023. PMID: 37812156
-
Effect of formal statistical significance on the credibility of observational associations.Am J Epidemiol. 2008 Aug 15;168(4):374-83; discussion 384-90. doi: 10.1093/aje/kwn156. Epub 2008 Jul 8. Am J Epidemiol. 2008. PMID: 18611956 Review.
-
Avoiding and identifying errors in health technology assessment models: qualitative study and methodological review.Health Technol Assess. 2010 May;14(25):iii-iv, ix-xii, 1-107. doi: 10.3310/hta14250. Health Technol Assess. 2010. PMID: 20501062 Review.
Cited by
-
Comparing two measures of neighborhood quality and internalizing and externalizing behaviors in the adolescent brain cognitive development study.Soc Psychiatry Psychiatr Epidemiol. 2024 Feb 2. doi: 10.1007/s00127-024-02614-4. Online ahead of print. Soc Psychiatry Psychiatr Epidemiol. 2024. PMID: 38305870
-
Food Insecurity, Memory, and Dementia Among US Adults Aged 50 Years and Older.JAMA Netw Open. 2023 Nov 1;6(11):e2344186. doi: 10.1001/jamanetworkopen.2023.44186. JAMA Netw Open. 2023. PMID: 37988079 Free PMC article.
-
OpenPBTA: The Open Pediatric Brain Tumor Atlas.Cell Genom. 2023 May 31;3(7):100340. doi: 10.1016/j.xgen.2023.100340. eCollection 2023 Jul 12. Cell Genom. 2023. PMID: 37492101 Free PMC article.
-
A guide for researchers seeking training in retrospective data harmonization for population neuroscience studies of Alzheimer's disease and related dementias.Front Neuroimaging. 2022;1:978350. doi: 10.3389/fnimg.2022.978350. Epub 2022 Sep 26. Front Neuroimaging. 2022. PMID: 37464990 Free PMC article.
-
Early pregnancy phthalates and replacements in relation to fetal growth: The human placenta and phthalates study.Environ Res. 2023 Jul 15;229:115975. doi: 10.1016/j.envres.2023.115975. Epub 2023 Apr 23. Environ Res. 2023. PMID: 37094650
MeSH terms
LinkOut - more resources
Full Text Sources
Other Literature Sources
