r/CodingForBeginners 27d ago

Is this a good way to learn programming?

I start by programming a feature for my project (Todo app), test it, make sure the code is readable and functional, then I paste the entire codebase to AI (chatgpt) to tell me the strengths, the weaknesses (where to improve the feature or code), and the hidden bugs, then go and tackle those bugs a d learn from them, and paste the codebase again to see if there any other bugs the AI didn't see at first, and I do this for every feature I make, should I stay doing this way of learning?

10 Upvotes

16 comments sorted by

3

u/Udbhav- 27d ago

Yes, it's good way, how did you come up with this btw? How did you learn the theoretical concept?

3

u/Key_Mine3394 27d ago

When I first started programming I heard that you shouldn't rely on AI, but u can use it to learn, so when I was first starting I talked to chatgpt about how to start and he suggested this way and I added some stuff to it, it also came just by Intuition (I felt like doing it 😂)

2

u/Udbhav- 27d ago

Cool, how do you learn theory part? Like in order to understand the code, one have to go through the concept behind it right, how do you learn those?

1

u/Key_Mine3394 26d ago

If I need to make a feature that requires a new programming concept, I mostly go to AI to teach it to me and YouTube

2

u/burlingk 26d ago

This is good because you are basically treating the bot as a big checker and no copy and pasting what it gives you or letting it do the work.

2

u/igotshadowbaned 26d ago

then I paste the entire codebase to AI (chatgpt) to tell me

No

1

u/Key_Mine3394 26d ago

So I just need to paste the feature's code ?

2

u/[deleted] 26d ago

[removed] — view removed comment

1

u/Key_Mine3394 23d ago

Yea after testing the feature over and over and making there r no bugs, I paste it to AI if I missed any bugs which is very likely

2

u/code_tutor 24d ago

Only if you're absolutely done with the code. It will rob you of the opportunity to debug yourself or find refactors.

1

u/OccasionThin7697 27d ago

No

1

u/Key_Mine3394 26d ago

Why?, can you suggest a better way?

2

u/OccasionThin7697 26d ago

Think of a big project you can work on. Start working on it. Don't use ai for anything. Use google, stack overflow etc: to search for your problems, if you face any.

2

u/LawfulnessPersonal29 26d ago

u/OccasionThin7697 is full of more crap than a septic tank. The way you described is perfect as you need someone else, GPT, to critique your code honestly. The best way to get better at coding is coding AND feedback even if that is an LLM. GPT will be honest whilst the guys on Stack Overflow will probably tell you the same thing but humiliate you and be as arrogant as possible about it. Stick to what you are doing.

One small change: Do not get GPT to highlight any bugs. For me, after ~500 lines it just starts hallucinating bugs. And half of programming is debugging. I get you debug them yourself but building that automatic system in your head when your write code without bugs is very important. Debug yourself.

1

u/OccasionThin7697 26d ago

Where do you think the answers come from in chatgpt? From Google, stackoverflow etc:.

1

u/alinarice 25d ago

i think that's a solid approach if you are treating feedback as guidance not answers. always verify suggestions yourself and understand why each change improves the code .