Isn't that how people who have been programming a fair amount of time do it?
Or do they buy new books every time they're interested in a language?
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.