This reminds me that I once made a stupid game where you type code scraped from random github repos. The goal is to predict the next character that will appear. The premise being that typing real code, and consciously trying to predict what will come next, forces you to quickly learn the syntax and style of a new programming language.
http://houshalter.github.io/perplex/perplex.html