DEV Community

Cover image for The AI pitfall while learning C
Jemma
Jemma

Posted on

The AI pitfall while learning C

I’m currently learning C programming, and I’m going to be completely transparent and say that I’ve been struggling to stick to the recommended timeline. The coursework states that some of the projects should only take 1.5 hours. Me? Two months later, finally figuring it out.
The project I’m specifically referring to required creating a program that played poker. You give it two hands of cards, then it figures out the ranking of each hand, compares them, and decides which hand wins.
Another confession—and one I’m ashamed to say: in moments of desperation, I pasted my code into AI (Chat365 Copilot) and asked what was wrong with my program. I found this quite useful for smaller syntax errors and logic issues around edge cases, but it was also a huge pitfall for me, and I’ll tell you why.
AI is not always correct. It introduces syntax, library functions, and concepts that I haven’t covered yet in my course and don’t yet understand, and it doesn’t register the assumptions that are part of the course assignment. This led to countless arguments (and so much wasted time) with AI about what it was getting wrong, what the assumptions were, and what I should use versus what I should ignore from the AI-generated output.
I also found that copy-pasting snippets of AI-generated code into my program would fix some issues but create others. Then, because some of the code was outside my understanding, debugging was impossible. I ended up removing all the AI-generated code and redoing the project from scratch on my own—again. This was a journey, and I honestly don’t know who could do it in 1.5 hours, but they must be a genius!
I came to the conclusion that AI has its place and can be quite handy for jogging one’s memory, hinting at edge cases, or clarifying syntax. However, when it comes to the bulk of a project (especially when studying) I need to do the hard yards and take the time to figure things out on my own. It’s slow going, but the learning sticks and actually saves time in the long run.

Top comments (0)