get a base knowledge, and then once thats done start a project you're passionate about.
That's the best way to learn imo. There's so many online resources that when you get stuck you can easily google and figure out the answer/clues to it. Also, problem solving is what Computer Science is all about, so the sooner you start doing that, and get off the mindless "OK! Now, type a for loop in python!" (IE codeacademy) the better off you will be.
You're going to have places you get stuck and you just won't know what to do. They're going to happen often at first, but as you get better and know more of what you're doing, it'll happen less often. + You're going to be building something you love, which probably means you're going to like it.
So to start off, if you don't have any previous programming experience here's what I would do:
1. Choose a language you are interested in like.
This really doesn't matter. People say it does, but it really doesn't. If you can apply yourself, take initiative and learn one language on your own, whether it's C, C++, Python, or, hell, Haskell, you'll probably do fine in the long run. Of course, if there is something in specific you're planning to do in the future with coding (like if you wanted to learn Web Design I wouldn't recommend C)
then language matters. But if you're coming out of a purely interested perspective, choose whatever interets you the most.
2.) Get a programming book on the language
You can use this to learn the language, or just as a reference throughout the use of the language. I would use it more as a reference, because, personally, learning straight out of a book for me is boring and I'd rather learn by doing.
3.) Get the basics down.
You're going to need to learn the basics of Computer Science. If-Else Structure, Objects (if you're doing OOP) variables, types, syntax, stuff like that.
Personally, I think spending a solid amount of hours building something using
http://snap.berkeley.edu/ is a good idea. Just for the concepts. Build something you like, figure it out. I recommend this because everything is in Blocks, which means there's no syntax to worry about. This lets you focus totally on just learning key concepts in Coding that are going to help you
tremendously on the way. I've tutored Comp Sci before, and 90% of the students struggle aren't concepts, those are easy. It's syntax. But applying Syntax and Concepts at the same time can be confusing, and fuck you up on the concepts so much you don't even know what's real anymore.
TL;DR Get basic key concepts down.
4.) Get the syntax down on the language you're trying to learn.
This is the ONLY thing something like codeacademy is good for. Syntax. It
sucks at EVERYTHING else. Mark my words. you will NOT learn coding just by going through every codeacademy course. If you have a background in Comp Sci and are learning a new language, and all you want to do is learn the syntax of that language, then codeacademy works. That's the only thing Codeacademy is good for. Learning syntax. Keep that in mind.
5.) Start building what you love! You will struggle along the way, but it's going to be worth it. After a time, once you see how far you've come, the feeling will be aweomse and you're going to get addicted to programming just like the rest of us.
Disclaimer: This is just my preferred method of learning. Sure, you can sign up for Coursera or something and take MIT's intro to coding courses. But that's boring, requires more discipline, and doesn't play off interest. I rather dislike traditional courses and opt for a more personal approach. This allows for flexibility in that one can curve the learning in such a way it helps them the most.
That's my two cents!
Good Luck! I'd love it if you updated us on you're progress throughout. Maybe even throw a problem or two you encounter on Coding and we can help you