Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Need tips from Software Developers on maintaining health
20 points by srbhr on Oct 28, 2023 | hide | past | favorite | 23 comments
Hello World, I'm struggling a bit with my health. As a software developer all day long, I keep staring on my laptop. Sitting and I'm so used to this that even on Saturdays, I've (out of habit) open up the laptop and try something out.

This is impacting my health. - I've gained weight. - I've got nothing else to do. - I have tried gym but extensive work hours keep messing with my rhythm.

The internet advice is from people who aren't in the same situation as I am. They say wake up at certain time, eat X Y Z meals. N % protien, G gms of Sodium etc. But I on the other hand need to run builds, do deployments, and fix if anything is broken. I get mentally exhausted by the end of day.

How are you able to deal with this? Need help please.




1. Home office. I decide when I go to co-working or to our actual office.

2. Running. I even have calendar blockers at 11am on some workdays during autumn / winter season, so that I actually see sunlight.

3. Swimming. Same as 2)

4. Walking. Same as 2) and 3), but when sick(ish), demotivated, injured. Religiously take that damn 11am-12pm slot for myself. Builds can run during that time :)

5. Daily exercises before work.

6. Daily meditation to wind down after work.

7. Bike everywhere, when weather allows. I believe that's why I'm rarely sick; not catching anything from public transportation.

8. No screens 1h before bed. Books, music, journaling. Guaranteed I'll fall asleep before 11pm :)

9. No work laptop during the weekend. Go out, shop, walk, hike, bike/swim/run more.

Well... Sometimes these plans change, sometimes I zero out on the whole list, but I know that that's fine, and temporary, later I will so much miss it that I start again.

As my friends and colleagues describe me, I'm very energetic. I'm sure my daily schedule helps to stay like that.

(YMMV, I don't own a car, I don't have kids, I'm healthy, etc.)


Wow, your regiment is really awesome. I also work from home, but soon will have to start working from the office.

I will take your list seriously and will try to accomplish whatever I can. I'll try to add running.

At what time do you wake up?


I try to sleep 11pm-7am. Not gonna lie, 11pm is sometimes 11:30, sometimes 1am. Don't insist on the "rules" you set for yourself, look for the results :)

I am in tech, for the next couple years I feel secure I will have a job. If my employer would want me in the office, I'd quit so that I can work somewhere where they don't want me in the office. I deliver more than the average, but I also spend less time on commute than the average.

Don't go back to the office, that's my suggestion. YOLO, wasting time at the water cooler is stupid in my eyes. I do meet friends almost daily during summer, I have a ton of time for myself, and let's be honest, if I fail only half of my own list on a given day, I still did more for my well being than most of my colleagues.

And you know what: I DO "fail" the schedule, quite often. :)


Okay your insights are really awesome, as someone who takes their work too seriously I think, I should focus on my health and some tips you've provided are really amazing. Thanks kmarc, SDEs need more advice (on diverse topics) like yours.


If it makes you feel better, I also do take work sometimes too seriously. Then I'm unsatisfied, then I tableflip and find something else. Not great. You ask me in ten years, probably still will be nowhere on my "IT career".

I focus rather on the non-IT "career".

As I said, YMMV... Also, take internet strangers' opinions with a grain of salt.

Let us know here next year, what form of exercise you picked up. Enjoy the ride ;)


Yes, thanks a lot.


Hey I’m happy to share some things I do in case it helps. I work about 12-14 hours a day. Sometimes more. Rarely less.

First, I have a timer set for every 30 minutes on my phone that I refresh each time it goes off.

When it goes off, I stand up and look outside. Gives my eyes some rest. I do some stretches. Sometimes I do a plank for 45s to a min. This really helps offset the back pain from sitting for me. Then it’s back to work. I do this pretty much the whole day.

Another thing I do is a stroll after eating my lunch. I usually order food or meal prep, so takes about 20 min to eat (chew don’t rush). Then I have 15-20 min to take a stroll around the apartment complex. Look at the sky. Listen to the birds. Think about no stressful things.

I try to never miss sunset. Not sure why but taking 10 min to see the sun set is fulfilling to me. Makes me feel like saying bye to an important friend until tomorrow.

Finally before going to sleep I take another stroll. Here I think about what went well today. What I want to accomplish tomorrow. I write this on an index card back and front side. If it doesn’t fit on index card it’s too much work for the day.

I shred the previous days card lol.

On weekends I exercise by hiking on Saturday for a couple hours in the am.


