Reviewing Code in a Class Repo
Tags: opensource
Published: 2021-11-19 18:28:26

## Intro

In [another post](https://dev.to/lyu4321/contributing-to-a-class-repo-3one), I talked about contributing to a [course website repository](https://github.com/Seneca-ICTOER/IPC144) 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](https://github.com/Seneca-ICTOER/IPC144/pull/72)

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](https://github.com/Seneca-ICTOER/IPC144/pull/75)

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

![String Library Sidebar Before](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0ybsra9oihhyo2er33e.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rmewsp0v20kmljst7b1b.png)

## [Review #3](https://github.com/Seneca-ICTOER/IPC144/pull/78)

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:

```yml
---
sidebar_position: 1
---
```

The Frontmatter now looks like:

```yml
---
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.
---
```

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7untxwnnpxqlpwuzxtzt.png)

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.