r/learnpython • u/catboy519 • Feb 05 '24
Ive been learning for about 25 hours but still have no clue how python works
Im a beginner programmer, learned a little bit html and then switched to python. I use both w3schools and learnpython. I can understand the instructions very well, i just dont memorize them. Its too much infirmation and it just falls out of my brain.
Why is doing anything more than printing simple text, so hard? Why do I make so many mistakes in the things ive already learned multiple times?
Is python/programming not for me, or does everyone struggle so hard?
2
u/ShxxH4ppens Feb 05 '24
You’re goal is to learn the punctuation/common terminology/structure, not to be able to code large tools in your first 100hr of python/programming
Break up what you want to do into small chunks, make scripts that do those small chunks, then make the next, you will get stuck on how to pull string values from a nested dictionary to match with a list of integers, for hours lol its fine professionals get stuck with this when they encounter something foreign - use that time to learn more than what you’re trying to do, learn how the different objects are used/referenced - learn how to inspect these objects - then you’ll have a way to do so next time, or at least a better idea where you need to start - you’ll know the punctuation better
It’s common for people to take 10hr just to get python set up and working, computer’s os has changed a lot in the recent years and some instructions just aren’t up to date and not intuitive for a beginner - good luck
1
u/catboy519 Feb 05 '24
What also confuses me is when to use ( vs [ vs { because I honestly don't know the difference between them.
And I keep forgetting basic things like adding : or () or indentation, I make the exact same mistake over and over again and somehow I still keep making it.
I feel like I have no idea what I'm doing.
2
u/Agitated-Country-969 Feb 05 '24
Well you wouldn't expect to become fluent in French or Spanish in 20 hours, right? It's like math where you have to practice until you remember.
1
u/ShxxH4ppens Feb 05 '24
( are usually part of inheritance, [ are most for indexing or lists, and { are more assignment - they are used in different ways though, they tend to be a part of another object’s structure and can be modified by a package to be used for whatever makes something specific work (I’m thinking list object here, it assumes items in a [] are a list object and takes many different attributes that you can apply to a list (like ask for its length), but you can overwrite the list object with an integer value and your code will have no idea what function you’re trying to do when asking for it’s length)
If you want to dive into something specific, try for some pandas - an truly excel-lent data tool, it has a lot of synergy and objects that work wonders, but these are all specific to pandas workflow, many other packages use pandas/build off of pandas, so they get integrated, meaning some things will still not be intuitive depending how a module has been constructed and which dependencies get carried over
Python is no C, however C usually kinda works lol - everything is objects built onto other objects, a lot of the hard strict rules for programming are all under the hood and you can be 5yr in and still have no idea how some very basic stuff really works
2
u/imthebear11 Feb 05 '24
Are you actually writing code along with the instruction to understand it? You should be doing that, and then making hypothesis' about what the effects of changing something would be, then make that change and see if you were right. If you were right or wrong, you should attempt to understand why you were right or wrong.
Lots of people just watch videos, then finish and go "wth I don't know how to code", because they never actually coded anything during the videos.
1
u/catboy519 Feb 05 '24
Yes I write code and run it. But even then, I find it hard to remember how stuff works.
Also when i go to w3schools python, I can easily give the correct answer to most of the exercises, however when i have to actually program something, i have no clue how to do it
2
u/Outside_Mess1384 Feb 05 '24
You've been doing it for 25 hours. Most things in life are not like the care bear video games we have today. Some things take a very long time to learn. Have you heard of the 10,000 hour rule? It is widely accepted that it takes about 10k hours to become an expert at something. That breaks down to 40 hours a week for 5 years. If you watch your goals too much, it will feel like they are never getting closer. Focus on the process and try to build habits/routines that reinforce the behavior.
1
u/catboy519 Feb 05 '24
I think 10000 is an completely arbitrary number though.
But if you mean that 25 hours is not much for programming, that I can agree on.
24
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Feb 05 '24
25 hours is not much, especially if you've been studying long days. Take a breather, let it sink in - baby steps!
This is the first time you're doing programming (probably), and it's not a skill you'll pick up fast. Think of it as a marathon rather than a sprint. There's so much for you to learn you couldn't possibly process and internalise it quickly unless you were some kind of a savant. The same goes for everyone else here.
I've been at this for a bit under 10 years. I've gotten the fundamentals pretty tight in my head, and plenty of more advanced stuff, but I'm also aware of many things I still don't know. And there's new things to learn almost every day, from new language features to frameworks and design patterns. Algorithms. Newfound edge cases. Vulnerabilities. The list goes on and on.
Programming is hard, but that's what makes it interesting.
10
u/Fair-Description-711 Feb 05 '24
I'd expect becoming skilled at a jr dev level of programming to take about 1,000 hours. There's a LOT to learn. If Python is your first programming language (HTML is a "markup" language), being very confused at 25 hours in is very normal.
If I may suggest a path to remember things better, and to form an understanding, try taking the things you've learned, and experiment. First, try to write something you've already written before. Try for a few minutes without looking something up, then look it up if you still can't remember. (It's ok. Programmers look stuff up all the time, but as a student, try to remember first.)
Now change something, and try to figure out what will happen. Did the change do what you expected? If not, try to figure out why. Now change something else. Is there something you can change that you've no idea what will happen? Good, go change it! What happened? Was there an error? What does the error say?
-1
u/Outside_Mess1384 Feb 05 '24
The 10,000 hour rule is the idea that it takes 10k hours to be an expert at something. 1000 hours is not going to make you an expert but its a good start. That's 1 year of you're training 40 hours per week.
8
u/cyberjellyfish Feb 05 '24
An undergrad in cs takes most people four years, even then the grads don't know what they need in industry, they spend the first few years learning with (hopefully) lots of mentoring.
You've been at it a day.
You're at a juncture: if you think the skill set is so trivial it can be learned in a day, it's not valuable. If you think it's valuable, you must be willing to give it significantly more time and effort. Or you can decide it's not for you
There's no right answer there, just whatever works for you.
4
1
u/PizzaGuy789 Feb 06 '24
My fundamentals course was 40 contact hours plus 50-60 practice. Now I'm 15 hours into my first project and still getting a grasp. Stick with it and build projects.
1
3
2
u/checock Feb 05 '24
Keep learning, and give your brain break so it can organize and summarize what is learning.
Once you get an AHA! Moment you will realize that it's worth to learn programming.
2
u/TomDLux Feb 05 '24
I'm an experienced Perl programmer with 30 years experience. But I didn't know Python. I took Harvard's CS50P course at EdX. Challenging, but a complete intro to all the beginner stuff. You can take till the end of the year to complete it. They offer a certificate for a couple hundred dollars, but you can do it free and pass on the certificate. Being able to discuss Python components will get you further than a piece of paper.
Keep up the good work and you'll get there!
2
Feb 05 '24
It’s fine if you don’t memorise stuff, just look back on it and practice practice practice.
2
u/my_password_is______ Feb 05 '24
I've been learning Mandarin for 25 hours. Its too much infirmation and it just falls out of my brain.
Why is doing anything more than printing simple text, so hard? Why do I make so many mistakes in the things ive already learned multiple times?
2
2
u/aqjo Feb 05 '24
25 hours is a drop in the ocean of a lifetime, but don't despair, the ocean is made up of many, many drops.
1
Feb 05 '24
Pretty good advise here in the other comments. You need to work on your programming fundamentals.
1
u/aintnufincleverhere Feb 05 '24
I try to learn things by having a concrete goal. I want to know how to do X. Okay here is how to do X. Now I know how to do X. Practice how to do it.
1
u/Agitated-Country-969 Feb 05 '24
20 hours is nothing. Professional software engineers have at least thousands of hours hours under their belt.
Also Python is one of the easier language because it's like pseudocode. The problem is not all programming languages are like that, so going to them is like only learning to speak casually and then being asked to speak formally. Easy to go from formal to casual but not the other way around.
1
u/IncestosaurusRekt Feb 05 '24
I hope this isn't a side effect of seeing all those "learn python in 3 days!!!1!1!!1!" ads, 25 hours in and being confused is not a big deal.
You will be learning for the rest of your life in this field, 25 hours is a drop in the ocean compared to all of that time.
1
u/Helpful_Bluebird Feb 06 '24
25 hours might seem like a lot, but in the grand scheme of learning programming, it's not.
Especially when you're coming from something as visually straightforward as HTML to something as logic and syntax-heavy as Python.
Just try and stay consistent for 30 minutes a day. IMO regular practice is better than cramming several hours in one day and then not touching code for a week.
1
u/Big_Combination9890 Feb 06 '24
Ive been learning for about 25 hours but still have no clue how python works
Welcome to the club. I have been a software engineer for half my professional life, and this is an accurate depiction of how I feel most of the time.
Seriously though, 25h is nothing when it comes to learning how to code. You are on a journey across the country, and you have barely left your own doorstep.
1
4
u/gsmetz Feb 05 '24
I hate following tutorials, instead I find something simple I really want to build. I start building until I get stuck, then I'll google advice or ask a forum for help. Someone else has already been through the problem and can help or has posted a solution. I learn from that problem and keep building. Rinse and repeat.