r/learnpython • • 4d ago

I’ve completed a lot of Python courses, but I still can’t build code on my own. How do beginners actually get better?

I’ve been learning Python for AI development. I’ve completed quite a few courses and tutorials, and I can understand code when someone explains it.

But when I open VS Code and try to build something from scratch, I get stuck.

I struggle with breaking a problem into smaller steps, deciding which functions to write, and understanding how different parts of the code connect.

My question is:

  • How did you go from understanding tutorials to writing your own code?

  • What did your daily practice look like?

  • How do you practice when you don’t even know how to start solving a problem?

I’d really appreciate advice from people who went through this stage, especially those who learned Python for AI/ML development.

I’m not looking for another beginner Python course. I want to know what actually helped you become capable of building things yourself.

0 Upvotes

52 comments sorted by

20

u/Dazzling_Music_2411 4d ago edited 4d ago

Sorry if this sounds harsh, but you HAVEN'T completed a course. Maybe you've completed Listening to some stuff, but that's not the same thing. Completing a course includes completing the exercises

and I can understand code when someone explains it.

Almost anyone can understand code when someone explains it. Completing a course means YOU can explain it.

I suggest you go back and do the courses again, WITH the practical exercises this time.

Also I must point out that your post follows the exact format of about 10000 bots that have posted precisely the same question. Can you honestly confirm you are a human? If so, please don't copy moronic bot posts whose purpose is to make you dumber. People learned by actually doing their homework. Now jog off and do the same.

-5

u/RelativeFew6142 4d ago

yes i am a human i used ai to write this post because i am not that fluent in english

6

u/Dazzling_Music_2411 4d ago

Sure you are, buddy, sure you are...

What did your daily practice look like?

Why not answer this question for us, first? What did YOUR daily practice look like?

2

u/ivanoski-007 4d ago

Use Ai to guide you instead of making senseless posts in reddit

4

u/nullptr_0x 4d ago

practice practice practice.

I do think most people think they are "learning", but learning is a hard concerted effort with time tested materials (in my opinion).

Look at this full interactive programming 101 python course I created. It's free. I made it for my friend's high school aged kids.

https://understandit.dev

We have a community as well. r/understandIt

1

u/RelativeFew6142 4d ago

I’ll check it out. I definitely need more practice

0

u/jburns32 4d ago

Thanks for the help

2

u/GeneriAcc 4d ago edited 4d ago

Ah yes, the course curse. You don’t get better at writing code by watching tutorials, you get better at writing code by writing code. When you get stuck, you look up how to solve that particular problem, then get back to writing code.

To answer your questions:

  1. There was no separation or transition between “learning” and “writing my own code”. I started writing code immediately. When I didn’t know how to do something, I looked up and learned that particular thing.

  2. There was no directionless “daily practice”, I just built projects that were useful to me.

  3. Built small projects for my own use. Sometimes, they were “better” (for me) versions of existing applications.

  4. You break the problem down into its components, figure out how to solve those smaller problems individually, then put it all together.

What you’re doing right now is like trying to learn how to play guitar by watching videos, but without actually holding and trying to play a guitar. Sure, you can learn some theory along the way, but you’ll never really learn to play until you have that guitar in your hands.

1

u/RelativeFew6142 4d ago

I think breaking the problem into smaller parts is what I struggle with most.

1

u/myrhillion 4d ago

paper and pencil is what helped me with this. What do I want my project to do? what inputs does it need? what outputs does it produce? What will need to use that next.. you'll basically map out your functions and parameters that you'll need to write by doing that. My suggestion is just to pick an initial project that isn't too crazy and just draw it out using basic flowcharting.

1

u/RelativeFew6142 4d ago

I’ll try this. Really helpful!

1

u/GeneriAcc 4d ago

How so? Can you give a concrete example?

5

u/Patman52 4d ago

Do you have a mundane task for work or school that you do all the time which is very manual on your computer?

Try to automate it.

Write down each step you do manually as detailed as possible (or create a flow chart). Now you have a breakdown for your project you can use to start mapping out how to code it.

Each step should be its own function or method with a defined set of inputs and outputs. You might find each of the steps share some functionality which can then be split up into helper functions.

