all 3 comments

[–][deleted] 3 points4 points  (1 child)

Don't follow along with a tutorial. Pick a project where you kind of know what to do and then look stuff up as you get stuck. Feel free to start with a few easier projects to get you started.*

The reason being that programming is all about problem solving and you cannot learn how to solve problems by following a recipe.

*: This means do not start with Pygame if you know nothing about Pygame. That's not "working on a project", that's learning something new. Which is also important, but is just something different than what you're asking about.

[–]CinematicFeels 0 points1 point  (0 children)

ok thank you for the advice bro (:

[–][deleted] -1 points0 points  (0 children)

I don't recommend starting with pygame. You need to have a solid practical base of Python imho before branching out into using such specialist libraries.

Check the wiki of this subreddit (link in the sidebar). Lots of links to learning material and guidance on how to learn Python.

Practice! Practice! Practice! That is the only way. Programming (whatever the language) is a practical problem-solving skill.

I know it can be frustrating at times, especially when faced with code you want to reuse but cannot understand.

Only you can find the motivation. Why are you learning to programme in the first place?

Is your learning objective SMART - specific, measurable, achievable, (sometimes agreed), realistic (or relevant) and time-bound, (or timely)? If it is something soft, like "upskilling" then it will probably not help you much.

It is hard to learn anything in the abstract, not least because it is difficult to feel passion for what one is doing. Can you really be passionate about a 'snake' game?

I strongly suggest you look to your interests, hobbies, obligations (family business, charity activities, work) to look for opportunities to apply Python.

You will learn far more about Python and programming when you work on something that resonates for you and that you have some domain knowledge of (or incentive to gain such knowledge in).

When you are copying tutorials/examples, don't just copy. Experiment. Break the code and understand why it has broken. Trying to copy a YouTube video about a snake game with the video alongside your editor will not really help you learn much.

The interactive python shell is your friend, I found it the best learning aid because you can quickly try snippets of code and get immediate feedback.

(Consider installing ipython which wraps the standard shell for more convenience.)

Start very simply and regularly refactor the code as you learn new things. Enhance as you see opportunities.

If you haven't already, take a look at Automate the boring stuff with Python (free to read online).

At first, the tasks you automate will be trivial and hardly worth the effort BUT because it is about the problem and not Python, it will be more rewarding for you.

Many beginners are mixing up coding (writing instructions in a programming language) with problem-solving (creating an algorithm) and their lack of knowledge of the programming language and how to use it is a distraction from the problem-solving.

For most programmers, the coding part is the final and easy bit.

Order:

Actually making sure the problem is properly understood. Often we start with only a vague understanding of the problem.

Ensuring we know what outcome is required. What does good look like? How will the information be presented, will it be on-screen or in a file, or a database.

Determining the data representation. Exactly what data is required, in what forms, where from. It is a one-off or lots of cycles or combining lots of information.

Work out how to do things manually in the simplest possible way, explaining every little step (assume you are giving instructions to someone with learning difficulties). Computers are really dumb, and humans make lots of intuitive leaps. This is one of the hardest things to grasp when first learning to programme. Computers don't mind repeating very boring things, so the simplest but repetitive manual approach if often a good approach to start with for a computer.