Here, we’re going to cover picking a good environment, picking a good project, and picking good beginner resources.
As with so many things, if you pick a good set of tools for a task it’s much easier to accomplish. From the very outset you’ll spend less of your time shoring up weak points, and re-doing things that weren’t done correctly.
In the world of software development, the primary tool is the Integrated Development Environment, or IDE. It can be tough for beginners to know how to pick one, but in general you expect an IDE to 1) support the language you’re interested in, to have syntax highlighting, to have at least some minimal debugging tools, and to have some version of code completion so that you’re not constantly typing out full commands.
As I am constantly pointing out, coding is the kind of skill which is best acquired by doing it as much as possible. Maintaining motivation and focus during the learning process is better served by finding projects you’re interested in.
When you’ve got a basic handle on the language you can start choosing domain-specific tasks. If you’d like to go the web development route, consider building a simple browser game that pits a user against the computer in a game of hangman. If you are more interested in artificial intelligence you could do the same thing but use tic-tac-toe instead of hangman. Though tic-tac-toe is very simple it represents a non-trivial programming challenge.
If data science is more your jam, why not make sure you can normalize an array of data points and calculate summary statistics for them?