#0 I'm not a health professional! #1 Get a dog and regularly walk it in GREEN zones (parks/gardens). #2 Follow the Mediterranean diet, doing so could extend your life span. https://edition.cnn.com/2022/01/04/health/mediterranean-diet... #3 Consider taking magnesium just prior to bed. https://www.huffpost.com/entry/magnesium-the-most-powerf_b_4...


I've been struggling with health/weight myself and stressful work + personal life. So I feel for you, what you are going through takes its toll on a person. It's also great that you want to change this, because you can.

The most important thing I realized is that there are two factors at play: mental health, and physical health, and they go hand in hand. If I have a stressful week, I am more likely to not exercise. If I feel bad physically, e.g long nights staring at the screen, no movement, I am more likely to get stressed at problems at work. It's a vicious spiral.

The good thing about that realization is that feeling better physically also helps make taking things at work easier, and on the other hand, being able to distance myself mentally from work gives me the peace of mind to go and do some exercise. So any way you approach this, the result is the same: healthier body and mind.

With that said, what I do practically is the following:

I log off at the appropriate times, make sure to not have too many tasks at the same time (best is only 1 at a time), and keep reminding myself that work is never going to finish, and I can always continue tomorrow. I also try mindful breathing whenever I feel like it, and some guided meditation. Also, I stopped joining work meetings where I think the information is not beneficial for me or the topic is not interesting. And I listen to chill music with OK-ish noise cancelling headphones.

On the physical stuff, I stretch, make some light bodyweight exercises, and hit a boxing bag once or twice a week. And I sometimes go bouldering (despite sucking at it). I also try to have at least an hour of a walk daily, whether it's going to the store for groceries, or just walking around and looking at trees or that kind of stuff.

These strategies don't always work for me, I don't think there is a silver bullet in these kinds of matters. There are days where my shoulders are stiff from the work pressure, my mind is spent, and I just want to eat junk food and watch Netflix, and that's okay. Following a plan too strictly, at least for me, is a sure way to not do anything or get stressed if I miss a day of exercise. Let yourself not be perfect, cause nobody is.


From the "it might work" department: Wear a hat, or a lanyard, or something else when you're "at work", take it off when you're done. You'll signal to yourself and others the different modes of using the space you're in, and the laptop.

Alternatively, only use that laptop for work, get a different one for non-work, gaming, etc.

You need to get outside for at least 15 minutes twice a day, minimum. No matter how cold, wet, hot, humid, etc.

Set time limits using physical or virtual timers, stop when they tell you to do so.


Thank you. Yeah, fixing a laptop for working would also work I believe.


Alternate day "fasting". 500 cals every other day or just two or three non-consecutive days a week (I usually do Tues, Thurs, and Sun). Don't worry about what to eat on any particular day and on non-fasting days eat whatever and however much you want. Works well for me to lose and maintain my weight within a certain range.


the bottom line is that you NEED to prioritise your health. You NEED to make the time to workout, cook healthy food, etc...

It's not easy and life (and work) does get in the way, but ultimately you will need some form of lifestyle change to achieve better health.

Best thing about being a dev is that you can chuck your laptop in your bag and work from anywhere - lean into that. Try working from the gym some days, that way you can commute there early, setup and get a workout done during lunch hour.

Let me know if helpful and can keep elaborating


sleep, healthy food, exercise.

i’ve been doing max 1hr exercise every other day, alternating between two routines. you want to be sore on the off days, but not annoyingly so. adjust routines over time as needed.

1hr means it easy to squeeze in. typically it’s in the long dinner break time between morning computer time and evening computer time. pre-dinner obviously.

toss a yoga mat on the floor next to your desk. one routine can be stuff like pushups, situps, mountain climbers. the other can be working a single dumbbell alternating arms.

you can also figure out a quick 10 minute streching routine, and do it every day mid day and before bed. toe touch, down dog, quads.

chin up, you got this!


Thanks a lot!! : )


I started to walk 3 miles a day 3 years ago. I lost 80lbs.

Do this and then think about what you eat next. Measure progress in months and years, not days and weeks.


somewhat controversial - some say it's just placebo effect but I read the most amazing stories of men (if OP is not male sorry, off topic then) at this sub https://www.reddit.com/r/Semenretention/ It's 180 turn around from the rest of society. But everything mentioned above improves. If it's placebo effect I'll take it!


Okay I'll take a look, thanks for suggesting. : ) (I'm male)


I was in your shoes long ago. Burnt out. Angry. Tired of being tired. I tried everything. Honestly the best thing for my health was changing to a less stressful job.


I'm glad it worked out for you.


Thanks a lot <3. Some really amazing advice has been shared, I'm taking notes and I'll start working on it. Thanks : )


Don't be a software developer:-)


Yeah but the golden handcuffs, man... they are pretty.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: