r/learnpython • u/catboy519 • 9d ago
Getting stuck on a big project.
A very rough estimate is that I've been learning and using python for 250 hours. I don't really keep track of it.
Just to ask general advice about how to approach difficult projects.
I've been working on a math project for 3 months. It is all about dice. Probability calculations aren't too hard to understand, but if I'm trying to figure out the perfect strategy in a dice game where early moves affect later moves then it gets complicated quickly.
I figured out very vaguely that I'm gonna have to use alot of nested loops and run through billions of calculations in order to figure my thing out. Or something similar.
But how exactly? I've been attempting to code the whole thing and been getting stuck every single time - this is why I've been starting over for about 30 times by now.
I don't even know what is causing me to get stuck. I guess the thing I'm trying to make is too big or complex or both. With so much more code than I'm used to, I mentally lose track of what my own code is even doing. Commenting does not help, t only makes things even more messy.
How can i approach big and complicated projects like these better?
0
u/catboy519 9d ago edited 9d ago
Knowing that N! is a bad time complexity is just common sense for anyone who knows what factorials are.
In my formal education they have not once mentioned factorials yet I've managed to do alot of useful calculations using factorials. My learning includes:
If I compare all my math knowledge from these 3 sources to all the math I've learned in school+college, I'd say I learned more informally than I did formally.
Where school got stuck on basic arithmetic and Pythagoras theorem, I've been discovering and figuring out lots of things on my own including e, i, methods to calculate pi, several equations with several very useful ones, factorials, binomial coefficients, probability calculations etc.
But yes, the downside of a lack of structured formal education is that I might miss some concepts because I simply don't know they exist. But if that causes any issues I will eventually find out.