How to make programming lectures more effective and stimulating?
Re: The desire for in-class exercises (code "on the spot") -- One thing I've discovered this semester (teaching introductory C++ out of the Gaddis textbook) is the idea of laboratory exercises with mostly filled-in programs, where the students only need to add a few lines involving the new language structures that you just lectured about. Compared to "write a whole program right now" exercises that I'd used in the past, this goes down remarkably well; fits in the right time slot for everyone, gets their hands/eyes to have typed that structure at least once, raises up the salient points/difficulties of exactly that one topic, etc. 

The fill-in lab exercises I'm doing come directly from the Gaddis instructor materials, so that eases my workload a lot. Frankly, I wouldn't have expected them to work as well as they do, but every day there's an important teachable moment that emerges organically. Not a silver bullet for everyone, but it's kind of been a revelation this semester.