15 ms·
Reversing the effects of long programming sessions
- gdsdfe 8y agoWatching TV?? That's the most horrible advice I've seen in a long time ...
- Jeff_Brown 8y agoI wouldn't choose it either, but it depends what your outside options are. At least it gets you thinking about people and processing verbally.
- nk1tz 8y agoTo 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.
- ppeetteerr 8y agoThe 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.
- Jeff_Brown 8y agoTeam sports sounds nice -- physical + talking.
- asteli 8y agopartner juggling is a thing! I picked up juggling a bit ago, as my romantic partner is an avid practitioner. spent a half hour after work working on a 3-club Cascade. One of the beautiful bits is, if you're working on something new, there's only so long you can spend attempting to "get it" before your brain fuzzes out and it becomes futile, and hence forces a break. A physically and mentally time-bound activity, unlike a lot of things one might choose to distract oneself with (social media, reading the news, etc)
- User23 8y agoAs 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-exercise-brain-nervous-system-health/ https://blog.frontiersin.org/2018/06/07/neuroscience-leg-exe...
- ppeetteerr 8y agoLeg 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 :)
- mariopt 8y agoWe 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.
- wainstead 8y agoAll true, but neither should we deny ourselves a long session of "flow" if it makes us happy.
- deleted 8y ago[deleted]
- maxxxxx 8y agoThat's why it would be good to get paid by hour. When I was freelancer when things flowed I sometimes worked 24+ hours straight through or had several 16 hours days. But then I had other days when I got nothing done and took off. In a salaried position the company takes the long "flow" session for free but still expects you to be there the next day.
- jaggederest 8y agoI'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 8y ago> Chicago or Slayer Really covering a wide gamut here!
- jaggederest 8y agoMozart to Mötley Crüe, you know how it goes.
- mukuro 8y agoAgreed, and since 99% of programming doesn't even involve writing code, it might be healthier to "program" away from the screen, while going on a walk for example.
- marcus_holmes 8y agoMy code quality also improves when I limit my sessions to a few hours at most. After about 8 hours or so, I feel like I'm getting a lot done, but I almost always have to refactor significant chunks of that code later. If I limit my sessions to implementing one feature or process, and then going away from the screen to think about it more, my results are better.
- tribesman 8y ago> My code is better, I'm healthier, and I get more done per working minute. It's not about what you are. What market asks is, are you better than others who you can be replaced with? The ones who are ready to scarifice themselves, their health and deliver more code then you. Let's not pretend that his worries are unfounded.
- Cshelton 8y agoI 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.
- amelius 8y ago> Having three+ drinks certainly helps... but not healthy nor sustainable on a daily basis. Have you tried drinking water? :)
- beat 8y agoYeah, 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 8y agoOne 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 8y agoPlaying 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.
- yodon 8y ago[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 8y agoThe article was more about the mental effects of long sessions, and barely mentioned exercise at all.
- beat 8y agoLack 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.
- loco5niner 8y agoedit - removed comment
- scolby33 8y agoI read that more as a tl;dr of the comment, although I do see where you’re coming from.
- dfsegoat 8y agoIn 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 8y agoI 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 8y agoSame 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 8y ago> 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.
- kvz 8y ago
- beat 8y agoForcing 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 8y agoAn 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.
- baxtr 8y agoHere 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 8y agoVideo 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.
- bonniemuffin 8y agoI consider "looking at trees" to be a restorative activity all on its own; hiking is merely the method by which I cause trees to pass through my field of vision. Tall green things cure what ails me.
- ngnh 8y agoI 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 :)
- warent 8y ago"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 8y agoI can't listen to anything with words I understand. Podcasts would be ridiculous.
- Diederich 8y agoRight; 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 8y agoIf 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 8y agoI 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.
- warent 8y agoYou listen to white noise? I'm not even able to handle the sound of the oxygen in the atmosphere. I just listen to the ambient energy of a perfect vacuum.
- factsaresacred 8y ago'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 8y agoI 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.
- timwaagh 8y agoI 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.
- nacho2sweet 8y agoWhen 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.
- toonervoustosay 8y agoI 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.
- cyberferret 8y agoI 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.
- nateburke 8y ago+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.
- woodlumhoodlum 8y agoI 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 8y agoI 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 8y agoThanks, I'll give it a try!
- wilsonnb3 8y ago> Music can help but the network is often too spotty for songs to load consistently There is such a thing as non-streamed music. Even spotify lets you download for offline playback, at least on mobile devices.
- jhare 8y agoI 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.
- captain_perl 8y agoI do daily upper-body stretches taught to me by chiropractors. I don't know how I could function without them actually.
- elektor 8y agoDo you have any online resources you can share?
- deleted 8y ago[deleted]
- glangdale 8y ago[ 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 8y agorecovering 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 8y agoI 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").
- arminiusreturns 8y agoGaming doesn't have to be sedentary! I just recently restarted a gaming-exercise routine I used to do in the military, and I'm loving it. In between deaths, etc pick an exercise and do it. Multiply that by an hour or two gaming and you've got a good albeit barebones workout, the same with stretching. So just for example, I'm using a large heavy duty weighted exercise ball, and in between insurgency rounds (best linux fps IMHO) etc, I'll do situps and crunches, or toss it aside and do squats, stretch hamstrings, grab the kettleball for shoulder presses or grab the sledgehammer for airpunches, etc. Combined with watching my portions and not drinking so much, it looks like I'll have my old 8 pack back before the year is over. I also like to listen to lectures and talks while I game, and tend to only turn music on when I'm doing the exercises, but it makes me feel like I'm still being productive intellectually also. My hope is that wireless room aware VR will enable a new generation of non-sedentary gaming.
- pulkitsh1234 8y agoBut 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 ?
- natalyarostova 8y agoimo there is nothing wrong with working hard and pushing yourself, I do the same. The challenging part is pushing yourself to be the best "you" you can be, while practicing acceptance that there will always exist someone, perhaps far younger than yourself, who makes what you do look trivial. That's life m8. I spent tonight studying calculus after work in order to learn enough to use some models that interest me. There is a 15 year old out there who could pick this up overnight, while I push myself to do easy problems after work. What can you do? Either give up or push forward.
- kondov 8y agoI've been struggling with the same problem for quite some time now, so I thought I'd share how I've been coping with it. The most important thing is to realize that becoming the best in something should not be the motivation pushing you in this industry. In competitive games like Dota, there is a clear winner and loser when the match is over. The real competition in programming, however, is being better than you were before, expanding your mindset and solving more complex problems. There will always be someone better, smarter or a faster learner but that doesn't diminish the progress you've already made. There are people who have talents for certain things, there are people who learn certain things faster. I've found that competing with myself is the only healthy way to move forward or I would always feel that I'm not good enough compared to others. As it was already mentioned in the comments, there is nothing wrong in pushing yourself when you want to improve, but don't take it to the extreme. We operate on work/rest cycles and as you need discipline in work you also need discipline in rest. I try to look at the process of improvement like a marathon rather than a sprint. The journey is going to be a long one, so don't lose the joy of it by pushing too hard. Think about how long you can go like this and consider if this would take the fun of programming away. Think of unproductive activities as a way to get your mind some rest, much like sleep.
- djfm 8y agoI would add mindfulness meditation to the list.
- brobdingnagians 8y agoI 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.
- tribesman 8y agoI 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.
- nmca 8y agoGetting 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