Settings

Theme

Ask HN: Turning off the programming mind during non-work hours

65 points by tennisprince 2 years ago · 45 comments · 1 min read


I have this habit which I'm sure many other dev have of thinking through programming problems during routine moments throughout the day.

At times this is an amazing blessing because some of the more out-of-the-box solutions get formed in these moments but more recently it's been veering into unhealthy obsessive territory (e.g. out for dinner or exercising).

Please share your experiences + any tips around striking a balance?

TechBro8615 2 years ago

Personally, the worst impact of "bringing my work home with me" has been when I'm spending time adjacent to infosec or pentesting. That's a discipline that requires cynicism (engineers are incompetent, can't protect their systems), paranoia (everyone is constantly trying to hack your vulnerable systems) and distrust (any user input could contain a malicious payload). Unsurprisingly, these are not the ideal qualities for fostering strong relationships, especially with a new partner or anyone you met recently.

I don't think this is discussed often enough. The traits that make for the best infosec professional are the same traits that make for the worst spouse. And that's before even considering the tendency to "over analyze" that comes with the baseline analytical mind required for any engineering profession.

So how to manage it? Well, I'm not sure you can really turn it off. But you can be aware of it. Remain cognizant of your own biases, and redirect some of that analytical energy into introspecting and analyzing yourself, before you take it out on someone else. But don't take it too far - sometimes your gut instinct is right; maybe she really is cheating on you, maybe you're not just crazy. But take a second to think about it. And make sure to communicate your biases to anyone whom they might affect, so that they're prepared to recognize when they emerge - that's when a good partner will sympathize and bring you back to earth, and a bad partner will take it personally and exacerbate the situation.

  • digitalsushi 2 years ago

    I had a thing happen to me. I'm not telling this anecdote as a solution, just as a shareable thing.

    An innate draw to perfectionism becomes the engineer's plauge. The notion that we can approach a quality in our craft compels us, stirs us and drives us, pulls us to an ideal we never quite seem to reach. This plauge promotes paranoia, large egos, self doubt, loathing, fear, complexities and difficulties in our relationships, in our selves.

    One day, about 8 years ago, on a trip to The Island of Hawaiʻi, a day tour around the island brought with it a brief stop to see some giant ocean turtles, laying eggs upon the shore. Before we were released from the bus, the tour guide emphatically begged us, striving for a personal connection, to please, please leave the turtles alone. And then, as though I was watching the birth of conceptual inevitability, I watched happy couple after happy couple, smuggling turtle eggs for digital photos. Most were placed back, a few were broken, yolks dripping into the water and rocks and a quick shriek turned to laughter.

    I felt free. I felt a freedom from responsibility, as the expanse of the loss of control I have finally came from its spectre and showed me the infinite boundary of what I cannot control. This freedom was not joy. It is not joy. It is the cold comfort of certainty, the icy maw that I cannot escape from with more than a few variables of integers at a time, and to simply allow myself to be the briefest of willful rejections amongst it.

    And so that's how I turn off at night. I know that if I disappeared into the static between clouds, this would all go just about as well, or poorly, and that I am not going to save the world if I just push git commits fast enough.

  • Justsignedup 2 years ago

    Spouse needs to be well aware of it. My current spouse fully understands that the same thing that makes me successful is also something incredibly annoying that she needs to pull me out of occasionally. Sometimes the person just needs to remind you of what's important, and your brain can snap to a different mode of operating. Sometimes it is just gonna be a point of contention.

  • omscs99 2 years ago

    Oh wow, maybe I should go into infosec, looks like I’m already there mentally

  • rexpop 2 years ago

    > The traits that make for the best infosec professional are the same traits that make for the worst spouse

    And why do those traits not also make you the worst employee?

wsowsowso 2 years ago

Hey I’m in trading - Often we go home with millions of dollars of risk on our books after 12hours at the office, so it’s a common problem switching off in the little time after work. Most of us feel the need to constantly be up to date with market news/price movements/thinking about how to best position ourselves around a certain event. Within the industry there are well known ways for switching off out of work, some have been listed here already.

* Vigorous exercise, especially cardio - ok to let your mind wander here but wary of mentally exerting yourself

* end of day writing down everything you need to do and what you have learnt

* if you have extra learning/coding side projects, do it only at the office after work but before you go home so that home is a work free zone

* have a threshold routine when you get home, e.g. change clothes or have a shower, after which you don’t think about work anymore

* controversial one but minimise talking about work with family - obviously share the nice things about your day but I pretty much avoid grumbling about work or specific stresses at work with family as it means you never get a rest from them

* consume media unrelated to work (don’t read hacker news before bed if you’re a software developer lol)

* some people meditate, never clicked for me but it’s meant to be very good

* work yourself to death when you are working so that you can properly relax guilt free when you’re not working. Honestly WFH makes a lot of these more difficult.

  • bfung 2 years ago

    > Vigorous exercise ... threshold routine ... change clothes

    Do something that takes a good amount of concentration/coordination physically, so there's no way to think about work.

    Ex: go to the gym, change, circuit train and focus on good form, breathing.

    Make it a routine, so that the motivation barrier won't stop you from going.

  • beezlewax 2 years ago

    I can't see how working from home could effect anything here. I have a work laptop that I close when work hours are up.

unsated 2 years ago

I found "dumping/serializing state" greatly helped me.

I got into a habit of writing down things that required continued work next day, at the end of my workday. Initially I started doing this because it would take too long to get back into the depth needed to be productive especially after a long weekend or context switching for a day or two due to something time critical. The most effective form of "state dump" being specifically what is the next thing I need to immediately work on given next opportunity.

Overtime I realized, this "checkpoint" allowed me naturally to evaluate how much time and energy I spent on something and be specific about the next thing that would move me towards the outcome I wanted. This focus would:

1/ put my mind at ease, because I know what's important was written down and I don't need to spend mental energy keeping the state alive in my mind.

2/ It would direct my thinking towards what is important to do next time around rather than thinking of interesting but nuanced thing that are actually low value in grand scheme of things.

3/ Often, narrowing down what's the next thing I need to do meant I had a solution next morning and would often experience high productivity in first few hours of the day.

ymmv.

  • kimburgess 2 years ago

    Another advocate of this approach here. Define some form of time-boxing: 90 minutes, 3 hours, 1 day, 1 week, whatever. When this is up force a capture of current state, knowledge, assumptions and ideas, then walk away and intentionally drop context. When you return it’s a great spot to be self critical and reorientate towards what you’re actually trying to achieve. Think of it like async rubber-ducking.

    If you continue to think about the problem space during that ‘off time’ (which you likely will) add the thought to some notes for review when you return.

gus_massa 2 years ago

During exercising: I don't mind if it's not dangerous. For example, when you are biking IRL and get distracted. A fixed bike is nice for thinking. On the other hand, I can't think while swimming, so it may be an option to 100% disconnect.

During out for dinner: Alone of with someone? When you are with other people the UI/UX is important and must be responsive. Remember to switch off as many side process as possible.

hannasm 2 years ago

I have always considered time like this billable hours. In a contracting role it may be something you can add to the invoice, it probably depends on the contract. In a salaried position it means coming in later to work, leaving earlier or otherwise finding extra time to properly recuperate. You may want to have conversations with appropriate peers and/or leaders on your team to establish the best approach.

kdmccormick 2 years ago

If I'm thinking about a work problem, I count it towards my 40 hrs/wk of allocated work time.

If I'm thinking about a hobby problem, then I don't sweat over it, unless of course it's eating into some other aspect of my life (friends, outdoor activities, etc).

  • hyggetrold 2 years ago

    > If I'm thinking about a work problem, I count it towards my 40 hrs/wk of allocated work time.

    Billing for thinking - in my experience this is how some of the best people work. But you have to be careful in management conversations around it. :)

renjimen 2 years ago

- I set strict working hours where I allow myself to think about work things.

- I finish these working hours every day with an activity that stimulates me and/or requires concentration. Usually this involves getting outdoors where there's a lot more sensory input to process. A walk around the park is usually good enough!

- I don't expose myself to anything work related outside my working hours. I don't have work related apps on my phone and I use a separate work profile on my laptop.

I work remotely so these rules are doubly important for me, where I don't have the luxury of being able to leave the office.

mooreds 2 years ago

If I have a burning thought about something work related, I'll send myself an email to review the next working day.

javajosh 2 years ago

A solid 90% of mental health issues stem from the inability to choose where to place your attention. The only activity that I know of that teaches this important ability is meditation. And the only place I know of that teaches it well are the Vipassana 10-day retreats (dhamma.org). They help you by taking away all distraction, giving you a safe, quiet place to practice, and all the encouragement in the world.

xk_id 2 years ago

i think the fact you are even thinking in terms of an on/off switch suggests you are far from your goal. the brain is not a computer [1]. yet, you projected on it machine characteristics: such as step transitions between states. rather, the biology of brain states is more similar to that of exercise biology: when you finished running, your heart rate, body temperature and numerous other adaptations stay elevated. in fact, metabolic rate stays elevated above sedentary baseline throughout the rest of the day (which constitutes a benefit). likewise, it's unrealistic to expect a discrete switch from on to off of "programmer mind" adaptations. there are many good suggestions in the comments for speeding up the transition, but i thought i would mention this biological context. it's completely normal to struggle with reverberations of the activity which occupied most of your day. above all it takes patience for them to fade away.

