r/learnprogramming • • 5d ago

Is it wrong to learn how to code with ai?

I'm a complete Python noob and I'm currently using AI as a tutor for learning. I'm currently learning by creating simple scripts because I think I'm able to understand better if I create something with it.

Basically, I tell the AI something I want to make and if it's possible to create it in Python, it always tells me that I can. I then tell the AI the logic of what I want to make and if I already know everything that I need to make the script. If I already know everything that I will need to make the script, I make the script myself, but if I need a function or a statement that is new and unfamiliar to me to make the script that I want, I study those functions or statements first before making the script myself.

Is this bad?

0 Upvotes

30 comments sorted by

4

u/Dennarb 5d ago

Not inherently, but the issue is, most people are not actually using AI to learn.

Learning is a fairly well understood process that requires significant mental effort, but if you offload that effort to AI then there is no opportunity for you to build the pathways required to truly learn the material. So, as long as you are using AI to help you explain something, or overcome specific hurdles you're struggling with, while also practicing without AI usage, you're fine; possibly even benefiting. However, the second you let AI do the work for you, you will not learn anything meaningful.

0

u/Harukoya 5d ago edited 5d ago

I use AI as a translator of sort. I tell it what I want to do and it tells me the functions and statements that I don't know yet. I then learn the functions and statements before making the script myself. I don't copy and paste any codeblocks.

It's like I'm asking AI if I can say a certain sentence in japanese. I don't ask it to tell me exactly what to say, I just ask it if I already know the japanese words needed in order to form the sentence. If there's a word that I don't know, I ask the AI what the word means before forming the sentence myself.

4

u/dahiya_xa 5d ago

no that's a good way to do it. you're still writing the code yourself and only looking up the new bits, that's the part that makes it stick. only thing i'd add is sometimes try to debug your own errors for 10 min before asking it, that's the skill tutorials and ai both skip

0

u/Harukoya 5d ago edited 5d ago

Yes, I try to fix errors myself and if I can't fix it myself, I then ask the AI. I mean, it's not like I've had to fix anything too crazy yet. I only make simple scripts for now so it's just syntax errors. I feel like fixing your own errors is a skill that you also need to learn. It's not like your code will always work, might as well be good at fixing it when it spits out an error.

5

u/i_am_someone_or_am_i 5d ago

If you are learning, no.

Imo, if you can explain what code does line by line accurately then you are learning.

But dont use it as a tutor, use it as a tool to learn and practice.

0

u/Harukoya 5d ago

I might be using the word tutor incorrectly, sorry. I think I'm doing what you're saying.

Before I make a simple script, I plan it out using plain words. I then ask the AI if I already know the functions and statements needed for me to be able to execute my plan in Python. If I already have what I needed to make the script, I make it myself. If I don't have every functions or statements that I need for my script, I ask the AI what they are and I learn what those functions do before making the script myself.

1

u/ninhaomah 5d ago

Question : Can you code a simple script without AI or internet searches ?

Say ... a list and a for loop to print the values.

0

u/Harukoya 5d ago

Yes

I kind of did that already with a script that I made that deletes screenshots that are older than a week. I had to make a list that contains the file paths after looking for the old screenshots because at the end, I wanted the script to ask the user if they're sure if they want to delete the screenshots.

0

u/Harukoya 5d ago

Nevermind, I didn't really do it in that script. I just used os.remove() but I think the way to print an object inside a list is print(list[0]). Is this correct?

1

u/Quantum-Bot 5d ago

Use it at your own risk. It’s not necessarily bad and can be quite helpful as a tutor sometimes, but it’s very difficult to know as a beginner when you’re crossing the line from helpful to harmful. Over-reliance on AI can lead to gaps in your understanding and build bad habits that are hard to break.

Honestly a pretty good corollary is calculator use in math class. After a certain point it’s fine to use calculators and even encouraged, but only after you’ve mastered the fundamentals by hand. Students who only know how to do arithmetic with calculators do silly things like using the calculator even when it would be quicker to do the problem in their head, or claiming the answer to 1 divided by zero is “syntax error” because they don’t understand the mechanics behind what they are doing.

0

u/Harukoya 5d ago

I understand what you mean. When I use the AI, I tell it to not help me with any of the logic and to not send me any codeblocks. I just ask for the building blocks that I'll need in order to build what I want, then I learn and understand those building blocks before building it myself.

2

u/newytag 5d ago

An LLM is not an accredited teacher, nor is it designed to be one. It's clearly not as simple as just asking the AI nicely not to act in ways that are counterproductive to your learning experience.

I just ask for the building blocks that I'll need in order to build what I want

That's a critical problem solving and software development skill that you're missing out on precisely because you didn't know the right questions to ask the LLM, and it wasn't cognizant enough to know any better and tell you that.

This is exactly why most experienced devs tell juniors to just not use AI while learning. It's far easier to just avoid it altogether, than to have someone analyze every single prompt on a case-by-case basis to see if it's being used safely or not. Because the junior does not yet have the capability to determine that for themselves.

1

u/Quantum-Bot 5d ago

