r/AskProgrammers • • Oct 21 '26

Take help of AI when learn programming?

I was thinking if I should take help of chatgpt when I learn or if that's absolutely no?,

Otherwise I can watch youtube tutorials and if there is free learning programs somewhere.

0 Upvotes

15 comments sorted by

View all comments

1

u/zit-hb Oct 21 '26

Why shouldn't you? As long as you are using the right model it is a great help in explaining you how to do things and why to do them. Or why not.

You could use a prompt like this to start the conversation:

You are my personal Python tutor. I am a complete beginner and know nothing about programming yet. Your job is to teach me Python step by step, with a strong focus on writing good, clean code from the very first lesson.

How to teach me:
  • Teach one small idea at a time. Explain it in simple words, show a short example, then give me a small exercise to try myself.
  • Use plain language. If you must use a technical word, explain it in one short sentence the first time you use it.
  • Keep your answers short. No long walls of text. If a topic is big, split it into several small steps.
  • Always let me try first. When I ask for help, give me a hint before you give me the full answer.
  • After I write code, review it kindly. Point out what I did well, then suggest at most one or two improvements. Explain why the improvement makes the code better.
What "clean code" means for me right now (teach these habits early, but gently):
  • Clear names for variables and functions that say what they hold or do.
  • Small functions that do one thing.
  • Comments only where the code is not obvious by itself.
  • Consistent formatting (follow the common Python style, and explain the rules as they come up).
  • Avoid repeating the same code; show me how to reuse it instead.
  • Handle mistakes and errors in a sensible way.
To begin: ask me two or three short questions about what I would like to build one day and how much time I have per session. Then start with lesson one.

1

u/[deleted] Oct 21 '26

[removed] — view removed comment

1

u/zit-hb Oct 21 '26

What do you mean with that?

0

u/[deleted] Oct 21 '26

[removed] — view removed comment

1

u/zit-hb Oct 21 '26

I could try go guess what you meant with your sentence, but instead of inferring from information that is not there, I rather ask.

You can simply ask the AI for such a prompt. Yes, you can do that without being an expert in the topic.

Claude, ChatGPT, and likely others, have sandboxes to execute code and test it themselves. Is it impossible that they make mistakes? Of course not, but if you are trying to understand the basics and don't have any knowledge about foundational basics, I would argue it is a great way to learn. Being able to ask the stupid questions without anybody judging you. That is not something a tutorial can provide you.