I've been helping a friend learn some things about programming recently, which has reminded me of all the hurdles you need to get over to get a simple program to run. Repeatedly, he'll run into trouble and, although the solution is apparent to me, he'll be unaware of the full toolbox that's available to him.
When a new programmer is getting started, they don't have the bearings they need to know where to search for answers. When someone shows them a solution, it's hard for them to hold on to the answer, since they haven't built a framework in their mind for thinking about programming.
Programming knowledge seems to fall into a few categories. I think recognizing these categories early on helps a young programmer organize the things they're learning.
1. Learn Syntax
This is probably how someone who doesn't write code views programming. You learn what these symbols mean. You type them in bright colors on your computer. You're a programmer.
Learning systems, like Codecademy, seem to handle this step of the learning process well. They demystify some syntax and show you relatively simple examples, but they don't quite give you enough to allow you to go independently start writing software. I've seen several people go through long stretches of learning like this, but they still feel lost.
However, these systems are still very valuable. The more comfortable one can become at looking at a block of code and understanding what the syntax means, the closer they are to writing software. For this reason, I think beginners should start with just one language and learn as much about that language as possible, instead of gaining cursory knowledge of a list of languages.
For an experienced software developer, the raw syntax, in a language they're fluent in, is something that's rarely even thought about. The same way one's able to read a book and see the fantasy world the author's describing, a well-written program should, when read by a fluent developer, create rich imagery in the reader's mind. What they're imagining is nothing like syntax, but it's an abstract view of how data is flowing through the program, which brings me to the next topic of learning.
2. Learn How Data Flows
All software programs take some input data, manipulate it, and output some result. Input data may come from a file, a web server, or direct user input. Similarly, the output may be written to a file, sent to a server, or simply displayed in front of the user.
For a simple software program, these three steps will be small and simple, e.g. read data from a file, combine some values, and output the combined values to the user. As a software developer learns more, they'll be able to handle data from multiple locations, perform complex manipulations, and output multiple results to multiple locations.
The main role of a software developer is to leverage the syntax of their language of choice to manage the vast complexity of the software they write. This is the hardest part of programming and something that programmers continue to learn, no matter how many years they've spent programming.
Certain languages and tools are more fit for certain kinds of manipulations. For a beginner, they need to first learn one language well, so they can discover what it's good for, before branching out and discovering new tools.
Nowadays, programmers don't fly solo. No matter what language they're using, they're standing on the shoulders of the giants before them who built these languages and designed these toolsets.
3. Learn the Context
The software one writes executes against some compiler or interpreter. Usually, this execution context provides information about the computer the code is running on, access to the filesystem, access to the internet via HTTP, etc.
Depending on the language and the environment that language is executing within, these contexts can vary greatly. Initially, programmers will discover this context one Google search at a time, but eventually, they'll start to be able to visualize the context itself. A more experienced programmer will actually browse the documentation for their context of choice and further discover more details about their tools.
Although I've only used "context" to mean the literal execution environment, I think it also includes third-party libraries from sites like GitHub, which provide readily available, open source code anyone can use. Knowledge of these free libraries can greatly increase the efficiency and capability of a software developer.
Learning programming is hard. Building a foundation of knowledge takes time. Grouping one's learning into syntax, data flow, and context can help them build a sturdy foundation and grow their skills more quickly.