Title: I feel like I have to be in a very specific head space to write code. It’s like climbing a big hill but in my head. Sometimes it’s effortless and sometimes it’s a slog.<p>Are there any proven exercises or techniques I can adopt that are proven to boost my ability to focus and get in that clear headspace to write code?<p>Edit: adding some tips as I try to figure this out. Note: not scientifically proven (to my knowledge)<p>1. Music. which type depends on the individual.<p>2. Timing. Dead of night or early in the morning when the world is quiet. Not this isn’t a muscle you can flex at any time, you have to just capitalize on the right time.<p>3. Long shower<p>4. Caffeine<p>5. Get out of the office&#x2F;house go somewhere else (like a cafe)<p>6. Take a walk<p>7. Have a beer<p>8. Write thoughts down in a notebook without any phones&#x2F;laptop in sight and then jump to the laptop to implement<p>9. Meditate<p>10. Lift weights &#x2F; exercise to work the demons out and quiet the mind
Upvote: