The best way to learn programming for beginners is by writing games. You will understand programming faster because you’ll focus on the language concepts essential for game development, such as graphics and animation, input handling, AI (which doesn’t apply to game development), object orientation, audio, and physics simulations. Your motivation will be high because game development is fun. Finally, you’ll learn faster because you can do much more than simple console applications, which are boring after the first couple of tries.

You might think that game programming is difficult for beginners, but actually, all you need to know can be taught in a few hours. A few days later, you can create your first game.

The only prerequisites are Windows (all modern PCs have a window preinstalled) and a text editor. You don’t even need an IDE because it’ll be easier to learn programming by typing code rather than clicking around in menus and buttons with the mouse. Later on, of course, you’ll want to use an IDE, but in the beginning, stick with a text editor.