
Reversing the effects of long programming sessions - PretzelFisch
https://www.poppastring.com/blog/ReversingTheEffectsOfLongProgrammingSessions.aspx
======
mariopt
We need to restrict the amount of hours we spend in front of computers per day
and take weekends completely off. There are so many downsides: blue light that
damages your vision, lack of exercise, depression and other disorders, missing
out on social life, etc.

There is a direct relation between productivity and having a life put
together. Not taking care of ourselves (programmers) could have lead to
disaster: mental disorders, burnout, leaving a well payed job, etc.

Lately I've stop giving a damn about deadlines like I used to. Money is nice
but mental health does not has a price. The moment you enter the rabbit hole
of antidepressants you're already ripping your soul.

~~~
burke
> blue light that damages your vision

Can anyone explain to me how looking at a computer screen is not several times
less harmful than spending time outside from a lifetime-blue-light-exposure
perspective? The sky is blue and natural light has a blue component in
probably about the same proportion as white light from a screen.

Maybe I'm wrong — and I'd like to find out if I am — but this whole blue light
scare really just feels like a weird bandwagon.

~~~
TACIXAT
I think you're right. There was just an article about blue light speeding
blindness, but the flux author chimed in and said screens are less than 5% of
the hazard weighted irradiance of the sky. [1]

I'm not totally sure what that means honestly, but I think we're OK.

