It's a lot to take in at first, but the problem isn't that you're really doing something wrong or that you're lacking some piece of information. You just need to actually write more code. It will help you understand why something is set up the way that it is, and also help things make a lot more sense. Once you have that foundation of experience, a lot of other things fall into place on their own for lack of a better explanation. In other words: practice makes perfect
Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
How long would you say it took you before getting a fundamental understanding? I ask because I've been at this on and off for years but I always end up quitting because after a few months I just don't see any progress happening. I'm still forgetting things I learned 3 or even 4 times like how to do a for each loop.
But as you said it just takes practice. I've tried to find challenges that I could do and everything is just so overwhelming I have idea where to start. I see tutorials say to make a tic tac toe game or a calculator or to contribute to open source code. Which is good I suppose but all of it feels too advanced and I get lost on how to begin. For reference I'm currently learning html, css, and JavaScript. Advent of code was okay when I tried but once I got past the first handful of challenges it quickly went way over my head with sorting algorithms and how to make maps out lists for the elves to move or whatever.
Contributing to existing projects as an introduction is very hit or miss. Project and task complexity vary immensely, supporting docs and guidance are most often non existent.
I love Advent of code as a concept, but I agree - at least the ones I worked on - have a steep difficulty/scope curve.
Something like a tic tac toe game is great because it is visual, interactive, and iterative as well as relatively small in scope. Any project you have a personal interest in and that has some or most of those properties is great.
The Web technologies HTML css and js are great to get into programming but I feel like it's bad for teaching software development as software engineering, because it doesn't guide towards or ensure structuring and good practices. Which I thought you were talking about at first, but I guess you're not at that point yet with on and off beginnings.
Going back to your original description, functions encapsulate a work unit. Use it to name and define behavior so that you can combine and hide away complexity in a defined and obvious manner. Separation makes overall complexity manageable because you can look at subsection of it.
How did your tic tac toe game go? Was that something that worked out well?
Have you looked at other projects? For example other tic tac toe implementations and how they did it? Which can be hit or miss in quality and readability of course.
In my opinion the best way to learn, or environment to learn, is teaching or/and guidance through a good senior. The second best is interest and personal projects. Even if it's small hacks or projects, and even "unfinished" projects can give experience and knowledge.