Why do I struggle with knowing what to code, even when I understand the code itself?
I’ve noticed that my biggest problem with learning programming isn’t really understanding the code itself.
For example, I understand what a function is and how it works. I understand variables, conditions, etc. But when I’m given a problem to solve, I often don’t know what needs to happen first, second, third before I even start writing code.
A simple example: if I need to read an input from an HTML page, I might understand the syntax once I see it, but I wouldn’t necessarily think on my own, “First I need a variable to store/read this value, then I need to do X, then Y.”
I guess I’m trying to learn how to think like a programmer before actually writing the code.
Is this a specific skill I should be practicing? Are there any websites, games, exercises, or methods that specifically teach this kind of problem-solving rather than just programming syntax?