Department of Psychology and eScience Institute, University of Washington, Seattle, Washington, United States of America.
PLoS Comput Biol. 2024 Sep 5;20(9):e1012375. doi: 10.1371/journal.pcbi.1012375. eCollection 2024 Sep.
As large, high-dimensional data have become more common, software development is playing an increasingly important role in research across many different fields. This creates a need to adopt software engineering practices in research settings. Code review is the engineering practice of giving and receiving detailed feedback on a computer program. Consistent and continuous examination of the evolution of computer programs by others has been shown to be beneficial, especially when reviewers are familiar with the technical aspects of the software and also when they possess relevant domain expertise. The rules described in the present article provide information about the why, when, and how of code review. They provide the motivation for continual code reviews as a natural part of a rigorous research program. They provide practical guidelines for conducting review of code both in person, as a "lab meeting for code," as well as asynchronously, using industry-standard online tools. A set of guidelines is provided for the nitty-gritty details of code review, as well as for the etiquette of such a review. Both the technical and the social aspects of code review are covered to provide the reader with a comprehensive approach that facilitates an effective, enjoyable, and educational approach to code review.
随着大型、高维数据变得越来越常见,软件开发在许多不同领域的研究中发挥着越来越重要的作用。这就需要在研究环境中采用软件工程实践。代码审查是一种工程实践,即对计算机程序进行详细的反馈。事实证明,由他人对计算机程序的演变进行一致和持续的检查是有益的,特别是当审查者熟悉软件的技术方面,并且具有相关的领域专业知识时。本文中描述的规则提供了有关代码审查的原因、时间和方式的信息。它们为将持续的代码审查作为严格研究计划的自然组成部分提供了动力。它们为面对面的代码审查(例如“代码实验室会议”)以及使用行业标准的在线工具进行异步审查提供了实用的指导方针。本文还提供了一套有关代码审查的细节和审查礼仪的准则。涵盖了代码审查的技术和社会方面,为读者提供了一种全面的方法,有助于实现有效、愉快和具有教育意义的代码审查。