[1] https://news.ycombinator.com/item?id=37426601

temeya 2 years ago

The fact that you recognize that you've got a runaway daemon is good. Now you just need to recognize when it's eating too much memory and taking too many processes. (I realize that how I've described might be a bit much, but if you've thought yourself into this conundrum, then perhaps you can think your way out!)

DrThunder 2 years ago

Try a type of exercise that gets you out of your head. Jogging isn't going to cut it unless you're sprinting ridiculously hard. For me, it's heavy weights or technical mountain biking. For mountain biking I really cannot take my focus off the trail or it could mean a really bad wreck. Of course, if I don't change up the trails enough my mind can even wander during that.

As others have mentioned, meditation may help too. It'll help you learn how to let thoughts go without obsessing. So, everytime you catch yourself following down the programming thought path you need tell yourself "HEY, it's time to turn my attention elsewhere". Just like physical exercise you'll build the brain pathways to do this more easily the more you practice.

Lastly, maybe you just need to take some time off. I find if I'm gone from work for a few days all that stuff fades away while I'm doing other things.

  • nickdnickd 2 years ago

    Agreed, Crossfit has been remarkably helpful for this. It's a group setting combined with movements that require focus on strength, coordination, and socializing.

hyggetrold 2 years ago

In my experience the ability to "turn it off" is a skill that requires practice. This thread already has some good suggestions: exercise, meditation, writing a note to yourself, etc.

I would add that getting out into nature can be really helpful as well. If you're in an urban situation a walk in the park or near some water is good.

Exploring art like with physical drawing or painting can be good too. Or sculpting if that turns you on.

I think it's really important as part of this to get out of the "productivity mindset" - so go for a walk/run/bike ride/whatever and don't try to get a "two-fer." So don't listen to a podcast or audiobook while you're exercising or walking. Really try to dial down all the mental input as much as possible. You don't have to do this all the time but at least a few times a week can really help.

  • PartiallyTyped 2 years ago

    > I would add that getting out into nature can be really helpful as well.

    Second this, I am a city dweller, but I found myself next to forests in central Europe, and it's absolutely incredible.

