My pet peeve is books that show the wrong way to do something followed by the right way. If I'm new to a language, I haven't committed these sins yet, so please just skip to the preferred method. All this does is add mental overhead.
It seems to be not only programming language books' fault. And not only books' fault. Even teachers at schools and universities sometimes show wrong way of doing something.