DEV Community

Leyang Yu
Leyang Yu

Posted on

Reviewing Code in a Class Repo

Intro

In another post, I talked about contributing to a course website repository for a course at my school. I audited and fixed a markdown page and received a lot of great feedback and reviews from my classmates. In this post, I would like to talk about my experience reviewing other pull requests in the same repository.

Review #1

This pull request looked really good and there were not a lot of things to fix. However, I did find some small typos, which I mentioned to the author.

For example "We store the SKUs" instead of skus and "[...] the algorithm picks [...] and swaps the values [...]" instead of swap.

Review #2

This pull request was really good as well, but one thing I noticed right away was the sidebar:

String Library Sidebar Before

The String Functions section describes the functions that will be explained later, including String Length, String Copy, String Compare, and String Concatenate. However, all five of these sections had the same heading level. I suggested that perhaps the latter four section headers could be one level down since they were subsections of the larger String Functions section. The author agreed with my suggestion and changed the headings from second to third level so that the sidebar now looks like:

String Library Sidebar After

Review #3

In the last code review I did, I made a few suggestions to the author. First was the Frontmatter, which initially only included the navbar/sidebar position. I suggested adding more details to the Frontmatter, such as id, title, slug, and description.

Instead of:

---
sidebar_position: 1
---
Enter fullscreen mode Exit fullscreen mode

The Frontmatter now looks like:

--------
id: computers
title: Computers
sidebar_position: 1
slug: /introduction/computers
description: This chapter will teach you about the major components of a modern computer and the software that controls them.
--------
Enter fullscreen mode Exit fullscreen mode

I also suggested adding some intra-site links where it may be useful to users as well as adding descriptive text to links. For example, the first paragraph of the page mentions algorithms and libraries, which are other pages on the site. After adding links and descriptive text, it now looks like:

Algorithms and Libraries

Which is useful if a user wants more information about related topics.

Finally, I also found a couple of typos which I mentioned and these were fixed as well.

Conclusion

As I mentioned in my previous post about contributing to this repository, it was great to work on these issues as an open source community. I learned a lot from reviewing other people's code and it was interesting to see the different ways in which everyone approached similar tasks. Overall, I hope these reviews will help improve the quality of the code and create a better and more consistent website.

Top comments (0)