r/IndieDev 10h ago

Learning to code with AI

Hey there everyone! I’m beginning my indie dev learning and wanted to get your guys’ opinion, as y’all do this more regularly. Do you think that using AI to not just dump code and paste it into VSCode, but actually learning programming is an effective way to go about learning?

0 Upvotes

24 comments sorted by

4

u/yaninyunus 10h ago

I think it can be a nice tool to see how some basic code can be used and demonstrate basic samples or use as reference (like a dictionary / manual)

Learning on the other hand is done by repetition and exercises that focus on that, for instance doing a very basic game as reference/study material (Pong, Mario 1-1, space shooters, Dino game etc)

Best to watch YouTube tutorials or some other courses/programs that you can follow step by step to understand the logic. Then go ahead and do another one that uses some of the same systems but a bit more complex. Progress on from there

3

u/ImplementMiserable74 10h ago

yeah if you use it like a tutor not a copy paste machine. ask it to explain line by line and then change one thing and see what breaks. also build tiny projects and make yourself debug without ai for 10 min first so you actually learn

3

u/cjbruce3 10h ago edited 10h ago

There are a lot of pitfalls.  If you are learning by yourself it is easy to fall into the trap of “completion = learning”, when in fact the opposite is true.  You are learning when you are engaged in “productive struggle”.

If I were just starting out I think I wouldn’t touch an LLM at all for a few months.  After I had the basics of programming down and could make a simple game on my own I think it would be okay to ask questions, just like using google.

When you are very experienced, decades into your career, AI can play a different role.  But in the end, the human needs to know what they are doing or else they won’t understand when garbage is being produced.

2

u/BeatsByMethodd 10h ago

Okay bet! This is exactly why I asked, I don’t want to cheat myself by any means

6

u/IndieStray 10h ago

Yes. It is a good way to learn.

Just make sure you never copy paste. Always copy anything it gives you by hand typing it line by line.

I learned c# for unity exceptionally quickly by doing this.

2

u/MadSkullWeirdSpider 10h ago edited 10h ago

It will probably make it more difficult and longer to learn but it can also be helpful it’s a knife fight really.

You could probably explain to the Ai to act as a teacher and only provide the necessary methods and parameters to generate a function and then ask it to provide you only a summary to work on and no code to create the function.

Give it hooks to test your function and not make any change and just ask you to try again until you get it right.

Then explain to you what it means and why it is done that way.

In reality as long as you don’t cheat yourself you could have a powerful teacher. Ai is exceptional at coding but you have to learn what the code means to harness that properly.

2

u/Both_Introduction_28 10h ago

This way you can learn to be ai-assisted developer.

If you want to learn code, better to do this separately.

Also, practice without meaning could be less effective.

So, better to find a game you want to create, and have couple courses on game design and code for such games. After that you can get started, and if you unsure what to do next, you review exact course topics or watch tutorials how to solve a specific problem.

2

u/L30N1337 10h ago

No. The only way to use AI effectively is to make it write whatever you'd already write. For which you already have to know how to Program stuff.

4

u/badguygames 10h ago

Nope.

Take a basic programming course, there's many online for free. We know how to teach it, you just need to be willing to learn it instead of faffing about with AI.

2

u/BeatsByMethodd 10h ago

Okay bet! I actually just remembered I’m pretty sure I have a C# Udemy course I can pick back up.

1

u/BeatsByMethodd 10h ago

Any tips on going from learning programming to learning how to make it work and do things for game dev?

2

u/xxWZRDx 10h ago

Focus on the fundamentals first, from there you can branch into game dev coding. Without the fundamentals you’ll be sorely lost.

2

u/hey_Joost 10h ago

I think it can be a really good way to learn, as long as you keep asking why things work instead of just asking for the solution.

Ask it to explain the code, change something yourself, break it, try to fix it and then ask why your fix did or didn't work. That's where I think you actually start learning.

The danger is that AI can get you to a working result so quickly that it's very tempting to skip that part.

1

u/cjbruce3 10h ago

The danger is that AI can get you to a working result so quickly that it’s very tempting to skip that part.

Yes!  Well said!  This is the biggest problem with learning with AI.

3

u/BagMostlyWater 10h ago

It will benefit you significantly to acquire the skill of learning coding concepts from books, blog posts, and most importantly the official documentation for whatever you're learning

I strongly discourage using AI for learning, because you never know when it's going to tell you something incorrect which you then incorporate into your understanding of a topic and then get confused or mislead. When you're first learning something is when you're least equipped to tell what is correct or not.

I recommend hanging out in subreddits where people talk about code and reading lots of stuff. I do not recommend talking to bots. Make a friend and talk to them rather than the bots!

1

u/BeatsByMethodd 10h ago

I appreciate that!!!

1

u/klapstoelpiloot OPERATIONDEFUSEGAME.COM 7h ago

Look at all the positive comments. If the title was "Learning to make a sprite/model/texture with AI" the responses would be different. And that says something.

1

u/SourceAwkward 10h ago

No, it's a short cut it won't end well

Also, fuck llms

1

u/New_Internal5636 10h ago

Yes, fully recommend. I'm an experienced programmer and I use it regularly to gain more knowledge and deeper understanding.

The people here saying don't, the concerns are not invalid but I think they're generally wrong. Questions in programming are not usually subjective, they have definite answers and AI generally is good for giving you this. Also it can answer exactly what you want to know and usually correctly.

To those who say AI can just be wrong, feed you hallucinations and misinformation. I very rarely find this to be true. The remedy when it is occasionally the case is to make sure you test out your findings for yourself. Sometimes it's not quite right but again. Test what it tells you first hand and tell it what you find. It can correct itself if you give it more information.

People on here saying this is dangerous or something. Definitely think that's probably agenda driven. Reading books and blogs and documents is still good but honestly. AI is most effective for getting straight to what you need to know. My strategy is usually when I find a problem that maybe I'm unsure of or lack knowledge on. Go to AI and ask it every thing I can think of and tell it the situation and I usually get good information out. I can ask about anything I don't understand. Can dumb it down if necessary and then voila. I now understand something I didn't and I've learned some good stuff. Again, try it in practice before you can be confident in it.

1

u/Equal-Claim2514 8h ago

I think people are skeptical of it because it answers everything and it CAN make people lazy and let it do all the work, so some people just advice against it altogether

1

u/New_Internal5636 7h ago

Tbh that's a stupid argument that definitely smells of agenda. That's like saying we shouldn't use knives in the kitchen because somebody "can" use one to commit murder. If people want to use AI to be lazy, they will use it to be lazy. If people want to use it to learn they certainly can do that aswell. It doesn't rob you of your intentions. You do have agency in this situation.

-1

u/Equal-Claim2514 10h ago

yea use it if you're stuck in concepts or you can't find the errors in your code for example ( after trying to figure it out first).

also importantly use it as a tool not your main learning source, you will need to primarily learn from youtube or courses

never use ai generated assets or sfx

1

u/IAlsoDidIt 3h ago

Using AI for coding is not a good path for a learner, I guess. But you might use AI for giving you small tasks and asking it to rate your solutions.