Some time ago I received an email asking if I had any opinion on how to enjoy writing papers. That's a tough question. We usually fumble trying to come up with a good problem, struggle while having some fun formulating a good conjecture, delight in trying to solve it, and finally have a painful time writing the resulting paper. How can we make the writing stage less painful?
One thing I learned recently about this, is that it is not a good idea to try to fit writing into the cracks of free time, and not to delay until the environment is not favorable to problem-solving. I had one visitor come for a month -- four weeks: we spent three weeks plus a little bit working on formulating and solving a problem, then he declared, to my surprise, that he would spend the last three or four days of his stay writing up what we had done. It was the right thing to do, of course. For busy people, it's a really smart idea to plan significant time for writing hand in hand with problem-solving!
Another thing I learned is that giving talks helps while writing. It helps clarify one's thoughts and maintain one's interest.
Ideally, I suppose that with self-discipline one would maintain writings of one's work during the process of doing the research, but it's real work to incorporate a day's discussions in a file in an intelligent way, synthesizing it with previous notes and remarks so that the file does not grow out of bounds in a chaotic manner. Still, my impression is that writing is more fun if it happens at the same time as problem-solving, in spite of knowing that everything will probably need to be rewritten at some later time.
Are there good tips from the world of programming? Not tips to write well-organized, coherent, clear papers, but tips to write in a way that keeps that activity enjoyable (or at least, enjoyable to some degree) at every stage.