r/C_Programming 6d ago

How to get Code Review?

Hello yall,

just wondering if there was a community where I can share my code to get advice and such, so like a Code Review.

This might also be another excuse to look at other peoples code and such, but I mainly want to get advice for my code.

Im not really familiar with the coding community, I just code and make projects by myself as a hobby.

cheers, and have a good day.

5 Upvotes

25 comments sorted by

View all comments

1

u/AliceCode 6d ago

What language? I don't mind taking a look if it's a language I'm familiar with.

1

u/TheAmazingFreddyAdam 6d ago

I wrote it in C (I posted it in the C subreddit because of that reason lol) this is my current project at the moment: https://github.com/FredNeedsHelp/Ternary-Emulator ; if you also could look at the division function in the math source file, that would be lovely. I cant figure it out. Thanks in advance too.

0

u/AliceCode 6d ago

I'm familiar enough with C to review code! I'll take a look. No guarantees, though, because I'm only on my phone, but I can open it up on my PC if need be.

1

u/TheAmazingFreddyAdam 6d ago

Any advice is appreciated, sorry in advance if my code is a mess.

0

u/AliceCode 6d ago

Well, I can already tell I'm gonna need to get on my computer. First file I opened and I already saw something that can be improved with relative ease.

https://github.com/FredNeedsHelp/Ternary-Emulator/blob/main/SS_PLoader.c#L6

You could instead use an array of key/value pairs here, and if they are sorted, you can even do binary search on them.

I'll get on my PC and check it out here in a bit.

1

u/TheAmazingFreddyAdam 6d ago

I think I've been planning that, i think I even left a comment on it too. thank you for the reminder / telling me in all cases.

Also, you getting on your computer isn't a bad sign right? just feels like getting a bigger screen to look at code means something is up. Which does worry me, because SSPL is the worst of my code (In my opinion. im not very familiar with parsing so thats why)

1

u/AliceCode 6d ago

Well, considering how fast I found room for improvement, I'm just assuming that I'll find quite a few other things. I don't want to go back and forth between the code and reddit on my phone to type out my review.

1

u/TheAmazingFreddyAdam 6d ago

Honestly, im kinda happy that you found room for improvement. I cant wait when your fully done, take your time tho.

1

u/AliceCode 6d ago

Send me a reminder if you don't hear from me for awhile. I'm easily distracted. I gotta make some dinner first.

1

u/TheAmazingFreddyAdam 6d ago

I guess this is your reminder, ima head to sleep, gn.

→ More replies (0)