Learning to code is one of the most challenging things to learn out there, so knowing how you learn is the key to you actually learning. The media is filled with stories of “whiz-kids” who just learned on their own ever since they put their fingers on their very first computer at an early age. Yes, some people learn by just tinkering with whatever is in front of them, but that doesn’t mean that is the way to learn for everyone.
There are also a lot of academic learners out there – people who are good at learning based on the school system. That’s right, school just provides one method of learning that is not correct for everyone (that is why only a few kids make the Honor Roll). People just learn differently, and the school system way of learning might not be the way you learn. If you have always done well in school, I highly recommend you take the free online Stanford 106A course to learn to code, as it is tailored for academic learners.
Other people I know learned to program just by reading a big book on a programming language and figuring out the rest. That is a legitimate way of learning, and if that is how you learn, get a programming book for the language you want to learn, and start learning!
Figuring out how you learn can be a bit of a challenge for many people. That is because most of our lives, we are forced to accept the official “academic” way of learning through school. If you’re serious about learning to program, try out different versions of the same class, either by reading a book, taking an online course, taking an in-person course, just starting to program and googling things you don’t know, and see which method resonates with you the most. Once you find it, you’ll know it, because you won’t be able to stop learning 🙂