I put a lot of blame on programming book publishers. I think my SQL book is awful and I'm not alone:
Amazon product
It's possible even a hack can teach if they're working from good curriculum material that the student can easily reference and not find massively confusing. Good publishers will also include supplemental online material.
Ultimately, I get the feeling that teaching programming from books is kind of absurd and slow. Books are probably better as a reference for experienced people who know specifically what they're looking for in one of those In A Nutshell O'reilly tomes.
I remember when I did my remedial Algebra for college and refreshed on a computer based system called MyMathLab. Something like that would be a big help to people learning this stuff. Code Academy sort of does it, but I feel their system is more for testing than teaching or reference.