I came across an interesting website the other day called Code Combat. The concept is that you can learn to code not by solving traditional programming challenges but as a way of controlling a character in a dungeon quest with cartoon graphics. It is a fun idea and I would have been all over it as a teenager (at least if the web had existed back in those days).
I’ve played the first few levels and I can see that it has potential. One of the drawbacks might be that programming is a considered, logical exercise and Code Combat seems to have a certain frenetic quality to it; there is a multiplayer mode and I’m not sure that typing the command to hit something fast and repeatedly really develops skills in the nuances of real life challenges. Also, you can only get a very limited way before you need to start investing real life money to unlock new levels and in-game equipment. That might be worthwhile if it allows a novice programmer to build some useful skills but does make it hard for me to evaluate in a meaningful way.
Worth a look though, even if you only take on the free (and, to be honest, really quite easy) levels.