Lab code review!

aldrin312 - Sep 14 - - Dev Community

This is the first time I'll be reviewing codes other than my own. Should be a good learning experience for me and for the partner I have for this lab, Especially if I want to work on open source projects. To briefly explain my lab partner project, it is tool that allows interaction with ChatOpenAI through command line interface.

First impression

My first impression with his tool is that it is really well thought out of. Proper error handling, almost complete documentations on how to install the tool and run it without any issues and how to use it is relatively easy to understand.

Issues with partner's project:

  1. Doesn't show which one is the proper directory
    First issue I found is that in his readme file, it doesn't which directory I should be on to start the too. Though, it was easy to find out thanks to his video demonstration.

  2. Tool still prompt user for translation task without providing an api first
    Another issue is that when using the tool without providing an api still prompts the user to select for a translation task.

  3. Exceeding api's quota
    Lastly, the tool can exceed the quota limit for some api's, especially the ones that are free. If possible it may be good to have an option to lower the quota so that it can be used for these api's, maybe?

Overall

After review is project, I learned a lot of things from reviewing someone else's code. It shows a different approach to things that I may never think of. Having to see a different perspective on how to approach a problem is always a good thing because we tend to see things a certain way and that way may not be possible but by having seeing in it a different view, it is almost always makes it seems easy.

Issues with my project:

  1. Use JSDOCs where applicable.
    This was a great suggestion. I am planning to add multiple options for my tool so that it allows the user to select what kind of commenting method they want.

  2. Add instruction for another environment
    Currently I only have the instructions for windows. I need to learn how to make my projects works on other environment, like for macs and Linux systems.

  3. Add Error handling or check filepath before proceed readfile.
    For this one I forgot the check if the file that the tool is adding comments on is valid or not. This should be an easy fix. But this does made me think that the tool should also check if the file is in the right file format. Like for instance the file needs to end on .cpp, .js, .ts, etc.

My thoughts on my code being reviewed.

Having someone else read my code has been a good way get active feedback. Because there are things that I not think of that would be a great addition or finding issues that I didn't see before. It's like proof reading my work or having a second opinion. It provides me new insights on how to approach my project in a way that is less daunting that before.

. .
Terabox Video Player