From Alex I discovered the serious game Untrusted by Alex Nisnevich. This puzzle game asks you to edit Javascript in order to solve puzzles as a way of learning to think like a programmer. You can read about the game at Games with Purpose – a site that is gathering serious games.