An Interest In:
Web News this Week
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
Doing code review
After finishing my static site generation program, I partnered up with Oliver Pham so that we could both review each other's code.
Issues with my code:
A list of issues can be viewed here.
My program was not perfect in many ways, I expected it to have some flaws which turned out to be true.
The issues weren't severed, the program still functioned fine, but the HTML files generated had quite a few HTML markdown errors and the help
command didn't print enough information. After some discussions, Oliver managed to fixed those issues easily, he also caused a bug but quickly patched it up.
My contribution to my partner's code
You can take a look at its issues here
I was excited to look at his Python code for the same program which is a language I haven't tried. Luckily, Python is not a hard language to jump into and his code was readable.
The first by I found was that his program couldn't open files encoded in utf-8
because Windows' default is Windows-1252
.
The second bug was caused by the input path having the current path, ex: ./file.txt
, the program couldn't parse the title from such file path.
Lastly, one of his functions that parses title from the text file(s) was a bit confusing so I shortened it using some regular expressions.
Conclusion:
This activity actually gave me more joy and more experience collaborating, I thought it was gonna hard as I was giving away my code for another person to criticize.
In the end, it motivated me to test his program with a view to returning his help finding fault in my program, I wouldn't have this experience doing solo. Also, getting to actually use Github, making pull requests, talking to other devs, learning more about Python are valuable lessons to me.
Original Link: https://dev.to/tuenguyen2911_67/doing-code-review-pg7
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To