i mostly agree with this. the way you learn how to code is the same way you learn anything else: by doing it. that is, you want to know so bad that you try to do it or someone forces you to do it. that's 80% of the battle.
mentorship, tools, and pedagogy (and badges!) probably make up the other 20% of the battle, though. codeacademy fits there. i don't know if what they have is effective or not, but surely they are smart enough to know that whether their courses are effective is very important to their business. hence, they will tweak, iterate, and improve to enhance that.