1\.
[https://news.ycombinator.com/item?id=17726716](https://news.ycombinator.com/item?id=17726716)

~~~
hyperpallium
Though you don't stare at the sky for hours.

~~~
TACIXAT
I did on shrooms once. It had some nice patterns because my pupils were so
dilated. Thankfully not blind.

~~~
smolder
I don't think the patterns are from your eyes behavior mainly but rather
misfiring nerves directly thanks to the toxin. Noise transformed by visual
circuitry into patterns, as patterns are what it deals in on the perceiving
end.

------
Cshelton
I hate talking to people after a long programming session. I simply can't do
it, and I'm normally very social and outgoing. I just stand there and it
probably looks like I'm gazing off at something; I'm just not there.

I've tried doing many things after a long session.. for me, the only remedy
I've found is time. I just need a few hours.

I also produce music. This doesn't help because producing is very similar to
programming in many ways. Puts me right back in the same state.

Having three+ drinks certainly helps... but not healthy nor sustainable on a
daily basis.

~~~
beat
Yeah, I read the author's comment about playing music to relax after
programming, and I immediately thought I might do some programming to relax
after a serious session of music performance/recording. Frankly, playing a gig
leaves me more intellectually/emotionally drained and dysfunctional than a
long programming session does.

~~~
hvidgaard
One of the last things I want to do being mentally exhausted, is listen to
music. I relax by doing busy work. Water the plants, removing weeds, vacuum,
walk/hike, ect. things that require my attention, but not any significant
processing.

~~~
beat
Playing music is a completely different experience for me than listening to
music. I actually listen to recorded music (unless I'm making a recording,
which is basically playing) a lot less than most people would think. But I
play almost every day.

I also have a couple of different playing modes - public performance (usually
with bands), and private improvisation. The improvisation is a critical part
of my mental health. The ongoing stream of planning and surprising myself on
the fly is probably the purest mental flow I experience.

~~~
hvidgaard
I think that if I played guitar all of my life, it would be relaxing to just
sit and jam a bit for myself.

------
jaggederest
I've found that the most important thing is not engaging in marathon sessions,
full stop. My code is better, I'm healthier, and I get more done per working
minute.

Take a break every hour or so, minimum ten minutes, and step away. Make
coffee, ponder the infinite, pet your cat, listen to some Chicago or Slayer,
whatever suits your preferences.

~~~
core-questions
> Chicago or Slayer

Really covering a wide gamut here!

~~~
jaggederest
Mozart to Mötley Crüe, you know how it goes.

------
dfsegoat
In this last project I was in, which was a bit of a death march - we (Team)
ALL got to the point of incurring bizarre sleep disturbances and other
cognitive/emotional disturbances:

It would take 3-4 hours once home at our set stop time to "shut off" our
brains from thinking about what we were working on - and switch over to "being
home" mode and interacting with spouses etc. without being irritable.

We also all had disturbed sleep from "programming dreams" once we could shut
our brains down and actually fall asleep.

This is nothing new, I know - but it was intriguing (and frightening) to see
these effects manifested consistently across our entire team.

~~~
holtalanm
I have "programming dreams" every night.

Probably isn't healthy, but I program all day at work. Go home and spend a few
hours with family, then program an additional few hours every night. Sometimes
I fall into the rabbit hole and emerge at 2-3 am after finally finishing what
I started. Go to bed, and rinse and repeat the next day.

My brain just won't shut off at this point, but I enjoy absolutely everything
about what I do.

~~~
ak39
Same here, terrible sleep when all you're doing is attempting debugging or
refactoring without a keyboard. I am sure my short-term memory of non-
programming related activities is severely affected because no matter where I
am, I am coding, redesigning or imagining shit that is causing that hard to
find memory corruption.

Movies are my unwinding method. And daily 1 hour walks.

~~~
holtalanm
> I am sure my short-term memory of non-programming related activities is
> severely affected because no matter where I am, I am coding, redesigning or
> imagining shit that is causing that hard to find memory corruption.

same here. I have the worst short-term memory for non-programming things ever.

------
pulkitsh1234
But how do I deal with the fact that I always feel that there are people out
there who are a lot better than me and a lot younger. I feel I am already
wasting time doing daily chores...I feel the act of 'eating' is complete waste
of time. You are doing nothing..just eating..

There is this constant thing in the back of my mind, that I need to improve. I
stopped watching movies, stopping playing Dota (had played it 2000+ hours in
total), stopped playing any musical instruments...

Day in and day out, I feel like the time I am spending not learning anything
is a going to waste. I need to be productive everytime (atleast feel like
being productive).

Even on youtube, I try to only watch technical talks as much as possible. If I
stray away, for instance watch a VICE documentary, then I feel miserable as I
just spent 45 minutes doing nothing.

Technically, I can see that I am improving. But when will this stop ? There
are 15 year old kids who know more than me currently, then I will ever
learn/know.

One would assume that, with this kind of daily life, one would be lot better
"intellectually" or in some other sense. But I can assure you, I might be only
slightly above average, but thats it. There is this constant thing inside me,
that I am only slightly above average, not the best in anything.

The more I know, the more I find what I don't know. I guess it stems from the
Dunning–Kruger effect.

But how do I deal with this ?

~~~
yjftsjthsd-h
> There are 15 year old kids who know more than me currently, then I will ever
> learn/know.

If the rest of your comment is true, this is probably false. Seriously, if you
train constantly, a 15 year old hasn't had enough _time_ to compete. So what's
more likely is that you see people who have delved deeply into one thing
deeper than you... But you know other things that they don't have a clue
about.

~~~
tribesman
>If the rest of your comment is true, this is probably false. Seriously, if
you train constantly, a 15 year old hasn't had enough time to compete

Efforts are not everything.

Having resources and abilities also matter.

There can be 15 year olds who know far better than people who have spent years
in a job.

Let's not pretend that it can't be possible.

------
warent
"Personally I cannot listen to technical podcasts while I develop software"

What? I've never known _anybody_ that could do that! Anyone that can do that
meaningfully must be some kind of savant.

~~~
fcbrooklyn
I can't listen to anything with words I understand. Podcasts would be
ridiculous.

~~~
Diederich
Right; I'm unable to even listen to music while in deep flow, because I have a
composition/conducting background, and ANY kind of music triggers analysis
that is a distraction.

I just listen to white noise.

~~~
sarreph
If you’re a composer/conductor then you’ve probably already tried this, but
for me two types of music work well (as I’m a similarly analytical musician):

\- Minimalism, specifically Steve Reich’s Music for 18 Musicians suite

\- Atmospheric, specifically ‘Skyrim Atmospheres’ by Jeremy Soule

Both are so versatile: minimalism for journeys and coding; atmospheric for
‘creative’ periods, walking and sleeping. I do somewhat envy your ability to
listen to white noise as it is infinitely replicable, but fear it a little
distracting in of itself!

~~~
Diederich
I checked both of them out, and they're nice, thanks! But in both cases, it's
definitely music, and as such I'm definitely distracted by it.

------
nacho2sweet
When I played poker for a living I would sit for like 12-16hrs at a table
glued in thinking in fractions and ratios. I couldn't even count the chips
when I went to the cage after, it wasn't in ratios. I would meet friends at a
bar/club and couldn't talk to anyone for at least an hour.

They should add:

\- Weed \- Drinking \- Porn

There is no way I could play video games.

------
factsaresacred
'Take a nap' ought to be on the list.

A) Naps are awesome.

B) Putting down that mental model of functions, open files, and unsolved
problems for a while often results in sharper thinking.

Not gonna lie though - most of my unwinding consists of refreshing HN,
daytrading Bitcoin or making another cup of coffee. But _ideally_ I'm napping.

~~~
nxc18
I can't sleep (unless I'm extremely deprived, at which point I'm really just
passing out) until _after_ I've done the unwind things mentioned in the
article and have been away from work for ~3 hours. It doesn't matter when I
stop working, I cannot sleep until 3 hours has passed. I've tried, I lay in
bed for 3 hours minus commute time.