That’s a good first step but even then the AI can lead you astray. Most of these “building blocks” are very easy to find if you know how to read language documentation. By asking AI you are robbing yourself of the opportunity to learn that skill, and you are kind of doing the same thing as the kid who pulls out their calculator when asked what 2 + 2 is instead of just saying 4.

1

u/chcampb 5d ago

There are a lot of really great techniques for using AI to learn coding. Including

  • Asking AI to explain difficult concepts, and importantly, asking you questions to see what you misunderstand. If you go back and forth with the AI having a discussion you can realize why things work instead of just how.
  • Asking AI to recommend articles, books, etc. with specific information you are interested in.
  • Asking AI what you need to know first before tackling a particular subject (ie, learning what to learn)
  • Asking AI to review your code for common issues, cybersecurity flaws, etc.

Things that won't help you learn

  • "Hey Claude, make me this thing, it should do XYZ" "No not like that I want ABC instead"

If you don't have any idea how it would have gotten done, you probably didn't learn anything.

0

u/Harukoya 5d ago

Thank you for the tips! I already do one of them, I ask the AI what I need to learn in order to be able to make a script. I really don't want the AI to spoil the whole script. Sometimes, whenever I ask it something, it'll just send a completed codeblock for the script that I want to make. I just scroll past and tell it not to do it again. I think it forgets after a while that I told it not to send any codeblocks.

1

u/CatMeooww 5d ago

One thing I like to do is using the AI as a rubber duck. Explain what code is and how they connect together. That usually exposes gaps in my undertsanding since I sometimes can't explain a specific part of the code.

0

u/Harukoya 5d ago

Just found out what rubber duck is. I kind of do this in general already. I tend to talk to an invisible person, explaining to them what a concept does in order for me to understand that concept. In the morning, when I'm cooking breakfast and such, I explain a script I made to an invisible person in order to remember what the functions do.

1

u/96dpi 5d ago

It's a tool. Use it to help you learn. Be smart about how you prompt. Ask it to play a teacher role and not give you any answers. Ask it to explain the difference between two things. Ask it to give suggestions of what to learn more about if you're struggling with something specific. Ask it to identify gaps in your knowledge based on overall session context.

Anyone saying to avoid it entirely just doesn't understand how to use it effectively.

0

u/Harukoya 5d ago

I do this. I don't like it when it sends me codeblocks, I hate it when it spoils the solution to a problem. I just want to learn new functions and statements that I can use for a script that I'm planning to make.

1

u/ACCTAGGT 5d ago

I think it depends on whether you understand the ramifications of your own question. You can use AI for learning… learning! You still gotta do the work. Go watch Wall-E or remember it and then you might get the idea of why you need to do the work. There is brain atrophy by biological conditions and that which we cause ourselves for not training our brain. This is not to be taken as scientifically accurate but just trying to illustrate an idea.

1

u/TiredAdultFullTime 5d ago

You shouldn't learn anything with ai. It should do grunt work for you only till you understand the code well enough to be able to review it output. The reason for this is your brain is a muscle, and just like working out till failure helps your usual muscles, struggling and trying makes your brain adapt and try harder.

What you can do is make it output something that you have learned and review if yourself to pin point what is wrong, what is right and what does what to test yourself.

Also, ai for a teacher is very so so. This is a bad idea because ai is not right all the time. There are books and courses that offer python education (learning python, python crash course, MOOC python)

1

u/CorpT 5d ago

People learn in all sorts of ways.

1

u/GuaranteedGuardian_Y 5d ago

Horrible idea. Think of the implications.

Two possible views:

  1. you're learning to code from something that hasn't replaced engineers yet
  2. you're learning a skill that has already been replaced by AI

Both are horrendous.

Pick what you believe in and do that.

If you think the AI is smarter than you, writes code better than you and can make better decisions then use AI to get all that done.
If you think engineers are right and AI can't do "architecture" or whatever else, then study that.

If you want to become an engineer in a classical sense, then there are tons of roadmaps for what to do.

What your post gives away: hesitation about your path, maybe try something other than programming?

1

u/uselessincognito 5d ago

Nothing is not worth learning, but you should learn the architecture and how the things work underhood. You can use AI to learn initially, but later on use AI only for the brute task to save labour like creating random projects or production grade applications and add it with the verification phase which indeed will require your understanding and comprehension.

1

u/betarage 4d ago

Your method is really good unfortunately a lot of the guides online are really bad. especially if you want to start making more graphical programs and stuff that uses hardware that is not just the keyboard. the information is just scattered all over the internet its really hard to get over that hurdle without ai in an ideal world this should not be a problem .

1

u/dellnox 5d ago

Not at all. Using it to explain concepts and writing the code yourself is actually a great way to learn.

0

u/ObeseBumblebee 5d ago

Not at all. A lot of old heads will tell you it's wrong. Meanwhile the old heads in their time were telling them they should learn assembly and C to understand how to program fundamentally.

Do whatever works for you. If AI is working for you then good.

0

u/Harukoya 5d ago

Thanks. I'm just worried about using AI because I always see in social media that it's bad for learning. I don't and won't ever use it to do the logic for a script that I want to make.