This is why trying to learn a programming language using Google searches and skimming reference documentation is a bad idea.
Learn by book: get the information you need organized in a sensible fashion by someone who's an expert on the subject.
Learn by taking a course from an expert: all the advantages of learning by book, plus you get answers to your questions that may not be covered in the text, quizzes to reinforce what you've learned, practice exercises, etc.
As for what I use to get to the point where I can write code? Code written by others, in snippet form, as an example, or part of a full app.
That's true if the book is any good--I've read far too many tech books with little semblance of editing or organization.