DEV Community

Krinskumar Vaghasia
Krinskumar Vaghasia

Posted on

Peer Code Review

For today's blog post, I'll talk about my experience doing a code review for one of my classmates ๐Ÿ‘จโ€๐Ÿ’ป. I paired up with Rong for this exercise. The command-line tool I reviewed was called Code Formatter Advisor, which uses Groq to analyze code and provide formatting improvements. This tool is quite versatile and works with most programming languages ๐Ÿ› ๏ธ.

After playing with the tool for a bit, I felt it worked amazingly ๐Ÿ‘. I couldnโ€™t find any bugs, and all the improvements to my code were made seamlessly. The code was well formatted and easy to understand, which is essential for open source projects. However, with a few minor enhancements, this tool could reach a level of perfection that would make it a great addition to my daily development workflow ๐Ÿš€.

Some Thoughts:

  1. Minor Nitpick: Right now, the tool displays the full message returned from the LLM, which includes additional text along with the enhanced code. Iโ€™d love to see a flag that modifies the prompt so only the enhanced code is returned and automatically updates the file ๐Ÿ“„. This would save users from manually copying and pasting the new code into their original file. Not a major issue, but it would definitely make life easier ๐Ÿ™Œ.

  2. Major Nitpick: To run the advisor, we currently execute a Python file, as mentioned in the README ๐Ÿ. However, most command-line tools are triggered by their name, hiding the underlying technology. Setting up an alias for this is pretty straightforward and doesnโ€™t require any changes to the original code. The only thing that needs updating is the README file ๐Ÿ“˜.

Lastly, I attempted to run the tool on the same file it was operating on. Interestingly, it performed as expected, though it felt a bit unusualโ€”almost like an LLM improving its own API call ๐Ÿค–โœจ.

Top comments (0)