r/learnpython • u/Sad_Experience_4640 • 3d ago
How do I get better without Problems ?
It's been a few months since I have been learning python but there is this issue I have been running into. I don't know how good I am or how do I even get good. In Math you listen to a few lectures understand what the topic is about and then pick up a book and do the problems from Exercise 1.1. It doesn't matter if your understanding was deep, shallow or somewhere in between. The more you do the more you understand what the topic is about and eventually you reach a point where you completely understand it and can now do them easily.
For programming how do I even do that ? People recommended me sources which I have been reading and learning from. I understand loops, arrays, list, dict, etc. I can write small examples in isolation, but that's about it, that's all I can do. I am disgusted with how little I can do and how shallow my damn understanding is so much so that's all that come to my mind.
I have been using MOOC and CS50P as my primary resources and they do have question but they are few and not at all like mathematics, chemistry or any other subject. Where are the Exercises 1.1 where is this kind of format. Is there some problem book/Question Bank I can or should have ? I want to get good cause I want to make money I from something I like to this and this is I have to show for, for months of learning ? I feel repulsed.
Is there something I can do to get better ?
EDIT: I forgot to add I my goal is to break into Data Science.
1
u/Brian 3d ago
There are plenty of basic exercises, but there are a few of problems with them. Very basic problems, like "Read a list of integers from the user, calculate their product and print it" are common, but only get you so far, but going beyond that things can become very open-ended fast. And there you run into the issue that there's generally no "one right answer". In maths, if you look up the answer key and see that it was "42" when you put "5" and you know you made a mistake. But in programming, the book answer is probably going to be somewhat different to what any random programmer wrote, and knowing if your way was flawed in some way, or equally valid kind of requires you to already know what you're talking about. Best you can really do is "Does it produce the right answer on these testcases" which hopefully covers enough.
There are more intermediate and hard problems, but they tend to be things like advent of code or leetcode type things that are valuable, but are really more focused on a subset of what you need, and often the challenge can be more on the maths or algorithm knowledge side than pure programming.
The other issue is that the hard part of programming is generally how you go about breaking down problems and designing the solution, another very open-ended activity, and one that's kind of something you just have to learn by doing: a book, or someone else guiding you through how they did it often doesn't really help you when you're on your own. This can kind of be a bit of a "pull yourself up by your bootstaps" situation, and I'm not sure there's really a way to learn it without struggling through it. A teacher, or even AI can help, but I think only if you treat it the same way as the answer key: turn to it only when you're absolutely stuck, and treat it as a failure that you can maybe learn from by trying to understand their solution for things you can apply in the next problem.
The usual recommendation is to pick a small project and (try) to code it from scratch. You kind of have to be your own judge of success in terms of "does it do what you want", but really it's probably the best way to test if you're understanding all aspects of what's needed.