From The Next Web: Microsoft Research today launched Code Hunt, a browser-based game for anyone interested in learning how to code by playing. The premise is straightforward: the player must write code to advance in the game.
The built-in tutorial introduces you to the game:
Greetings, program! You are an experimental application known as a CODE HUNTER. You, along with other code hunters, have been sent into a top-secret computer system to find, restore, and capture as many code fragments as possible. Your progress, along with your fellow code hunters, will be tracked. Good luck.