night-rider 2 years ago

https://practicalpie.com/the-tetris-effect/

https://exploringyourmind.com/tetris-effect/

satya71 2 years ago

Meditation should help with this. After all, it's about practicing to calm and focus the mind one thing only.

cloogshicer 2 years ago

For me personally, the only solution was to work less.

I know this is probably not the answer you wanted to hear. But reducing my work hours to 30h/week has been the single biggest improvement to quality of life that I've ever made. I've never questioned if it's worth the money.

omscs99 2 years ago

I’d say for me a big one is working out of office, when the clock hits 5 (and not oncall) work laptop gets closed and I don’t open it again

It’s really a little thing, but maintaining separation between workplace and home and trying to minimize that overlap works well for me

SeanAnderson 2 years ago

Meditation sounds like a good solution. I suggest Ten Percent Happier. The CEO at my last company recc'ed it to me and I've found it to be quite good. It's a paid subscription, though.

Outside of that, I engage with flow arts (specifically poi spinning) to get out of my head. The reason it works for me is because the moves require an absurd amount of bodily concentration which forces my brain to disengage. Later, as a trick becomes rote and requires less physical concentration, I find that the hours I spent practicing resulted in habituation wherein I drop out of my "thinking mind" whenever I pick up my props - even if the tricks I'm doing are easy enough.

barrysteve 2 years ago

Often something in life needs doing for a good reason, and there's not really much to logically parse.

But I still have automatically jumped into logically dissecting the problem and looking for edge cases and mulling over the logic of the problem. And trying to get the basic problem, to find the perfect solution. Needlessly.

Stepping down a gear to just doing things because there's a reason for it has been helpful. Letting the logic and rhetoric part my mind relax / let go / go blank helps.

It feels like I'm not doing the random chore correctly (for like a split second), but it's better to just chill on a little faith than spin mental gears pointlessly.

oneepic 2 years ago

I didn't see other responses like mine, so I wanted to share that "why" was really important for me, not just how. I was afraid of disconnecting, and I wanted a really good reason.

Well, recently my headaches and itches have gotten worse. I feel that it's tied to my anxiety. I've had success showing myself that it's not 100% natural to think or obsess as much as I do, and there's a certain level of acceptance/trust/love that I didn't have in my life. That is helping me dramatically.

mettamage 2 years ago

My analyzing mode is always on. Whenever I was on Tinder, I needed to turn it off. I made a Spotify playlist with party tracks that made me feel like I had 8 beers in me. That helped, made the conversations a lot more fun to. No more logic brain but pure creative brain chatting.

So, yea, music can induce mood changes. I'm not necessarily saying you should create a playlist where you feel like you're losing 20 IQ points, but experiment with music! :D

hot_gril 2 years ago

The more I'm around other people who are social, the less I obsess over things. Church indirectly helped in that way when I had two SWE jobs.

costanzaDynasty 2 years ago

Ive had mostly terrible jobs before I got into programming and I learned to leave work at work. At my last job(non-tech) I got so good that the second I drove out of the parking lot I forgot I had even worked. I also exercise after work and it really helps kill negative energy.

  • az09mugen 2 years ago

    "I got so good that the second I drove out of the parking lot I forgot I had even worked." this reminds me the serie Severance

austin-cheney 2 years ago

I solve my toughest programming problems during my cool down walk after a long run. This is a blessing, because the time is spent regardless.

sys_64738 2 years ago

The method I use is to always leave when you've solved the problem for the day. Don't start another afterwards.

lagrange77 2 years ago

Of course it shouldn't get obsessive, but i let my brain do it's thing in that context.

joseferben 2 years ago

Very interesting thread, thanks for asking the question. Could any spouses of SWEs chime in?

shaunxcode 2 years ago

Double down. Get to the point you perceive of everything in terms of pi calculus.

cryptoboy2283 2 years ago

Kids?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection