Replies: 1 comment
-
Some learnings and notes from the Open Science event - Research Code reviews:Offering central code reviews as a "service or product" is risky and some things should be considered:Code reviews in the context of science can be difficult without (domain) context, as a lot of code is in an early stage where code structure is not a priority. Therefore reviewing code in the early phase requires a lot of context considerations. In this scenario, we have several options and considerations Is the reviewer relatively experienced with the domain? Can the reviewer easily understand what the code should do? If no, what can we do: We can focus first on reproducibility (without being able to judge the correctness of the code). We can deploy an iterative process of reusing and reproducing the code. Look for code smells without and higher levels at modules and functions levels, then go deeper only if necessary. (These is all documented above) The determinant factor is time, effort and human resourcesThere is a general agreement that code reviews and better code quality is desired, but is more a question of putting effort and time than agreeing on the fact that it should be done. Different types of code reviews (purpose is very important)For instance, one participant mentioned, "I always start by asking what the code does". Code reviews are a mechanism to learn best practices in a community and peer to peer approachEncouraging people to do code Implications for our services
|
Beta Was this translation helpful? Give feedback.
-
Draft for a guide to conduct codebase review
Background and considerations
As part of our support activities, we constantly have to review research code in what way or another. Reviewing a research codebase implies reviewing the documentation of the code and the quality of the code. Documentation may include not just readmes but also how the code is commented and even written.
We are at the moment discussing and framing how to conduct code reviews, or some kind of checklist to approach code bases done by others in a systematic fashion. At the moment issues related to time, preparation or how in depth it should be are not clarified.
The guide is meant for people that have been asked to do some code base peer review
We have started drafting this for the core DCC team of DMs and RSEs but we forsee that others can also benefit from this guide.
Who can conduct code reviews?
Code reviews can be conducted by anyone that has an intermediate level of programming (Knows abotu refactoring techniques, unit testing, documentation, etc.).
Proposed approach
Premises:
Assumptions about the audience
Activities:
Continue to code review
Code refactoring
Pre Release or release preparation and setup
References:
Please let us know if you have other thoughts, references, suggestions, or feedback.
Beta Was this translation helpful? Give feedback.
All reactions