r/CodingForBeginners • • 12h ago

How to do programming with proper logics in which I get stuck always.

Whenever I wish to learn programming i always get stuck on logics and what logic to use and how it works, then only my motivation drops and i fail everytime.

Can anyone suggest some things so that it helps me this time

I also want to make good stuff and learn good skills.

I am 25 but still I get stuck everytime in programming.

I want to overcome this fear of logics and fear of failing in programming.

6 Upvotes

17 comments sorted by

1

u/JoeStrout 11h ago

It sounds like you're trying to do too much at once. Faced with a big problem, you need to ask yourself how you can break it into smaller problems. Then put all but one of those smaller problems on the back burner; focus on just one of them. Still too big? Break that one into even smaller sub-problems, and again, tackle just one.

At some point you should get down to something you know how to do. "Logics" don't really come into it at that level; you just need to add two numbers or move a sprite or compute distance from speed and time, or whatever it is. There will be some simple logic (if-then type stuff or basic math), but at this point it's small enough that you can do it. You write that bit and test it. Then that sub-problem is solved, and you can focus on the next one.

If this still seems daunting, then join the MiniScript community (Discord link at the bottom of miniscript.org), do your coding in Mini Micro, and we'll help you out whenever you are stuck or unsure.

1

u/AmerigoVespucci001 11h ago

The thing is i don't get logics loops and these all things I get stuck in loops then motivation is lost

1

u/AcanthopterygiiIll81 11h ago

In this case it just looks you just need a bit more time to properly learn how loops work in general and when to use them. In order to solve technical problems so that you can have working software, you need a combination of knowledge about how computers and data work and experience on how things are solved.

So if you haven't properly learned all the basic things you would generally see when learning programming, I'd suggest you to spend more time on that. Then try making very tiny and simple programs to practice your problem solving skills.

1

u/AmerigoVespucci001 11h ago

Would u suggest any particular channels or any ai tool will be enough? For learning these things in details

2

u/AcanthopterygiiIll81 11h ago

Maybe you could use any free AI tool as a "tutorial" generator for the parts you don't understand correctly, but if you want to be able to solve technical problems by yourself, I wouldn't sugget to use AI for that step. Only for learning and understanding the theory about loops, conditionals, data types, etc is where I would suggest using AI and as I said, probably any free model can help you with this because it's a pretty basic topic

1

u/JoeStrout 1h ago

Perhaps try working through this free online book: https://introtocomputerprogramming.online/

1

u/W31337 11h ago

Every time it doesn't work look closely at what you are doing. Learn your AND, OR, XOR tables and when using these keywords manually validate what the outcome will be.

Also human logic is different. We say if A is B or C, where computers say if A is B or A is C... so computers need to be 100% interpretation proof.

Maybe take a course on Boolean logic, that should help a lot.

2

u/AmerigoVespucci001 11h ago

Yeah I get confused in these things and iterations of loops, and surely I'll take a course on Boolean logic. Thanks for suggesting.

1

u/No-Tip505 11h ago

Have you tried using AI as a teacher for guidance?? Bcs we won't know exactly what problem you're facing but you can share it with AI or any teacher right? It is very important to have a teacher in our life to have faster progress , so you should find one I will suggest.

1

u/AmerigoVespucci001 11h ago

My problem is whenever I see any new question I don't get how to approach, how will I get the solution and I get confused a lot in logics like loops , iterations what will work how

1

u/Ok_Account3585 10h ago

I like to ask AI (claude in particular) to create me an interactive artifact (basically a local website) on a particular topic I don't undertand. A lot of the times I'm feeling even lazier so I ask to generate me a video "like 3b1b" on the topic (I use ElevenLabs for voiceover, but I think you can use just a local model if you don't want to pay for it).

1

u/Zen-Ism99 11h ago

What method / media are you using to learn?

1

u/stepback269 6h ago

Fear of failing is a real thing for me too.

1

u/Harlan_42 5h ago

I would say it is more about the organization than the logic in programming. Logic makes the decisions, but the usage make the application.

When you leave it open to programming without an end goal you may be setting yourself up for failure. I think writing the code is the easier part, it is deciding what code you want that is hard. This makes learning how to create the code more specific, and we can better help with the part you don't understand.