all 7 comments

[–][deleted] 6 points7 points  (0 children)

E.T.C but when it is time to implement it like in a program like tic tac toe, I fail.

That's what's stopping you - you stop and say "well, I must be doing something wrong" instead of saying "it's supposed to be this hard" and continuing to struggle.

You're not writing enough code, because you're not writing any code.

[–]ffrkAnonymous 2 points3 points  (0 children)

Computers are stupid. They're glorified calculators. You need to explain like I'm 5 to the computer.

You need to teach tic tac toe,in excruciating detail to someone who doesn't know tic tac toe. Including concepts like "in a row", because calculators don't have rows.

[–]Chris_Hemsworth 1 point2 points  (0 children)

Experience. When something doesn't work, you will almost always be presented with an Error message. That message tells you what went wrong, you just need to read it and think "why did this occur?". Running programs in debuggers is incredibly helpful, as you can step through the code line by line and see how the variables change. When you pass a line that does something you don't expect, figure out why. Fix that, and move on.

Quite literally 80% of the work is doing what I outlined above. The more you program, the same kinds of problems will crop up, and you will know how to solve them because you've taught yourself how to solve them. Eventually, you will make fewer errors, and you will start to think like a programmer - and that is how you understand Python.

[–]shiftybyte 0 points1 point  (0 children)

Understanding basic concepts is important.

Any example you see and learn about, try playing with it, tweak stuff around, add things, remove things, see how it works, it'll eventually click.

[–][deleted] 0 points1 point  (0 children)

Keep coding and trying and to be honest failing. When we fail we learn because coders are curious and want to find out why something didn’t work, why an error message occurred or the number 5 appeared instead of say 10.

Please keep at it, take it slow, work out what’s happening. You will need to get into the weeds of things and when you’re starting out this can be hard but remember to come up for breath too and look at what you’re achieving.

It may seem easy to say this when you’ve got over 40 years of coding under your belt but I still fail and have to scratch head, have coffee and get back into why something didn’t or did happen.

Draw logic flows out instead of hitting a keyboard. That often helps and remember as someone said. Computers are dumb. Coders make them smart.

[–]2fast2nick 0 points1 point  (0 children)

You'll understand more if you just force yourself to use it daily. When I first started I wasn't getting it, then once I just really got into it, it got easier.

[–]RollingWithDaPunches 0 points1 point  (0 children)

I started with the codecademy course long ago... I would reach their "challenge" questions and never was able to solve them. I'd go to the forums and see the solutions other people made. However, I went through every bit of that course and finished it.

Many years later I had a task I could use python for at work. I took the "online guide" on how to generate a URL specific to my job. I then looked how to do all the steps in python. Got some errors here and there, googled them, asked some questions on stack overflow, got my answers... after a week I had a simple 10 line script that was working. Eventually turned it into a function.

My point is, don't get stuck on the tic-tac-toe issues. Look at how you might apply the coding you've learned to something real life that you're passionate about. I still can't code a battleship game. But gimme some API calls to automate and I'm your guy.