------
baxtr
_Here are a few other suggestions:-

\- Playing video games

\- Cooking

\- Watching TV

\- Listening to music

\- Talking to non-technical friends

\- Closing my eyes and slow your breathing

\- Exercise_

I can see all but video games and watching TV, where again you sit in front of
a screen. Doesn’t help me. Instead, I’d add hiking in the hills, forest,
mountains, being outside in nature in general. Nothing is more re-energizing
for me than that.

~~~
aequitas
Video games work for me in getting my mind to let go of the problems it's
pondering about. Sometimes it's like subconscious I'm always working on some
problem. Videogames at least let me forget/drown-out certain 'work'-like
problems and allow me to reward myself instead with 'fun' problems. Walking
often just leaves my senses empty and causes my mind to focus on the work
problems again. Maybe a hike would be different as you are more exploring
something new to keep your mind occupied.

------
ppeetteerr
The best for a quick reset is juggling (believe it or not!). Nothing beats
physical exercise, either at the gym, cardio alone or team sports, to make up
for hours of sitting and staring at a screen.

~~~
User23
As an added bonus lifting weights, especially pulling movements like rows and
deadlifts, can go a long way toward correcting the hunched forward posture
many of us end up in at the computer. Also there’s this:
[https://blog.frontiersin.org/2018/06/07/neuroscience-leg-
exe...](https://blog.frontiersin.org/2018/06/07/neuroscience-leg-exercise-
brain-nervous-system-health/)

~~~
ppeetteerr
Leg day is very important! I've recently taken up exercises to fix the effects
of contracted hip flexors (planks, leg raises, etc) and have seen my posture
improve significantly. Yin yoga is equally great for stretching the chest
muscles that are so often tight due to forward hunching. Anyway, an article on
its own :)

------
beat
Forcing yourself to do Pomodoro sessions can help. It allows you to go deep
without going _too_ deep - having to take that five minute break so you can
walk around, check email, or whatever can keep your brain from "going native"
in the computer.

Also, for anyone interested in intensive work sessions in general, I highly
recommend reading _Deep Work_ , by Cal Newport. He talks a lot about how to do
really intensive work while remaining a fully functional and engaged human
being outside the work.

One thing he recommends in the book is to have a shutdown ritual. He actually
says out loud "I am shutting down now", to help kick his brain out of deep
work mode.

~~~
war1025
An easy way to force periodic breaks is to just drink a lot of water
throughout the day. Then you have to get up for refills and bathroom breaks.
Plus water is just good for a person in general.

------
glangdale
[ a pedantic corner of my mind insisted that the title should imply "deleting
the code" as well ]

I found that doing Brazilian Jujitsu really helps with this; two or three
minutes into a session and all other concerns are gone and the relaxation
afterwards is great - the world takes a while to come flooding back.

I think TV and video games are a dodgy recommendation in that it's just more
time in front of screens - itself not great. Unless you have a pretty wacky
working environment you're sitting down or at best at a standing desk. So
adding more sedentary activities as a way from unwinding from other sedentary
activities is pretty questionable. Not everyone is going to love something as
full-on as BJJ but surely 'go for a walk' should be way ahead of 'more screen
stuff'.

~~~
keithnz
recovering from programming -> BJJ flushes away the real world / programming
world -> Recover from BJJ depending on the day it's (I suck so much) || (Real
progress was made today)

~~~
glangdale
I _think_ that coming off the mat fuming about how badly one sucks is
something that reduces over time, or at least it has for me. And not because I
suck all that much less. Training frequency seems to help ("oh well, there
will be another roll tomorrow").

------
nk1tz
To get the most out of my periods of intense focus I try to plan multiple
after hour activities. I find that tactile activities such as climbing and
pottery really help with balancing my brain and softly undo the anti-social
mood that develops in me during long coding sessions.

------
ngnh
I found the best way for me to unwind is exercise. Table tennis or especially
boxing works really well too. Nothing makes you switch mode faster than
getting hit in the face :)

------
cyberferret
I would totally agree with the "playing a musical instrument" as a method to
wind down.

My working desk and all my IT gear is on one side of my home office. Behind
me, the other half is racks of amps, keyboards and amps. During long compiles,
installs or downloads or while waiting for a Slack response from a colleague,
I will often just lean back and grab an instrument and play away for a few
minutes.

Great way to reset the brain, plus change posture and breathing patterns.

------
yodon
[tl;dr - aim to take at least 250 steps every two hours to prevent buildup of
blood clots]

