Learning to code doesn't mean learning lines and lines of code, though it can lead to that. Rather there are a lot of different tools out there to introduce students programming and to work with modules to create interactive tools and even games. I rather like Hopscoth for the iPad and Scratch for the desktop (though ScratchJr is available on the iPad.) I have used this as a gateway coding tool for my high school students. Our next step is to work with Tickle to program the Parrot drone we have in class and to work with our Sphero as well.
WHEN, WHEN, WHEN:
Teachers are introducing code as early as 5 year's old. I want to take up that challenge and introduce Hopscotch to my kindergarten-aged son and see what he can do with it.
I teach high school so I have found that Hopscotch gives them the itch to learn more. They like the interface but want to work with more sprites and give them more options to do different actions.
So basically, introduce code as early as you can. Kids love to explore and when given an environment that is intuitive and fun, they can easily get hooked.