Programming for long periods is like walking a high tight rope for a really, really long period of time, or at least I imagine it is. As you go further and further out on the rope any break in concentration or just simply stopping becomes more and more difficult. I have described this in the past as tumbling down the rabbit hole but even that does not quite capture the sheer force of will it takes to successfully take an idea from concept to useful working application.
Programmers, I am sure, are not special in this regard there are I assume many occupations that require hours of long, intense concentration. This is especially true when the fundamental concepts are so amorphous that you are forced to construct a kind of memory palace (method of loci) in order to successfully navigate ideas, consider redesigns or fix complex problems.
For the developer this complexity can extend through several abstraction layers (OS, network, or memory), across multiple devices and then simultaneously within multiple threads. All these theoretical considerations can get quite overwhelming which is why so many developers insist on silence, headphones or music of a particular tempo and type. Personally I cannot listen to technical podcasts while I develop software, it's like I have single threaded access to the technical portion of my brain.
Unwinding after programming
My advice to anyone who is forced to do perform this kind of mental gymnastics over long periods of time is to engage in countervailing exercises that allow you to almost wholly inhabit the moment. For many people I work with going for a walk away from your workspace is the simplest and most accessible way to clear your mind of programming fog.
Here are a few other suggestions:-
- Playing video games
- Watching TV
- Listening to music
- Talking to non-technical friends
- Closing my eyes and slow your breathing
The common theme for any anti-programming exercise is to simply be present. Actions that force you to consider things in parallel tend to play on the same exhausted brain cells, I find that some video games do this regardless of my best intentions.
For me personally playing a musical instrument does more to settle my restlessness than any of the previous suggestions. Especially when I am playing a piece of music I enjoy and know well enough to play without additional practice, and more importantly, without doubt or fear of failure, remember the whole point is to unwind. When I play music in this context it is usually error prone and experimental and leaves glaring mistakes hanging in the air for all to hear, and you know what that it is fine, because the whole point is to enjoy the music and the moment in real time.
I know that a lot of people do not have musical inclination but I would encourage you to pick up an instrument and pluck around. Getting good might require time but having fun can happen immediately. Just think of someone playing air guitar the enthusiasm and the joy is exactly the point!
So this is me, what do you do to relax after marathon programming sessions?
@Will - Playing before long programming sessions is really good idea!
Sleeping helps me as well, but keeps me awake at night if I am doing it too much.
A very obvious one is having sex, or swimming or showering or riding a bike...
Basically, I need to do the opposite of brainwork, that is, to work my body or to get other sensual input. I also found that "covering distance" by either walking, pedaling or any other form of locomotion also helps.
It is as if crossing space helps to absorb problems or issues, you literally "leave them behind".
BTW, there is a whole school of philosophy built around the idea of solving problems in motion:
I wonder if it would help to have some form of mild exercise while working at the computer, but i guess that the body motion would ruin the typing skills.
I have been wondering about the proportions of work - a normal programmer works around 8h a day, and then has additional 8 hours to unwind and then about 8 h to sleep.
The older I grow and the more complex the projects are that I am working on, the more I find that I need longer periods of unwinding. Not resting, I could be doing any sort of other work during the time (like paper work or something else), just not intensly focussed programming.
I don't know about you, but I find it to be really exhausting to program 8h a day, I am toast after my work day.
There is this meme which pretty much nails it: https://conservativememes.com/i/programming-if-youre-not-tired-youre-not-doing-it-right-5318404
Long stretches of programming can really be a chore, especially when you are working against a tight schedule...
Comments are closed.