Combine Glass with the Thalmic Myo https://www.thalmic.com/en/myo/ - an armband which detects muscle contractions, so you can just twiddle your fingers in the air (or make other hand/arm gestures) to type.
But the main problem I see is to follow a page or two of code/text at the same time as the external world. You probably would have to use "Steve Mann style" opaque glasses and projecting camera output on them, with intelligence for when more world interaction is needed.
(Sorry for being late, I was off for a language lesson.)