Watching Someone Code Is Not Learning to Code
I write programming books, so you already know which side I am on. I will try to be fair anyway.
I have watched a lot of programming videos over the years and I have even posted some of them here, like the Stanford iOS course and an MIT lecture on the Fast Fourier Transform. I am not against videos. I want to write about one thing I keep noticing, in myself and in other people.
It feels like learning Link to heading
You put on a tutorial. The presenter opens an editor, types a few lines, explains them, runs the program and it works. Then the next part, and the next one. Every step makes sense. After forty minutes you feel like you understand the whole thing. Then you close the video, open an empty file and nothing comes out. Following an explanation and writing the code yourself are two different skills. A video is very good at the first one. It does almost nothing for the second.
The video does not wait for you Link to heading
The presenter decides the pace. You can pause, of course, but you rarely do. The video keeps going, so you keep going, and the parts you did not quite get go by along with everything else. A book stops when you stop. If I do not understand a paragraph I read it again. If I still do not get it, I type the code and see what happens. Nothing moves until I move it. It is slower and sometimes annoying, but that is where I actually learn things. Books can be read passively too. I have read whole chapters without keeping a single idea. But it is harder to fool yourself with a book, because when your mind wanders you notice that you have read the same page twice.
You never see the hard part Link to heading
Most tutorials show the happy path. The presenter already knows the answer, so the code goes in the right order and compiles at the first try. If it did not, that part was cut. Real programming is mostly the part that was cut. You get a compiler error you do not understand, you try something and it fails in a different way. Watching someone skip all that can leave you thinking that programming is mostly typing. Books are not innocent here either. I complained about toy examples in Why Most Technical Books Fail. But a book can at least stop and talk about the error, or print the output and explain why it looks wrong.
You cannot grep a video Link to heading
When I need something from a book I go to the index or search the PDF. It takes seconds. When I need something from a video I remember that it was “somewhere in the middle” and start dragging the timeline back and forth. Text is also easier to keep up to date. When Zig 0.16 changed how I/O works, I went back and rewrote some of my Zig posts, like the cat(1) implementation. Fixing a code listing takes minutes. Nobody re-records a three-hour video because one API changed, so the old video stays online and keeps teaching the old way.
Where videos are good Link to heading
I like lectures by good teachers. The MIT lecture I mentioned explains an idea, not a list of keystrokes, and it does it better than many textbooks. Good conference talks are similar. Videos are also good at showing things that are hard to put on paper, like how an experienced developer uses a debugger or reads a stack trace. You pick up small habits by watching someone who already has them. What I would avoid is using “build X in 30 minutes” videos as the main way to learn a language.
A simple test Link to heading
Whatever you use, try this. After a video or a chapter, close it and write the program again from an empty file without looking. If you can do it, you learned something. If you cannot, you only watched it, or only read it.
Last year I wrote about books and AI in Why You Should Still Buy Programming Books. Most of what I said there applies to videos as well.