I'm new to the development thing, and I've been working through The Odin Project, a wonderful free resource that takes you from zero to a junior level developer in the context of web development. I might not know a lot, but I've been hanging around the community Discord server and a lot of people are constantly asking about code-along videos.
A pretty standard exchange goes something like this:
SomeUser: Hey I want to learn <some language or concept>, what's the best way to do that?
OtherUser: You should look up a few videos and follow them to build something. You'll learn a lot!
Now, let me be clear from the top: I believe code along videos have a certain value. They are invaluable for folks that already know what they're doing. These types of videos can introduce the viewer to some pretty complex things, and if you already know what is going on, there is value in the format as a quick introduction. The critical difference is that for someone with experience to fall back on, they can figure out what's what pretty easily.
If you're still very early in your journey, a code along video is probably not ideal for your learning. The main reason is that you'll be lacking the wealth of experience and knowledge to really understand what's happening.
Let me get into this by way of example.
I followed along with the video and nodded along, just typing into my own IDE what was in the video. Oh yeah, this is cool, and look at me build this thing! I finished the project and it worked as advertised, so I thought to myself, "Good job! You did it! You made this!" I'm sure you're all familiar with this meme and in the moment, that was me. I had dilluded myself into thinking I made the project.
The truth is, in that moment, I was suffering from the illusion of competence. The tutorial I had just watched gave me everything to succeed, and as a consequence, I didn't engage with the material at all. And why not? The solution was right there... even if I had wanted to come up with my own solution or next line of code, the temptation to just move along in the video was too easy to succumb to. The answer was just 1 second away! Sure, I had something to show for it at the end of the video, but did I really know and understand what the event handler was doing? (Narrator: He did not.)
There's a lot of research about this phenomenon called the illusion of competence and it can be a deadly menance when it comes to learning anything, but it is especially harmful for learning how to flourish as a developer. When you have the answer given to you, or you think you already know the answer, then you don't get the chance to really enter the second stage of competence by trying to solve the problem and failing. So, you finish one and look for the next great tutorial that will ~teach~ you something. But the results are the same, because tutorials almost always walk you through everything step by step. Some folks sometimes call this treadmill of tutorial videos tutorial hell.
Let me repeat this again, video codealongs do have their place as an educational tool but this place, in my humble and noobie opinion, is once you've got a solid foundation in programming and are looking for a refresher on a topic you haven't touched in a while, or to figure out how to do something in a lanaguage that's new to you.
My advice for those starting in their journey to learn how to write software?
Take your time. If you're in a hurry, you'll be prone to take shortcuts and fall into the illusion of competence much more easily. One way to avoid this is to give the material, concept or problem the time it deserves.
Don't be shy about asking for help in a thoughtful way after you fail or get stuck. Sometimes, you can figure a way out on your own, but if you feel like you're really stuck, asking thoughtful questions about your problem can often push you along the right direction. In this way, it's important to ask about your problem, rather than asking for a solution. It's the same problem: get given an answer, and you'll likely end up here again.
When you're just starting your programming journey, code-along videos can seem like the best. You learn something, and end up with a project at the end. It really does feel like you can learn anything and everything this way, but just remember that the illusion of competence is a thing, and be extra careful to test your knowledge as you go!