I can’t recommend Harvard’s CS50x Introduction to Computer Science enough. You can audit the course for free via edX and earn a certificate by completing all the assignments, or you can go at your own pace and watch all the lectures posted on Youtube. You can build your own DIY college-level computer science program with this selection of fifteen online courses (many of which are also listed in our Lifehacker U series).

Also, something that I've found is that if you go wrong somewhere instead of mindlessly searching for the error (assuming there are multiple or you don't know the error's location) just start from the beginning and go down seeing that if this works. If you see a break and something disconnects, in all probability that's where the error is. It's all logic.

Coding games are also a fun way to get your feet wet in programming. If you have an hour to kill, you can give the simple Hour of Code games a try. Additionally, many schools already use the Minecraft: Educational Edition to teach kids programming basics with coding blocks, and even JavaScript. (You can download this version of Minecraft for free if you have an Office 365 Education account.)

The programming community is full of people who are willing to help the next generation of programmers. GitHub, the online hangout for developers who use Git to manage their coding projects, is designed for online collaboration. Not only do developers host and share their projects with their peers, they also provide code feedback and general advice to the community.
Skillcrush’s Free Coding Camp is our totally beginner-friendly intro to tech, techies, and kick-ass careers that you can complete in less than five minutes a day. Delivered straight to your inbox, you will learn how to code in the simplest terms possible—and even get to try writing your own code!—so you can see if learning coding is the right move for you…
Here you’ll learn HTML5, CSS3, JavaScript, Databases, React.js, Node.js, and others by networking and joining this nonprofit's community of professionals and students. You’ll even work together on your coding skills so that you can build apps for free. Here’s the catch: You’re learning those skills and building helps to help solve real-world problems. Code is available to nonprofits.