"A man is not idle because he is absorbed in thought. There is a visible labor and there is an invisible labor." — Victor Hugo
Imagination is the beginning of creation. You imagine what you desire, you will what you imagine, and at last, you create what you will." — George Bernard Shaw
"When something went wrong, I'd reflexively start to dig in to the problem, examining stack traces, sticking in print statements, invoking a debugger, and so on. But Ken would just stand and think, ignoring me and the code we'd just written. After a while I noticed a pattern: Ken would often understand the problem before I would, and would suddenly announce, I know what's wrong. He was usually correct." — Rob Pike
I've been walking around the room for about an hour now. Every few minutes, I typed a few notes in the computer, which was sitting in a stand up desk. With my thoughts still fresh in memory, I finally picked the computer up, sat down with it and started putting together the pieces of this article.
You need to move. Sitting at the computer all the time ruins your health, makes you tired and vulnerable to the endless distractions the computer display has to offer. It makes it harder to resist all the addictive or time wasting actvities you may engage in (but don't want to). Whereas if you take the time to stand up and walk around, you'll find it easier to regain focus on what you need to get done.
This line of work requires focus, creativity and inspiration. You do need to be absorbed in thought. But you don't need to instantly write down every little thought or try every little idea in code, or even worse, turn it into an item in a task list. Know to take the time to shape things up completely in the confinements of your mind, imagine the whole thing through, and only once you've got a clear view of the big picture, allow yourself to stop, structure your notes and put everything together.
This has been working remarkably well for me, unsurprisingly for writing, but also for programming. I no longer mindlessly dive into coding attempts or investigations. If I'm debugging something, I take my time to think things through walking around the room before browsing source code. If I'm creating a new application, I always take my time to just think about code structure, data modelling and user interfaces before a single line of code is written.
This is perhaps an alternate version of the 80-20 rule for engineering and other creative work: spend 80% of the time thinking and only 20% of the time actually typing things in.