A lot of beginners ask the question ‘what is the best way to learn programming?’. And for good reason too, since there is truly a multitude of different ways to learn programming. Books, videos, classes – the list goes on.
There’s not necessarily a best way though – every method has its pros and cons. However, most coders have a preferred way of learning programming that works the best for them. I do, and you probably do too.
So in this article, I’m going to present a breakdown of 7 different ways to learn programming, and the pros and cons of each. At the end, you can make up your own mind which one is best for you.
1. A Good Old-Fashioned Book
You might think that most books and text books on programming would be outdated, but in fact new ones are still being published today, and there are a lot of good, useful ones. Don’t underestimate the value of a book.
Most books can be purchased on Amazon in e-book form, or you can have them delivered to you in physical form. Some e-books are even free.
Pros
- You can be sure you’re getting your information from a trustworthy source. You can also read the reviews if you’re doubtful.
- Books are often complete guides to their topic, telling you everything you need to know.
- There are plenty of books on every topic and code language. Finding a good one won’t be a problem.
Cons
- A book isn’t going to update itself when its information changes.
Where Can You Find Books?
Here is a selection of all the programming books I recommend for learning to program and developing your programming skills. I’ve done all the hard work of finding the books, so you can focus on learning.
2. Hands-On Exercises
This method is practicing coding techniques and concepts by trying them out yourself. In other words, learning by doing. And just like any other method, it has its pros and cons.
Pros
- You can make sure that you fully understand each concept. When there’s no obligation for us to try it out, it’s easy to just say, ‘oh, that’s nice’ but then subsequently forget about whatever it is we were meant to be learning. Learning by doing allows us to cement our skills.
- Learning by doing gives you a proper feel for what writing code is like. This way, when you want to embark on a project, you’ll already be used to the coding process.
Cons
- You’re not always going to understand every concept from the get-go. I’ve found that when I’m being asked to write some code, but I don’t have a clue how to write it, this method can get very frustrating.
3. Video Tutorials
When we talk about video tutorials for writing code, there are two main formats. One format consists simply of a screen recording, typically with the teacher’s narration explaining their code as they write it. The second format is a combination of screen recording and face-to-face video.
Pros
- Unlike hands-on exercises, where you’re the one writing the code, with video tutorials you can see the code being written as it’s meant to be written. There’s no learning curve – you see how to do it the right way from the start.
- In videos where the teacher appears on camera themselves, you’ve got the element of human connection. This is great for staying interested and motivated.
Cons
- There’s not always a ‘test’ accompanying a video tutorial, so you can’t always check to see if you’ve got the concepts right.
Where Can You Find Video Tutorials?
Video tutorials are my preferred way to learn programming, and they’re abundant on the web.
Treehouse is a great online technology school I use that combines video tutorials with hands-on learning, so you get the best of both worlds. Here’s an example of a video tutorial from Treehouse:
4. Text-Based Tutorials
Text-based tutorial websites have been around since the start of the internet. Some are step-by-step tutorials, others take more of a reference approach and some simply explain their topics in general.
Pros
- There are so many websites featuring text tutorials, on all kinds of code languages. Finding one will never be a problem.
- Being able to read the content is an advantage if you like to be able to go over it carefully and refer back to it.
Cons
- Of course, due to the high volume and how easy it is for anyone to create a website and put up a tutorial, this also means that there are a lot of sub-standard and outdated tutorials you probably shouldn’t follow.
- Like with video tutorials, because you’re not necessarily practicing, the learning might not always stick.
5. Challenges/Games
Code challenges and games are another form of ‘tutorial’ you can find on the internet, for those who like their learning to be a bit more fun.
This category ranges from code challenges based around a discussion board, right up to fully-fledged games.
Pros
- Code challenges and games are great if you’re losing interest and want some more fun.
- Also, because there are other coders writing the same code, you get to see all their different methods and perspectives. You can have them critique your code, and look at theirs to see how they did things.
- For the same reason, you get to meet lots of other like-minded coders.
Cons
- If you restricted your sources for learning to code to just challenges and games, you probably wouldn’t get as full of a picture of whatever topic or language you’re studying as you would if you took a conventional tutorial.
- Some people might even find this format distracting.
Where Can You Find Hands-On Exercises?
I don’t think I could talk about challenges and games without mentioning Code Avengers. It’s a fully-fledged game that teaches HTML5, CSS3 and JavaScript, and runs in the browser. I haven’t tried it out myself, but I keep hearing about it everywhere, so I recommend you check it out.
Google Code Jam is one high profile code challenge, but challenges can be found basically anywhere where there’s a discussion board.
6. Class or Workshop
Attending a programming class or workshop in the flesh is the traditional way to learn code. Just like any other way, it has its pros and cons.
Pros
- You can ask questions and interact with the teacher – something you can’t always do on the internet.
- Like code challenges, you can meet other like-minded coders this way.
- It’s very easy to get coding help.
- Like books, classes are complete guides to their topic.
- You’re less likely to get bored programming.
Cons
- You can’t go back and refer to a class, like you can with a website (unless you recorded it).
- Finding a class is never going to be as easy as finding a website.
7. Coding in the Deep End with a Project
I like to recommend this a lot. Jumping into the deep end and creating an application or website may scare you at first, but it’s really not so bad. All you need to do is brainstorm some ideas for programming projects, pick one and start coding.
Pros
- You can often learn more from doing a project than from a tutorial, and the learning will stick.
- You get a feel for what real coding is like – not just completing exercises.
Cons
- There’s not much you can do unless you already have a solid foundation with the languages you’re using.
In Conclusion…
In my case, video tutorials are my preferred way, but that doesn’t mean you have to agree with me. Every way has its pros and cons, and you’re welcome to make up your own mind on which is best for you. There’s no right or wrong answer.

