How to read a programming tutorial
First pass
In the first pass you skim. The goal is to determine if the tutorial is really worth your time, so what you are looking for is:
- Does the tutorial really teach what you want to learn? The last section in the tutorial sometimes includes a full program listing for the programming language/concept you are trying to learn. This should give a hint to if the tutorial will be helpful to you. Sometimes it's just more efficient to copy that last section of code into your program and start to tinker with it.
- Do you arrive at the conclusion in an efficient manner? Some tutorials spends the first third teaching you to set up your tools in minute detail. These descriptions are often better to read at the website for the tools in question, where they are hopefully kept up to date.
Second pass
Now that you have decided that the tutorial probably is not a complete waste of time, you should read the whole thing again from start to finish. The goal of this pass is to get the key concepts of what you are about to learn. Notice:
- Things that seem to be described in too much detail. If the author of a tutorial takes time to spell things out its probably because that thing is commonly misunderstood
- Things that are described with very little detail, but seems to be non-obvious. These are probably things that are so fundamental to the language or concept that you are trying to learn that experienced users tend to forget about them.
Read all the code and try to follow along, but don’t worry too much if you don’t understand everything
Third pass
The third (and final) pass is all about the code. Type out all the code in the tutorial on your own computer and compile it/run it as much as you can. Don’t copy/paste code, this will teach you nothing. Change things. Notice what changes you can do that matters. If the tutorial only shows REPL based interactions, try to do the same thing in a text file. If you come across code that doesn’t run or compiles on your machine, try to figure out if the code is valid or if your machine is not set up correctly. Code in tutorials very often have errors