I happen to be working reviewing a student’s code right now, prior to submitting the associated manuscript for peer review.
- I meet with my students one-on-one on a weekly basis and occasionally do some informal code review, mostly to check on correctness and style. Usually more often for a new student, and less frequently for those who I can trust will produce decent code.
- As the project progresses, I examine code outputs and apply some sanity checks (“toy” examples, examining plots).
- For larger projects, I require students to write a suite of unit tests, which are sometimes helpful for shaking out bugs. (Writing unit tests also makes busy work for short-term students, e.g., summer volunteers.)
- At the present stage (pre-submission), I am rerunning the analysis to confirm that I can reproduce the outputs on my own workstation.
- Presently, I am going through the student’s code and refactoring some sections, particularly the portions that were written near the end of term. As a reviewer, I usually look through any source code that accompanies the manuscript, and I want the level of code quality in our paper to reflect well (at least not too poorly!) on my group.