r/cprogramming • u/Spinning_Rings • Aug 07 '26
Code review request -- any criticisms or advice?
Would anyone mind reviewing some code? I wrote a CLI to help me generate character sheets for a TTRPG I'm running. The main thing I want to know is: should this be considered safe enough for me to share with other GMs? Is there anything else I should do for safety, security or efficiency? I worked hard on it, and Gemini Pro told me it's safe, but while I understand it can be useful I don't trust the automatic misinformation generator, since I don't have the requisite knowledge base to tell when it's "hallucinating" (or else I wouldn't need it for this purpose)
The github repo is here: https://github.com/SpinningRings/DigidiceCharacterSheetGenerator
1
u/Eidolon_2003 Aug 07 '26
Why are there what looks like two slightly different copies of the same program in that one file?
1
u/zhivago Aug 08 '26
First rewrite it as a library with main being a minimal driver.
Then add tests.
As you do this you'll be forced to make a better api with appropriate abstraction.
1
u/[deleted] Aug 08 '26
[removed] — view removed comment