Ask HN: How to relax after coding for too many hours?

8 points by rsrsrs86 ↗ HN
Hi, what do you do to relax and sleep after coding for many hours straight? I tend to get very agitated and can't sleep well.

5 comments

[ 2.8 ms ] story [ 18.9 ms ] thread
Read easy genre fiction until you start nodding off into the book.
Strenuous exercise. Forces your brain to shift out of the coding context.
Take a walk, work out, or read fiction.
You probably haven't had enough physical exertion in your day to drain off your energy, and your brain interprets mental focus as a sign that there's something to be anxious about. Sure recipe for tons of nervous energy.

The suggestion to exercise to physical exhaustion is a good one. I usually don't have to go that far, though. Even walking a couple miles usually takes the edge off and gives the brain a chance to wander into other paths.

Doing something else that's almost entirely physically oriented can also help - a craft project, cooking, etc.