Any child who would try to learn to communicate with the English language by reading the dictionary would be considered insane. Is learning words important? Sure, but a dictionary won't teach you which words are common and understood by the majority of people, how to structure sentences, how to put together coherent thought, etc. These things are learned not only by learning words, but also by learning via reading and writing sentences, paragraphs, and books.
Furthermore, you don't need to know every word in the English language to communicate with it. So long as you recognize that the words that come to mind are not sufficient for getting the point across, (or, in this case, that you need to find a function or chunk of code to accomplish something,) then you're fine. You just have to go hunt down that word, or, in this case, the appropriate function or code snippet. It is much better to only know 50% of words in the English language, but be very proficient in using a dictionary, using a thesaurus, or other method of search, rather than to know 75% of all English words.
Even if you spent your entire life trying, you could never memorize the definitions of 5,000 words if you simply tried to memorize them, but when the 5,000 definitions are a part of a network of interconnected knowledge, learning the definitions of 5,000 words is easy; in fact, we probably know that many by the time we're 13-15 -years-old. Mastery of one topic often requires adeptness in other related topics. You can't fully know how applications work unless you know quite a bit about operating systems, drivers, and hardware. Trying to memorize thousands quirks and details is futile. Through conceptual understanding, however, we can easily deduce thousands of details, almost all unconsciously or otherwise unforeseeable.
That said, you should fully understand code examples when you are reading about them, but complete and permanent retention of every parameter, etc. is a waste of effort. Probably the best way to learn would be to read the topics and code examples in the book, and then code them yourself. After a while, you'll have a large library of code that you yourself wrote, which you can read at anytime, and you'll have a better understanding of it because you actually wrote it down, instead of just reading it.
It is also perhaps possible that your friend is completely lost and struggling to understand what numbers are going where, how they're being calculated, manipulated, and used, how everything is fitting together in the grand scheme of things, etc. Understanding that is important -- that's part of the conceptual understanding -- but if it is just an exercise in tedium, then he's wasting his time.