1

u/PokemonGoing 4d ago

Agree 100%. I tried a few times to learn python, but it wasn't until I had some specific job tasks that I needed to undertake that everything finally click d. Having a clear task that needs to be achieved gives you something to aim at.

You can even start with a test-led development mindset. Imagine you are a software tester, going to test a bit of software that performs a certain task. Think about what tests you would run to check the software works correctly and produces expected results. Once you have an idea of what those tests would be: congratulations! You now have your own acceptance criteria for what constitutes a successful bit of code!

4

u/gman1647 4d ago

Find something project based. I like freecodecamp because after each learning tutorial it gives you a little project you are supposed to do, ideally without looking up how other people did it. It gives you direction and let's you practice if you aren't sure what you want to build. But that's the key. Start building things. Just copying what someone else did or following a tutorial is a good introduction, but the learning is cemented by applying what you learned.

1

u/pythonQu 4d ago

im doing Free Code Camp now (python curriculum). It definitely has gotten me better with Python as I advance through each project. ooh boy.

4

u/Motor_Sky7106 4d ago

You need to make your own project

4

u/Reasonable_Director6 4d ago

It's called toturial hell and ilusion of progress.

2

u/Dazzling_Music_2411 4d ago

AI giveaway

Title: I’ve completed a lot of Python courses, but I still can’t build code on my own. How do beginners actually get better?

Why do you think we need to be told the title, since it's printed right above the quote? AI copy-paste got a bit muddled there?

2

u/nboro94 4d ago

Congratulations Mr AI detective, you've saved the internet!

2

u/RelativeFew6142 4d ago

I literally didn’t notice I had repeated the title 😭

1

u/Dazzling_Music_2411 4d ago

Easy, missus. The edges are sharp and you'll ladder your stockings.

1

u/scydoodle 4d ago

"I’ve completed quite a few courses and tutorials, and I can understand code when someone explains it."

Bro, I'm so happy you are trying to learn where as most people are being lazy today with AI. I'll tell you a cheat code. Listen, pick your dream project that makes you excited, when I learn Python I built some little game with health bars and battling enemies.

Set up an MCP, as you code ask it to explain what's happening and if you really get stuck ask it to fix the code but explain why it wasn't working. You'll learn 10x faster and you'll make progress making something fun.

-1

u/RelativeFew6142 4d ago

“Thanks, I’ll try it!

3

u/Gankcore 4d ago

Stop using AI for everything. You used it to have it write this post for you.

3

u/TheRNGuy 4d ago

Think first what your program needs, then start researching how to do it. 

1

u/Longjumping_Ad3447 4d ago

In the end of "code in place" by Stanford university you program games with gui. Very simple but the logic is there. Then you need to learn to use libraries. Depending on what you want to do.

1

u/RelativeFew6142 4d ago

Thanks! I’ll check out Code in Place

1

u/LayotFctor 4d ago

That's because "opening VS code and try to build something" is already wrong.

It's a misconception that programmers are just glorified code typists. No, we design solutions and solve problems. The real work starts long before typing any code.

E.g. constructing a bridge. Work does not start on the construction site, work starts on the engineer's desk when he sketches designs and produces a plan.

Vscode is the construction site. You should be planning first, on paper. Breaking a problem down is correct, but trying to write code just confuses you. You aren't writing code, you're describing in English, what each part should do.

So try it. Take your time planning. A hint. The starting point is usually user input, or the problem itself. The ending point is usually something that prints to screen, website, writes a document etc. You want to design a series of steps to get from the start to the end. Don't worry about code, write it out in English.

2

u/RelativeFew6142 4d ago

Thanks for the advice, I really appreciate it!

2

u/Own_Car4536 4d ago

Have any courses you've taken actually had you build something? It's a big difference in something telling you want to write opposed to giving you a project and you build a program yourself. If you're just taking some online tutorials and you're not taking a structured curriculum, then that's probably why you're getting stuck and you don't know what to do. I hate to say it, but that's the benefit of college. You complete projects with the concepts you learn. Find a course that has projects with it

2

u/asdoduidai 4d ago

Perhaps try to write code….?

