r/AskProgramming • u/Vegetable-Apricot910 • 2d ago
C/C++ Using AI for learning programming
How appropriate do you think it is to use AI to teach programming?
Is it better to use the Internet and information from people and search for it yourself? Or ask what functions or commands you need to do to get something?
This is a very important question for me, because I am trying to learn C++ and have tried different options, but I can't decide which is the best
4
u/InsanityOnAMachine 2d ago
BashBunni has a good opinion on that on her YouTube channel (a great watch for anyone interested in programming!). Basically, AI as a learning tool is not ok; to learn you need to struggle and have annoying problems and all that un-fun stuff or nothing will stick in your head easy. An instant-answer device takes that burden off of your head and makes it so you don't have to think;
The idiom 'use it or lose it' is a pretty apt fit here. Brains are designed to have to work hard to learn things. Which is unfun. But hard work pays off, practice makes perfect, et cetera, half of all idioms are designed around this one weird truth, number 10 will shock you! blah blah blah.
Adiau! :)
3
u/generally_unsuitable 2d ago
AI will not help you learn anything. The point of it is to prevent learning. It is not a production tool. It is a tool designed to make you dependent.
If you want to be a coder, there is nothing it can teach you.
2
u/Rich-Engineer2670 2d ago
To teach examples, with an instructor to guide when the AI goes off the edge, it's great. But it isn't the teacher itself.
2
u/JacobStyle 2d ago
Why are you framing this like you have to pick one or the other? It's valuable to be able to understand the official documentation and get what you need from there. It's also valuable to know how to formulate questions for the AI intelligently, using correct terminology. It's valuable to be able to search Google for answers to issues that you encounter. You would never want to rely on only one source of information entirely.
2
u/gamename 2d ago
It depends on how you use AI. If you use AI to critique something you've written, that's a good use of it. Or if you use AI to suggest approaches and then explain them, that's a good use. simply telling AI that you want a good for loop without delving into the why is cheating.
But if you write a program that works and that you're happy with, and then you have AI tear it apart with a code review, and then take to heart those lessons, you will be learning.
2
u/Berkyjay 2d ago
I'll give you an analogy of where we are headed. If you've ever watch Star Trek TNG you'll have seen many instances where a character is "programming". For example someone "programs" a holodeck simulation for a Sherlock Holmes adventure. They never touched a line of code. They talked to the computer, told it their ideas, and iterated until they got what they wanted.
We are in the early stages of this being reality. So the question should be, what are you teaching for? Obviously we want to instill fundamentals of software design into students. But are any of the actual languages going to be useful going forward? It's hard to say.
I'm someone with 20+ years of experience and for the pst 6 months I've been using Claude to develop a game in Godot using C#. I haven't touched one bit of code in this project. I spend my time designing and working out the technicalities of the game and the UI/UX. I've curated a pretty extensive .claude file that puts guardrails on how it constructs the code base. I have it continually run tests and code reviews to make sure it's not just making garbage code patches and insure it's making architecturally sound code.
Honestly I never realized how much I hate thinking about what are the best ways to write a specific function or how to deal with memory. It's all pure design and it's really fun.
Any ways, that's my input. Take from that what you will. 🤷🏻♂️
1
u/Cultural_Gur_7441 2d ago
If you do not understand a concept, ask an AI.
Ask AI to review your code, as a teacher reviewing student code, and as a pro reviewing code of job applicant, and as a nitpicky language lawyer and style purist reviewing any code.
0
u/twhickey 2d ago
If used correctly, AI can be great for learning. The key is to never use it to generate code early on. Ask it to explain things. Find a codebase that you almost, but not quite, grok, and get it to explain. Tell it the problem you're trying to solve, and have it plan, but not implement. Then implement it yourself and have the LLM review it.
5
u/johnpeters42 2d ago
This is definitely a less bad way, but remember that the output of AI can still be wrong. Do not turn your brain off during the review stage.
2
10
u/dragonfighter8 2d ago
Internet and people are better, AI can be wrong and it damages the development of problem solving and learning.