The best piece of code I ever wrote was on a cross country flight. It was an integral piece of the project I was working on, and in a span of about 2 hours I had greater productivity than in most of the rest of the year put together. Of course, that was a long time ago before coach seats got so small that sitting comfortably let alone working became out of the question.