It's not just about getting exercise. It's also about moving your legs
sufficiently to ensure proper blood flow and prevent the formation of life
threatening blood clots (disclaimer: that happened to me, I love to hyper
focus and just sit in my chair and code for 8 hours straight, which turns out
to be an incredibly high risk activity even for someone who is otherwise
active, in good shape, not overweight, not a couch potato, etc).

Your legs are far enough from your heart that your body has evolved a separate
pumping mechanism for them: the actions of your leg muscles when you walk or
run are responsible for booster pumping the blood through your legs. Standing
desks may be great for other reasons but they don't help here because your leg
muscles still aren't driving that pumping action the way they would if you
were walking or running.

My solution was to get a cheap fitness band (Fitbit Flex2 in my case) and set
it to vibrate if I'm inactive for long periods. When it buzzes I get up, walk
down the hall a couple times, and go back to concentrating.

~~~
lukas099
The article was more about the mental effects of long sessions, and barely
mentioned exercise at all.

~~~
beat
Lack of exercise/motion could well be part of the mental effects. Your body
isn't ready to move again. It's kind of like that weird way you feel when you
first wake up.

------
brobdingnagians
I have a timer app (RSIBreak) that forces me to take 20 second breaks every 10
minutes and 4 minute breaks every half hour; I usually get up and walk around
or stretch a bit and look out the window for awhile. Works wonders for making
me feel way better. I've improved my posture from doing it, as well as making
my eyes feel way better after working a full day. I also use Redshift to tone
down my screen; when I turn it off for certain things, my screen feels blue
and bright in a weird way.

------
toonervoustosay
I have recently been vaping high CBD hemp flower after a long day of
programming. I am fully functional while feeling so much better. There is a
mild residual feeling the next day, so I don't have to vape daily. I am
dreaming again, nightly. I am waking up refreshed the next morning.

I highly recommend people try it.

Mail order to anywhere in the US seems like a legal grey area. There are two,
possibly three online farms supplying the market in the US but this space is
going to expand very soon. Prices are very reasonable.

------
woodlumhoodlum
I have trouble concentrating at work to the point where I barely complete any
code. I Can never flow unless I'm working on a project at home. Music can help
but the network is often too spotty for songs to load consistently. I'm easily
distracted by the internet and conversations with co-workers. I'm not allowed
to work overtime, and get 8 hours of sleep - so being tired is not an issue.
Am I burnt out? or just extremely apathethic?

~~~
atentaten
I too sometimes experience this inability to get stuff done at work because of
distractions. I realized that there's a lot of anxiety that I'm experiencing
when in this mode (probably from knowing that I'm not doing work because of
distractions). When this happens, I try to get away from my work area for a
few minutes and relax by closing my eyes and breathing slowly. I then feel
much better. The key is to remain aware of when you are being distracted
and/or feeling anxious. Once I've placed my attention on myself and say to
myself, "I am being distracted now", I start to feel more focused.

~~~
woodlumhoodlum
Thanks, I'll give it a try!

------
timwaagh
I think basically anything else will do. I tend to do quite a bit of diy in my
spare time. But I have to say. After a long programming session I turn into
the most egotistical angry creature I have ever known. Thankfully the
productivity of such a session is usually so big people still go to their
knees to thank me. And I happen to be a real sucker for compliments so once in
a while when it's really necessary I still do them.

------
nateburke
+1 playing a musical instrument after coding and +100 more if it's a bowed
string instrument. I find that spending as little as 5 minutes, even if it's
just bowing open strings, will snap me back into a more calm, happy, and aware
mindset.

------
nmca
Getting on hard boulder projects used to work really well for me. If it's
close to your limit then you can't think about anything really, and it gives
you a nice reset

------
captain_perl
I do daily upper-body stretches taught to me by chiropractors.

I don't know how I could function without them actually.

~~~
elektor
Do you have any online resources you can share?

------
djfm
I would add mindfulness meditation to the list.

------
tribesman
I started smoking Cannabis. It has helped me a lot after long programming
session.

My mind used to keep racing. I tried everything from playing instrument to
swimming but nothing helped.

I would get the flashback of the diagrams, communication, tickets and emails.
I would continuously think about the data structure and algorithms, reaearch a
lot of them and figure out which one would be most efficient for my employer.
I would work out the complexity and implementation in my head. Once i got into
accident when thinking about a bug.

But now it's solved after i started taking cannabis.

------
gdsdfe
Watching TV??

That's the most horrible advice I've seen in a long time ...

~~~
Jeff_Brown
I wouldn't choose it either, but it depends what your outside options are. At
least it gets you thinking about people and processing verbally.

------
jhare
I drink, smoke weed, eat etc and don't talk to anybody during long sessions.
Ignore all people. That's how you do it. Then go back and program more.

Fuck breaks. I hate them. Stay strong.

At id software they said if you wanted to see something, make it happen on a
screen.

