I wonder if you could teach people to program by including programming as part of a game's mechanics. For instance, imagine that you have a game centred around magic, but that magic is cast by means of program-like spells written on scrolls. In order to cast spells for whatever purpose, you need to be able to write a kind of program that does what you want on a scroll. The game would have to teach you some of the necessary skills, of course, and there's still the matter of making sure it's fun.
Mokalus of Borg
PS - I am, of course, not a game designer.
PPS - So I may be way off base here.