Code reviews

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the collaboration category.

Last Updated: 2024-04-23

Each section is ranked by importance, with the most important first

1. API semantics

2. Implementation

3. Documentation

Does the UX explain the feature to the user? Are API docs updated? Are docs understandable (typos/grammar)? Is the README updated? Are there code comments as needed?

Bad documentation repeats what the code says. Good documentation supplies the contains the context that is missing from the code.

4. Testing

Are there appropriate tests added?

5. Formatting

Does it follow code guidelines? Watch out for later commits added after initial review.

Reinstall dependencies if there is an issue

When doing a code review for M, his tests failed on my machine and I wrongly told him the code was failing tests. The issue was that I did not install the latest packages. This was silly of me. I should always install them first if tests fail.

The same can apply for similar commands - e.g. to refresh cache data etc.

Make sure language updates match code changes

If a PR changes something like ratings being in the last year to ratings being all time, then check that the language in the markup is reflected to update it.