The original Learnable Programming article is a response to the work that we did in building the Khan Academy Computer Science platform - which is exactly that. An educational real-time environment for writing and manipulating code: https://www.khanacademy.org/cs