I definitely agree with Washu that tutorials are kind of a dangerous fad that harm the learning process. As usual, though, there is even worse. One particular breed of tutorial is so vile, so addictive, and so deceptively simple that it poses a real threat to beginners everywhere. That threat is the source code tutorial. Usually these tutorials are comprised largely of code, with every line commented whether it needs to be or not, and they have little or nothing of substance.
So, what makes source code tutorials so bad? Obviously they get copy-pasted into beginners' code bases frequently, but that's not the only reason they're problematic. They detract from the subject at hand, which is the concept that is supposed to be conveyed to the reader. The focus is shifted away from understanding what is going on and why. Meticulous attention (in the form of a comment or several) is paid to silly things, like why a variable is declared the way it is, and the bigger picture is lost in a sea of implementation details. The code and the concepts are combined in a tangled mess, and the accompanying comments by their very nature are vague and ultimately useless. Worse still, code instills a feeling of a single Right Way to do things. While it's certainly a comfortable position for a beginner, it's not a good one, and the problem is exacerbated by the fact that most tutorial code is pretty badly written to begin with.
Consider this very short, simple snippet from a certain well known OpenGL tutorial site:
glGenTextures(1, &texture[0]);// Create The Texture
// Typical Texture Generation Using Data From The Bitmap
glBindTexture(GL_TEXTURE_2D, texture[0]);
Two short lines of code, which form the fundamental basis of texturing in OpenGL. Yet the comments are utter trash, and the code itself conveys no useful information to a beginner. What is "Create The Texture" supposed to mean? Does it load data from disk? Does it allocate space in graphics memory? Does it send data to the video card? In fact, it does none of those things. The second comment carries a lot of similar implications, all of which are also completely wrong. It doesn't even begin to suggest that it sets the value of a particular state in the internal OpenGL state machine, which is what the second function call actually does.
What a lot of beginning and intermediate programmers fail to realize is that code is not a medium for conveying ideas. Code is little more than a crude tool for making the computer do what we want. We use comments to keep ourselves sane in the process, but you can't use line by line comments to explain how a system works. The scope is too narrow, and most of the details are irrelevant to the question at hand. Well written code is usually obvious to anyone reading as long as they are familiar with the algorithms, data structures, and other concepts involved. (Often, even familiarity with the programming language in question isn't needed.) A tutorial should focus on explaining those concepts, preferably without any code whatsoever. If someone truly understands what the tutorial is trying to teach, they won't need any code in order to write it on their own.
What do you think of things like the DirectX SDK samples? They all come with a "whitepaper" explaining what the general idea/concept/method is, but for the most part they are source code "tutorials" (I see it as a minor thing to argue between calling it a "tutorial", "sample" or "example")...
I quite like them (as well as other open-source graphics/technology demos) as PART of my learning toolkit [smile]
Jack