Oh, I do! I mean not all the time, but if I have a particularly hard problem I'm working on, pencil and paper and coffee in the morning help me work it out. You're not going to write out pages and pages of code, obviously. But there's just something about scratching out the algorithm or sketching a design freehand on paper that helps my thinking process.
Bonus: I don't tend to need to rely on IDEs writing code for me. And Whiteboards don't scare me in the least.
Some of the best code I've written has also been in an exhausted/ not-fully-awake state
The coding proper can be done in a less vigilant state: it is like laying bricks or folding napkins. The hands know what they are doing. (Exaggerating here, but not too much. God knows I have coded tired or drunk or stoned, and not even my worst work.)
I so wish I could code stoned. I've never been able to in any meaningful way. I don't code inebriated anymore, but in my twenties it was preferred. These days I think my brain basically responds to inebriation of any sort as "why are you still working while I'm trying to enjoy myself?".
It was something I had been considering, analyzing, debating and discarding as impossible for several weeks prior to that. Then when it came down to it, not only was I able to implement it, but it worked perfectly for more than 6 years before anyone was able to improve on that design.
I attribute the success to two things: (a) the fact that I had done a lot of analytical work beforehand; (b) the inhibition-lessening effect of alcohol that allowed me to enter the zone and implement the solution without worrying about complexity or other external factors.
Once the core idea worked - and worked it did! - all that was left was to revisit it the next day, sober this time, and fix the remaining issues, documentation and tests.
The secret might have been, all along, wake up late, arrive at work shortly after without doing much in between[1], and start designing already while commuting.
Notably I've been able to achieve a little bit of the same while half-falling asleep, with the added caveat that it requires jotting down good ideas for the next day. And they may be not quite discernible the next day.
Bears repeating - not quite the best code, but certainly the best functionalities.
--
[1] breakfast before work is a productivity killer
Herodotus, allegedly
Intentionally, yes. I couldn't find a definitive translation that I liked. Here's another take:
"They [the Persians] are accustomed to deliberate on matters of the highest moment when warm with wine; but whatever they in this situation may determine is again proposed to them on the morrow, in their cooler moments, by the person in whose house they had before assembled. If at this time also it meet their approbation, it is executed; otherwise it is rejected. Whatever also they discuss when sober, is always a second time examined after they have been drinking."
I really just wanted to riff on the subject of involving alcohol in decision making.
An idea similar to "write drunk, edit sober".
These activities, since they are so different in nature, are best separated in time and space and tooling.
I produce in the early morning, sitting at my dining table in the living room, using a pen and paper. In the early morning your dreams still linger and your critical faculties are not yet fully awake. This makes it an ideal time for just producing stuff. I take this seriously in that I do not even allow myself to cross out words. Just keep on writing, and sort it out later. Later on the day I edit, sitting in my study and using a text processor.
As a side note, I would not recommend this practice for writing code.