DEV Community

Cover image for Issue 0.1
fadingNA
fadingNA

Posted on

Issue 0.1

For today blog, I will elaborate about the issue that we found with contributor Thanks to Harshil for contribute in this project chatminal!

First issue:

Image description

The current implementation of “chatminal” sets the default model to “gpt-4o.” While “gpt-4o” is a powerful model, it comes with a only paid option that is truly sad for developer if it 2023 back then OpenAI may offer some free model for research or test purposed.

This blocked for many users who may not have access to a subscription or paid API usage. To ensure that “chatminal” remains accessible and useful for a wider audience, we propose changing the default model to “gpt-3.5-turbo,” a free alternative provided by OpenAI but still gpt-3.5-turbo still have to use Paid API Key as pay-as-you-use.

How did you go about doing your code reviews? Do you prefer an async or sync approach? Why?

Second Issue:

-o flag not working for output file, but --output works #2

Image description

Another issue discovered was with the -o flag, which is intended to specify the output file when provided. The problem was that the -o flag was not functioning as expected, while the --output flag worked correctly. Moreover, the set of condition in the algorithm have wrong using paramter output instead of output_file.

Upon further investigation, it was found that the incorrect variable was being checked in the code. The variable output was used instead of output_file. This small mistake caused the program to ignore the -o flag and default to other behaviors.

Testing and Reviewing

  • Testing and reviewing someone else code was like trying to understand what programmer is thinking and how they code can tell a lot with thinking process.

  • Sometimes, I not even understand why certain pieces were put where they were. I found mistakes that needed fixing, like using the if condition for logging to produce corrective of error to the user. It surprised me how a small change could make the whole program work better. Even though it was tricky, it felt good to help make the code better for everyone and it actually my first time to do code review and fix it.

All the Issues Fixed!

I have fixed all the issues by going through them one by one and testing each one. I encountered the same errors that the contributor did, so I thoroughly debugged the code to understand why the errors occurred. Some issues were caused by using the wrong parameters or incorrect logical argument validation. I identified these mistakes and fixed them all.

Someone Review our code

  • The code reviewer is a good approach to improve in developing applications or coding skills because the reviewer can detect the missing spots that the developer may have missed. Additionally, they can provide valuable feedback on coding practices, suggest optimizations, and help identify potential bugs before they become bigger problems. Code reviews also encourage learning and knowledge sharing among team members, fostering a collaborative and growth-oriented environment. This process ultimately leads to better, more efficient code and helps developers to think critically about their own work.

  • The most important is cross-environment sometime the application working well with macOs but maynot work well with Window the that we have to have tester to test across environment make sure work flawless.

Issues I Opened for Improvement

Issues

First, I suggested enabling streaming to provide a better response experience for users receiving the completion. Secondly, I recommended adding another argument, --models, to list all available models so that users can easily switch and test them. Thirdly, I noticed some inconsistencies in the use of stdout and stderr and pointed them out.

Summary what I have learnt

This experience taught me what it feels like to work on an open-source project. I learned that we can contribute and explore different source codes and applications. We get to be a part of the project, see how other people code, and maybe pick up some tricks to become more efficient and better coders. It showed me the importance of learning from others and being open to new ideas.

Overall, it was an enlightening journey that taught me the value of community, open knowledge sharing, and continuous improvement in software development.

Top comments (0)