Resting vs. Switching


When I'm tired of coding, I can switch to writing. When I'm tired of both, I can switch to UI work. And when I'm tired of all three, I can get some food and water.

I'm sure there's a proper name for this, but I'm curious about when it's right to rest and do nothing and when it's right to switch to another task. I think both are necessary and useful, but tactically I have too many questions:

  • When is it right to rest vs. switch?
  • When is switching alone insufficient? When is it time to rest?
  • Is there a "sleep debt" effect from not resting enough?
  • What are the best ways to rest?
  • How different does a task have to be to count as a switch?
  • What causes the need for resting and switching in the first place? What cost is being paid, and how can it be reduced?
  • Are there momentum effects at play? (e.g. the longer you rest, the better the rest is) Or perhaps it's just linear?
  • To what extent is the need bodily (food, water, sleep) vs. mental and emotional? (tired, frustrated) To what extent is it just accumulated stress?

And so on.