I try to write everyday. I do that much better over here than when I'm teaching. I always rewrite, usually fairly close-on which is to say first draft, then put it aside for 24 hours then more drafts.
It's quite similar to guitar solos, only with programming you have to use your brain. The most important thing is that it should have some emotional effect on me, rather than just, 'Oh, that's really clever.'

