...or he could try to learn something. One does not pick up a book that proposes to teach something without intending to learn it. To that end, this example is comletely justified. "You can't know where you're going if you don't know where you've been" applies here as well. Now, if he was trying to use this as actual code, I'd say use the pre-rolled solution. That's not the impression that I got here.