It really depends on what your goal is. "Learning to program" is extremely broad, ranging from "barely enough to be a hobby" to "this is a useful tool in my toolbox" to "this is my decades-long career". If I were going to teach someone programming, I would start with the basics and then branch depending on what the student's goal is.
The basics - learn the building blocks of programming as a means of solving problems and how to translate the desired answer to a problem into a way that the computer can understand. This means understanding what a loop is, how conditions work, and how the computer understands instructions. One can learn this from most online tutorials or classes, and should be able to break down a human answer into a set of computer-understandable commands. The student should be able to have a functional (if basic) vocabulary of programming terms and should be able to form coherent and correct solutions to do the processing they wish the program to do for them.
After that, it depends on what the student wants to learn. If the student wants to make her own game, we can focus on lighter weight gameplay and the tools needed to build the game out. If she wants to focus on a specific field (e.g. gameplay, networking, tools, graphics, etc.) then we'd focus on that specific field. If the student wants to get a job in the field, then we'd focus on data structures, performance, and common test/interview questions.
[Join us on Discord] and/or [Support us on Patreon]
Got a burning question you want answered?
- Short questions: Ask a Game Dev on Twitter
- Long questions: Ask a Game Dev on Tumblr
- Frequent Questions: The FAQ