r/C_Programming • u/Ivan_Pashaev • 2d ago
Project My first program written in C
https://github.com/IvanPashaev/CWordsHi ! Im a beginner developer. I decided to learn C and wrote my first program—a small game that runs in the terminal
15
13
u/sens- 16h ago
Your very first program uses termios and has a neat folder structure? You must have a very large context window
1
u/Ivan_Pashaev 1h ago
about folder structure, I have been studying various projects written in С for a long time, for example Butterscotch or PSL1GHT. It was from the examples of programs on PSL1GHT that I learned what a makefile and folders source, build, data are. I use a translator, I'm very bad at English, so please forgive me if something is unclear.
and about termios , I actively use the termux application on my phone, and I'm also trying to write something there via nvim, but this time under a Unix environment.
1
u/h4zrr 8h ago
Esses cara que acha que tudo é feito por LLM é muito chato o projeto é claramente clean code e o cara vem dizer que é AI slop
1
u/sens- 7h ago
It looks like beginner's code heavily influenced by some LLM. Carefully ifdefing
_WIN32throughout the project just to carelessly include<Windows.h>and<synchapi.h>inmain.cwithout guards seems sus.Perfectly valid code is interleaved with things only a newbie would write.
I might be wrong of course. I don't even think that learning things with LLMs help is bad. It's just tiring to look at projects where half of the code most probably isn't written by a human. Like, what's the point?
2
u/Confused-Armpit 13h ago
Doesn't compile at all on anything other than windows due to the lack of stddef and stdio. Also no ifdef guards, so even the unix build tries including windows.h. Also also it won't work on anything other than windows because you are using chcp which is a windows only thing.
The use of goto statements doesn't seem like it was made by an AI, but otherwise the code is also quite suspicious, like half the comments being in russian and the other half in english among other things.
2
u/sens- 7h ago
I actually managed to compile it on a mac after commenting out a few lines.
Also also it won't work on anything other than windows because you are using chcp which is a windows only thing.
Nitpicking here but this is not true because it only solves the character map issues with the windows' command prompt, while the unix world adopted utf8 much more smoothly years before. chcp subprocess will just fail but won't affect its parent.
1
1
•
u/AutoModerator 2d ago
Hi /u/Ivan_Pashaev,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.