r/C_Programming • u/E-Vex • Jun 28 '26
HOW?
I am not English native speaker so sorry for my language
I am an IT student and before few months I started learn C language and low level programming but my way of learning it by using AI
and after I feel comfortable with the pointers and understand how things really work I started a project its a packet analyzer
its a project to learn not a perfect thing it is my first real project so I decided to share my work here in r/C_Programming community so I was shocked that people say 'AI-slop' or something like that
but my project is too bad to have been written by AI I document everything on GitHub and in a YouTube streams
It was my mistake that I used AI to write the post because I was afraid of failing to write raw English without revision because my English level is not high
how I should learn? can someone help me please?
View all comments
Show parent comment
3
u/mikeblas Jun 28 '26
I think that last paragraph is the teachable moment. I don't have the code handy, but the way I remember it was that
main()was moving around in the file, and then callingsome_function()which expected to read at the start of the file.Well,
some_function()is expecting to be at the start of the file, then why doesn't it document and enforce it withassert(ftell() == 0)at the beginning? Maybe I don't have it totally right, maybe that function is meant to be at the start of a packet. There could be a way to implement a similar mathematical assertion to identify the start of a packet, or that there are 0 bytes remaining from the previous packet, or ...Anyway, this could be a chance to learn about
assert().