What you can do when code is really hard to review - Nicolas Carlo, Understand Legacy Code

This resource first appeared in issue #47 on 23 Oct 2020 and has tags Technical Leadership: Code Reviews

What you can do when code is really hard to review - Nicolas Carlo, Understand Legacy Code

One distinguishing feature of research software is that it’s often subtle. Subtlety combined with how often it is legacy code makes it difficult to follow, and makes changes doubly so. In this article Carlo describes some general principles for handling hard-to-review code changes, with the caveat that the hard to review changes are the ones that especially need review, both for QA purposes and for knowledge transfer:

  • Focus on Readability - it’s not good enough that the new code works. The new code has to be understandable enough to be changeable later.
  • Ask for Proofs - Test cases
  • Ask for Automated Proofs - Testing
  • Ask for Smaller Changes
  • Speed Things up with Synchronous Reviews - have the author walk through the code with you
<<<<<<< HEAD
======= >>>>>>> c1d069a... First pass at category pages