Reversing the effects of long programming sessions
poppastring.com
poppastring.com
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.
Have you talked to them about it?
Not everybody does that, and if they do, there is appropriate compensation (cash, extra time off and/or both). Good companies simply don't, they realize you can easily walk away to next company. I never ever worked for an employer like that for example, and that's 15 years and 6 employers in 3 countries.
You're selling yourself cheap. Have some dignity.
Good companies do realize that making people work overtime consistently without reward is a bad idea, if for no other reason than the selfish one: your good employees will leave.
I know a lot of companies that do it anyway because they either don't care or don't accept people are leaving because of the constant overtime.
I also know people who have stayed at bad companies either because they don't want to let their team down or they just got used to the constant overtime and didn't realize how bad it was until they left. Or the simple fact that many people do not like change, and prefer the overtime they know rather than jumping to the unknown new job.
Just because someone is working overtime without compensation doesn't mean they don't have dignity. There are many reasons to stay at a crap job (for a while, if you have to). Please don't insult others just because their life is worse than you have allowed your life to get.
That being said, I agree with a few other posters - if you are consistently working 13 hour days, start looking for a new job. My rule of thumb is to spend one hour job hunting for every hour of required/expected overtime.
Go home and contribute to an open source project or something. Unless you're at a tiny startup and getting tons of equity you're never going to be compensated for it, and it'll still be there tomorrow.
And if they do require 13 hour days, leave. The market for devs is too good right now to tolerate that.
You can't flow while integrating a third party library anywhere near as easily as you can flow by rewriting half of it (badly) from scratch.
Flow is a rush. Anything that is a rush can be indulged in to the point of self- (or other-) harm.
That is not so clear cut, it depends on the library. If the documentation sucks or the library is a mess, rewriting it may both induce flow and be a win for the team.
I frequently need to reach states of deep flow when I am reading large inter-related files for refactoring, or modifying existing code to use a new library, or to follow tutorials for something only tangential, like new deployment tooling.
Reaching states of flow is necessary no matter what you’re doing, and given the insane explosion of modern process overhead and meeting-centric corporate culture, it’s important to protect flow time and make it known how important flow is. Whereas I can see how people might try to use thinking like in your comment to undermine flow time, and falsely act like it’s somehow better to deny developers workspace or blocks of time for getting into flow states.
Libraries should help keep the flow going at a high level by keeping one from being bogged down with having to reinvent the wheel. In fact, if they didn't contribute to flow, I don't think we'd use them!
Most people engaging in NIH aren't removing a library that is already being used in your build process. They're deciding it's easier to implement URL processing (spoilers: it's not) than to use a library that already exists.
The exception to that is when the existing library turns out to be a dumpster fire and you rip it out and replace it with something else or a custom version.
(Which I guess is nothing against what you said, just a pet-peeve of mine)
I will even avoid the flow unless I feel particularly meditative. There's nothing good about vanishing down a rabbit hole for several hours and prioritising the rabbit hole above your own health.
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.
I'm not totally sure what that means honestly, but I think we're OK.
UV is vastly more damaging than blue light and monitors produce negligible amounts of UV.
"How is the idea of "outdoor time" used for myopia control?
One of the big surprises of recent research is the importance of how increased time spent outdoors helps in preventing myopia. At the present time it appears that 14 hours a week or more outdoors are significantly effective in reducing myopia progression."
But there were some tidbits in the recent myopia research that suggested light also played a factor. Like maybe exercising pupil dilation is a factor too, which I find plausible.
I guess we'll see. Oops, unintentional pun, but I'm gonna leave it.
I've been making an active effort to avoid using my computer at home. 40 hours a week of sitting in front of one is plenty. That's not to say my alternatives are exactly healthier, sitting in front of a computer is probably better for you than drinking pints at the pub.
Imagine the following: Your life is not great and you're not where you want to be, as a result you get sad/depressed. If you take a pill that makes you feel good, you're felling good about something that generally YOU would fell bad about but know you fell ok/good about it. This is nasty part of antidepressants: Who are you?
Some people get depressed for chemical reasons and in that case antidepressants can make wonders for them. When you work long hours, don't exercise, don't care much about have a social life, eat poorly, etc. What do you get? Depression.
In this case you might have a chemical imbalance BUT it is because you're not taking care of yourself. If you take a antidepressant it will mess you up even more. If you become addict to it, you'll loose a sense of you own self because the pill affects your emotions. Some people think that pooping a pill solves everything.
So, by saying "ripping your soul", I mean that you're entering a hole that is really really hard to get out. I've faced depression, did some psychotherapy and I made the rational decision (thank God) of not taking any pills. I knew people who took them in a daily basis and it's not a happy picture at all. You've to switch meds every X years, people tend to feel sorry about themselves, etc etc. Those people I know are completely fucked up, in the next 10/20 years they'll become zombies most likely.
In my opinion, sometimes people have a huge EGO that gets in the way of growing up and turn into pill to feed their mental picture of themselves and the world.
For me, depression was not nice but I took it as a wake up call. Throw psychotherapy I became aware of stuff that was bothering but I was not aware of it.
Unless you've some physical problem that brings depression, today's depression is a simple product of the Western capitalism, social media, etc. Sometimes you just have to face the your own problems and grow the hell up.
Throw pain, you grow.
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.
Have you tried drinking water? :)
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.
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.
Really covering a wide gamut here!
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.
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.
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.
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.
Movies are my unwinding method. And daily 1 hour walks.
same here. I have the worst short-term memory for non-programming things ever.
Everybody is different so I’m not saying this will happen to you, but I recognize this mode from personal experience and what happened to me was something went sour. Management took a different direction and the thing I poured my heart in got critiqued and risked being shot down. At that point, I missed all the distance to be able to nuance it or say: it’s just work. Since it consumed much free time, dreams, etc. I found myself in a breakdown, and couldn’t touch code anymore. This luckily only lasted three weeks, but/and it made me change many of my ways to avoid something like that happen again and take three years. Which I’ve heard is not uncommon. Again, YMMV, but thought to share that even tough you have the best of times, mixing up work with non-work/dev can provide the necessary barrier/distance/perspective to deal with setbacks more gracefully.
>> finally finishing what I started... Go to bed
I find that I sleep far better if I don't think about work for a half hour before bed.Even better if it's an hour without work before bed.
Sometimes I feel like coding triggers some area of the brain that is slightly autistic or aspergers-like, and I perseverate on it. If I reach a breakthrough I feel better.
I learned to say this to myself - "if I am stuck in a loop, then remember I might need to break out of the loop" - but I mean that not in the programming sense entirely, more behavioral.
Noticing that my brain can actually "think inside the algorithm", even in my sleep, has numerous times caused me to wonder if our brains are capable of essentially "running code" and that maybe neural networks and the like may really be onto something. But that's a different tangent.
What I mean is, if I work for a month or several months doing 10-12 hour+ days coding, etc. and then I stop to take a few days off, it literally takes several (1-3) days to disengage my mind from "work mode" to "vacation" or "life" mode for lack of better terms.
I'm also finding that this is getting worse as I age. It feels like it takes longer to unwind from the adrenaline fueled state, but I'm usually much better off after I do.
Yeah, not healthy. I'm trying hard not to work the long constant hours with few breaks- but I had some bad employment situations that didn't offer any alternative for a while.
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 ?
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.
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.
But then I've always relied on the opposite: just-in-time learning, which was possible in the pre-internet era but is now much, much easier.
You need to accept that the world is too big to fit in your head - even limiting yourself to the field of programming, there's a huge amount of material out there. You need to specialise.
You've also not said what all this is for - is it an end in itself, or is it in service of getting a better job? For the money? To prove something to yourself, or to others? Do you actually need to climb your own personal Everest?
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.
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.
I know exactly what you mean, since I have been at that place myself multiple times throughout my studies and work life.
Short background: I went back to study at the university (B.Sc. + M.Sc.) at the age of 24 and got my M.Sc. degree at the age of 30; now I'm working as a software engineer at a startup.
What really helped was in a first step to work on fully accepting myself. You will always find people that are smarter, faster, <insert adjective here> than you, but that does not mean that you are not worth of love or respect. It's okay to not be able to solve an interview question in time, or to fail an exam, or to not understand a topic the first time you hear about it. We're humans, and this is part of being human.
Self compassion and meditation helped and still help me a lot, especially when I'm facing situations where my self-esteem takes a hit or two.
It also helped a lot to understand that everyone has its own pace. If I would have gone to university years earlier I would have probably failed, because I just wasn't ready for that step at that point in my life. Now I'm 31 years of age, and I am where I want to be. And that's the important thing: it's the right place _for me_, but it may not be the right place _for you_ or for someone else, and that is totally fine!
I'm working with software engineers that are a few years younger than me, who finished their studies quite some time ago and have been working for the past few years, and I'm totally fine with that. It's really awesome, because I'm learning so many things from all of them, and it doesn't matter if they are 21 years or 45 years old. At the end of the day they are also human beings, all with their own baggage filled with fears, failures, positive experiences, and so on.
In general, being kinder to myself changed my life for the better, so I can really recommend to first working on being happy with yourself, and then taking further small steps from there.
In case you have any questions, I'm more than happy to answer them.
Wish you all the best for the future, you can do it!
I'm sure if most people sat down and did a full accounting of how they spend their time, they'd feel guilty. We know we need rest, just not how much of it. Nor how to divide up the non-rest time optimally. It's not even clear what the objective function is. Happiness? Meaningfulness? Bank account? Reproductive success? I haven't dedicated enough of my pie to reading the thoughts of others on this subject.
Do the same for this. Looking after your mental health is simply a sensible thing to do.
Now, i understand why tech companies have ageism.
Basically, you guys are reinforcing this thing that younger people are far better.
Now after having too much stress, I have been experimenting with these thoughts: -Hey, I have x amount of time and I can't master all this y. I should plan what I want to master. -Well, how do I plan what to master. How about I try to set my next goal. -What kind of goal? Must start from the most important stuff first. Maybe something like what is the minimum needed to make me more fulfilled in life. -What are these things that make more fulfilled in life? For me they were mostly goals for attitude and social skills. There was only one goal that had to do with becoming better with technology and that was trying to find my thing in technology. Which was a bit of surprise for me ,considering what I have done with my time trying to master everything.
I am still experimenting with this, but I found that there isn't this constant damaging stress where I feel like I am on a timer.
If you want to be the best you can, taking care of yourself is of Vital Importance.
- Getting enough sleep is important for memory formation. - Eating healthy, nutritionally diverse keeps your body fueled and your mind sharp. The American diet tends to be deficient in vitamin B7, vitamin D, vitamin E, chromium, iodine and molybdenum [1]. - Regular exercise improves mood, sleep, and memory. [2]
I'm sure you can see how these would be helpful. Taking regular breaks, distracting yourself, is also hugely beneficial in how it can shift the gears in your brain. It also adds creative material for your brain, which helps drawing those loose-but-oh-so-useful associations.
On top of that, reducing stress is a big plus for brain function. Especially in the long term. Go easy on yourself, you don't have to be the best. Heck, what even is "best". Everything's relative. No one is better at being you than yourself. Practice self-compassion. Everything is OK.
If your issue is that you Recognize all of this, you Understand it, but the problem is that the Thoughts still pop up, Remember: You are not your thoughts. Whenever you recognize it occurring, just take a deep breath, Acknowledge the thoughts, label them, and focus on being present. Regular meditation is pretty helpful in this regard.
Or, establish a purpose, a goal to shoot for, either short term or long term, and break it down into tiny pieces. Measure your progress, and relish your data-backed improvement. Measure how well you take care of yourself too, and Prioritize That. If only just because it would benefit your progress on your purpose. Or heck, quantify yourself and figure out how your lifestyle affects your brain's efficiency. [3]
[1]https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2905334/ [2]https://www.health.harvard.edu/blog/regular-exercise-changes... [3]http://www.quantified-mind.com/
What? I've never known anybody that could do that! Anyone that can do that meaningfully must be some kind of savant.
I just listen to white noise.
- 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!
I just listen to the ambient energy of a perfect vacuum.
I'm not sure what that sounds like.
Upside is that when I'm doing things that don't require high concentration that are kinda boring and easy I get to listen to the podcast while I do it. A faily large chunk of programming is me on autopilot writing things where I know exactly what to do so a podcast isn't a big deal.
They should add:
- Weed - Drinking - Porn
There is no way I could play video games.
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.
- 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.
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)
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.
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'.
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.
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.
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.
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.
There is such a thing as non-streamed music. Even spotify lets you download for offline playback, at least on mobile devices.
I don't know how I could function without them actually.
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.
That's the most horrible advice I've seen in a long time ...
Fuck breaks. I hate them. Stay strong.
At id software they said if you wanted to see something, make it happen on a screen.