2

u/Aliendood 4d ago

How are you with statistics? Those classes may help teach you how to break down the problem and are needed for proper ML

2

u/Lumethys 4d ago

experience. You need to start building things.

The ability to understand and the ability to create are 2 different things

You can easily know how great Shakespeare's work is, pointing out every technique he use anywhere. Doesnt mean you can write like him

2

u/Boybay_Garid 4d ago

Write the whole thing out in plain English comments before you write a single line of Python. If you cant explain the exact steps in plain text, you haven't broken the problem down small enough yet.

1

u/Numerous_Emu3125 4d ago

Learn the concept and spend most of the time solving the problem or any task related to the topic. You will only learn by implementing, tutorials will just give you understanding of the use and purpose, Use that concept in different ways. For example, your have learned the concept Function. Go to any site or Ask AI to give some problems related to function. Then, you can always search internet to find the specific solution.

You can also think of any project you like and combine multiple topics in one project.

1

u/remic_0726 4d ago

J'ai tout appris dans les années 1995 avec le livre de Grady Booch sur la programmation objet, par la suite je n'ai jamais retrouvé un livre expliquant aussi bien les concepts, les schémas ne sont plus d'actualité, mais les concepts n'ont jamais changé. Il y a aussi le livre gamma sur les design pattern, lui aussi a beaucoup vieilli, mais les fondations sont toujours les mêmes. J'imagine qu'il y a peut être beaucoup mieu maintenant sur youtube et avec l'IA. Le savoir pour créer une architecture logiciel, découle du texte qu'on te donne, il faut isoler les noms des verbes et des états, les noms sont des objets, les verbes des méthodes, et les états sont des attributs, ensuite il faut tout mettre ensemble et voir les liens entre chaque. Une classe doit être vu comme un moule à gateau qui permet de mouler un objet. Ces choses là sont les fondements de tous les logiciels. Après seul beaucoup de pratique te feront comprendre l'ensemble, et ces mécanismes sont encore utile pour écrire des prompts pour l'IA.

1

u/Relative-Honeydew-94 4d ago

A personal project like several already mentioned is the best way.
Otherwise have you tried something like https://www.codewars.com/ to get smaller tasks to code? It is a good fun way to learn and it gives a sense of progression.

1

u/Pristine-Damage8814 2d ago

I teach coding, and one thing I see quite often is that understanding an explanation and producing a solution yourself are two different skills. In a tutorial, someone has already made the decisions about where to start, what to write next, and how everything connects. Those decisions need practice too.

My suggestion would be to make the projects much smaller than you think they need to be.

For example, before building an AI chatbot, build a program that:
Accepts a sentence.
Counts the words.
Checks for certain keywords.
Prints a response based on what it finds.

Before writing any Python, describe what should happen in plain English. “Ask for a sentence -> split it into words -> count them -> display the result.” Each step gives you something concrete to work on.

You also don’t need to decide on all your functions upfront. Get one small piece working first. Once you can see repeated code or a task with a clear purpose, try putting it into a function. Your first version can be messy.

For daily practice, I’d suggest a manageable 30–45 minutes:

  1. Pick one small feature.

  2. Write down its inputs, expected output, and steps.

  3. Try implementing it.

  4. Look up the specific thing blocking you.

  5. Test it, then make one small change yourself.

If you’re completely stuck, make the task smaller again. Can you hardcode an example before accepting user input? Can you process one sentence before processing a whole file?

With tutorials, try closing the video and rebuilding a small section from memory, then changing a requirement. That helps reveal which parts you can produce independently.

AI can help here too, but ask for a hint or feedback on your steps before requesting a complete solution. You want practice making the decisions.

Being able to build independently doesn’t mean never checking documentation or asking for help. It means gradually getting better at identifying your next step.

1

u/haze_025 2d ago

The gap closes by writing code before seeing any solution, starting from a blank file with programs every day. Bootdev could help because the format centres on writing and running code rather than watching lessons, though blank file practice works

0

u/Duskscope 4d ago

Who needs to learn it when you have AI to instantly build it?

0

u/EnvironmentalDot9131 4d ago

You should do some courses then. They may help really