DEV Community

Cover image for How to lose weight as a software engineer
Winston Puckett
Winston Puckett Subscriber

Posted on • Edited on

How to lose weight as a software engineer

Find out where you are. Take a small step towards your goal. Adjust your understanding based on what you learned. Repeat.

Short background

When I was 8, I attended a pool party in my backyard. I had just stepped outside when a small girl looked up at me, ran to her mother, and whispered loudly, "mommy, why doesn't he have to wear a bra?"

In March 2018, I realized I had gained 60 pounds in 4 years. Given the trajectory, I was about to have serious health concerns. I had tried diets and calorie counting apps, even through childhood, and nothing stuck for more than 7 months. I needed something different. I was too disagreeable to hand myself over to a program for an extended period. Really, I needed the wisdom that software engineering provides.

I have successfully lost 60 pounds over a period of 3 years. Then I joined AWS and had a baby. Now I've lost 20 of the 40 I'd gained back.

Principles

When I realized I needed something different, I started to rethink how we do weight loss in America. Most of the marketing centers around adrenaline-induced motivation: do more, keep pushing, just do it. What if these didn't work for me because they don't work?

Instead, I started with a basic premise: approach weight loss as a scientist, not an athlete. Then, run safe experiments on your own body; don't rely on what works for someone else.

Here are the basic principles I've come to align with. By following these, I see sustainable outcomes which have guided me through the past 5 years.

0. Do the least amount of work to achieve your goal.

The muscles one uses for passing a test are unsustainable long term. Until 2018, I made the mistake of "trying too hard." I threw myself into weight loss and burned out quickly.

If you want to succeed, do simple things that use little willpower. I've found that weighing myself once a day and asking, "how did I get here?" then altering one behavior for a day is the least amount of work I can do to achieve a consistent result.

This turns weight loss into a flywheel. Smaller consistent changes lead to big results.

1. Expect to lose weight at the rate you gain it.

Don't sprint. Don't overwork yourself. This is an epic.

I've heard a (probably false) statistic that Americans gain one pound a year. If you lose one pound a year, you're twice as far ahead as most people in America.

If you set reasonable expectations of yourself (3 pounds a month was right for me when I started), you tend to make more sustainable choices. It's more about asking the question, "what does it look like to live comfortably as someone who's 10 pounds lighter than I am?" than "how do I lose weight?"

2. Measure somehow, consistently. Make your tools your friends.

If measuring weight directly sounds like punishment, don't do it. But find a consistent measurement that fluctuates within a fine-grained time window and correlates to the outcome desired.

When you find a measurement, treat it as a friend who tells you the truth, not a competitor. This will encourage engagement with measurement regardless of how the past cycle went.

Don't use calorie counting. This measures the input vs the output. What you're trying to measure is how your body responds over time, not your behavior around food.

3. Run experiments at fine-grained increments.

Shorter than a day if you can. For me, a day is just right. The more data collected, the more you find out how actions impact your outcomes.

This is just utilizing short cycle times.

4. Choose when to gain weight.

When I attend a holiday meal, I gain weight. Don't fight battles unless you're going to win. When you are presented with options, choose consciously whether or not to gain weight. It's not a "cheat day." It's a day where you've chosen your outcomes.

5. Celebrate small things

If you move in a positive direction, say, "yay!" out loud. It helps :)

Hopefully you do this in business too. Celebration is advantageous for so many things.

6. Change your environment more than you change your behavior

Over-utilizing willpower leads to burn out.

Instead of "trying not to grab the ice cream from the freezer," engage with something else that will fill the craving and stop buying ice cream. Maybe it's finding a group of friends to play a table top role-playing game with.

If you tend to eat at places with heavy foods during work, find a restaurant with good food that serves smaller portion sizes. If you tend to go with coworkers, maybe order a hot chocolate instead of a hamburger and then eat at your desk (that's an example from my life).

7. Set reasonable targets in public

It's much easier to lose weight if you're public about where you're at and what you're aiming for. Find a friend group which is happy to have updates on a cadence (maybe join a health challenge) and be open about where you're at.

This is the equivalent of "working in public." However, I don't know where I learned that software principle from and can't find examples. The basic idea is to surface progress early and often, which creates alignment between engineers and stakeholders.

8. Find a reason

For me, there were several. As I've mentioned, there were health implications. There were also several other reasons. Feel free to draw from these and find your own. Your feet take their own steps when you are aligned well.

Here are mine:

  • Health concerns
  • Mental health (depression mostly)
  • An idealized self image
  • Wanting to interact with future children fully

My experiments as examples

  • What happens if I use 2% instead of whole milk? I lost 1 pound that day.
  • What happens if I order a salad at this restaurant instead of a burger? I gained 1 pound instead of 3.
  • What happens if I go for a run today? Nothing changed.
  • What happens if I have some whiskey? Nothing changed.
  • What happens if I shift my food intake earlier? I lost weight. This is one of the most impactful changes I made.
  • What happens if I cut out caffeine? I gained 2 pounds over two weeks, then I started to lose weight again.

By running these experiments, we start to see what sorts of actions lead to what consequences. Running experiments more than once is also valuable to help isolate and correlate behaviors and outcomes. Once an action is found correlative with a desired outcome, we can utilize those experiments in my everyday life to achieve our goals.

Summary and how to get started.

Handing your body to someone else to take care of doesn't work. We all need to find what works for us. This post really just outlines what we've learned in software: run short experiments and gather data.

Get started:

  1. Choose a measurement tool and cadence for measurement today. Using a scale is effective.
  2. Run an experiment.
  3. Measure and record the results.
  4. Go to step 2.

FAQ

I've talked about this to a couple of people and there are some common questions I get:

"What if I was female assigned at birth?"

If your measurement tool is there to give you information, not to punish you, there's no reason to measure less frequently. Including data about your cycle is valuable information. We're looking for long term progress and fine-grained data collection.

"What if I need to make a change now?"

If your weight has crossed over into having immediate health implications, don't try to move slowly. Move at an unsustainable pace to get to where you need to be, then come back here.

Please follow advice from medical doctors over anything stated here.

Buy Me a Coffee at ko-fi.com

Top comments (36)

Collapse
 
morganney profile image
Morgan Ney

It’s really very simple. Diets don’t work and will never work. Americans are greatly confused about food due to marketing and lobbyists in Washington.

The only thing to do to lose weight is burn more calories than you consume in a given day over a period of time. That’s it. No really, that’s it. If you eat better quality food you can consume more instead of feeling like you’re “dieting”. This isn’t a diet, as I said those don’t work. This is a lifestyle change.

Use a TDEE calculator to figure out how many calories you burn a day, then start tracking the calories you consume: tdeecalculator.net/

The more you exercise the better. Everything else is a scam to make money.

Collapse
 
yutamago profile image
Yutamago • Edited

Recent science suggests that this is a myth.
Humans tend to have a fixed calories budget per day. If you burn more calories doing physical activities, your body uses less in other areas (brain, organs, immune system, etc).

When you start doing physical activities (after a long pause) you do raise your calories output, but this will normalize back to where you started after a short time. Same when you stop doing them.

This suggests that for sustained weight loss the only thing that matters is the calories input. Nothing else.

Physical activities have other health benefits, which are reason enough to do them. But you shouldn't expect them to be a silver bullet for weight loss.

Source: youtu.be/lPrjP4A_X4s
Also checkout their script. It includes hundreds of scientific sources.

Collapse
 
snowandcaffeine profile image
snowandcaffeine

I went through most of these sources and watched the video. It's a bit misleading as many of the snippets they've selected boil down to "the difference between active and non-active is around 100 kcal per day"

100 kcal per day is 36,500 calories per year, 10lbs.

If you had this habit and your twin didn't over the course of a decade there would be a massive delta just based on that small daily delta. The muscle, heart and inflammation benefits also mean a significant long term health impact. In fact all cause mortality is significantly impacted by working out.

The reality of weight gain in the US is based partially on this (long term habits), understanding of nutrition and food supply problems.

TLDR - yes, calories in is a huge element. Fitness, macro's and others also matter a lot.

Collapse
 
smartmanapps profile image
SmartmanApps

"Recent science suggests that this is a myth" - correct.

"This suggests that for sustained weight loss the only thing that matters is the calories input" - actually it matters WHAT the calories are. See my previous reply.

Collapse
 
denissmuhla profile image
Deniss Muhļa

Totally agree!
I've started ~half year ago and burned ~17kg (37.5 pounds) by doing just two things.

  1. Cook food by myself from raw products.
  2. Walk 10k steps every day.
Collapse
 
smartmanapps profile image
SmartmanApps

"The only thing to do to lose weight is burn more calories than you consume in a given day over a period of time"

Sorry, but that's completely wrong. It's believing in that which causes a lot of people to fail. It's not about how much you eat, but WHAT you eat. e.g. resistant starch, monounsaturated fat, low G.I., etc.. Exercise is usually counterproductive in that it makes you hungrier afterwards, and people tend to eat more, not less. Michael Mosley (R.I.P.) always advocated to exercise for health reasons only (such as cardiac health), and DON'T exercise if you're trying to lose weight. The idea that you just expend more calories than consume was only ever an assumption, and it's since been debunked many times. I lost 40kg with diet changes alone, didn't exercise at all in that time. I also did that without paying anyone money for anything - just implemented what I saw in shows by Michael Mosley, the Van Tulleken twins, etc.

Collapse
 
morganney profile image
Morgan Ney

So if I eat 10,000 calories of broccoli everyday I’ll lose weight?

Thread Thread
 
winstonpuckett profile image
Winston Puckett

At this point friends, it might be good to just say that calorie type and quantity are both relevant factors in a weight loss journey. I appreciate you both

Thread Thread
 
smartmanapps profile image
SmartmanApps

"So if I eat 10,000 calories of broccoli everyday I’ll lose weight?"

Does it contain resistant starch, monounsaturated fat, or is low GI? Maybe the last. Certainly won't be getting all the necessary nutrition from eating just one food though.

Collapse
 
kdemetter profile image
De Metter Kenny

An important realization is that you are biological machine, not a furnace.

Meaning that fat loss can be affected by whole lot more than calorie in vs out. It's much more driven by hormones ( insulin which regulates fat storage, leptin which regulates satiety and ghrelin which regulates hunger)

For healthy people it's easy : eat less calories than you burn.

But those people have no real issues losing weight.

When you get you get to the point where you have to lose weight, you likely already have :

  • insulin resistance which makes fat loss much more difficult
  • leptin resistance which makes you hungry all the time

This is caused by eating too many carbs, by high stress and too little sleep. All things very familiar to the average software engineer.

Collapse
 
winstonpuckett profile image
Winston Puckett

I'd like this twice if I could :)

Collapse
 
emi_black_ace profile image
Jacob Van Wagoner

The number one problem with this approach is that weight data is noisy and there's no information you can get out of one day cycles.

You are correct, however, that you can't sustain any weight loss that relies on will power. You have to change it by changing your system.

Collapse
 
winstonpuckett profile image
Winston Puckett

I hope I've called out well that what's important is measuring something in a fine-grained time window. Please use whatever works for you!

Collapse
 
headofgears profile image
Vladimir Shalom

Two words - intermittent fasting. The weight loss results are great and consistent. Exercise and dieting just don't work, we all know that. Weight loss is 90% fasting, 5% diet and 5% exercise. For half a year I lost from 130 to 90 three years ago. Dr. Jason Fung - just watch what he says on his YT channel.

Collapse
 
smartmanapps profile image
SmartmanApps

"Two words - intermittent fasting. The weight loss results are great and consistent" - only for people who feel full when they've eaten enough. For the <10% of people who don't feel full then fasting doesn't work (because they overcompensate on the non-fasting days).

Collapse
 
headofgears profile image
Vladimir Shalom

Of course, that's not the whole picture. The biggest problem with feeling hungry all the time is eating unhealthy foods, so the first step is to get rid of sweet and baked foods in particular, and sugar and starchy foods in general - the main culprits of constant overeating. The second step is to eat as many natural foods as possible - vegetables, milk (not skimmed), cheese, butter, extra virgin olive oil, eggs, meat (the fatter the better) and so on. The third step is to gradually get into the habit of not eating less, but eating less frequently.

Thread Thread
 
smartmanapps profile image
SmartmanApps

And you're missing the part of the picture where it's a genetic issue (which is what I was talking about). You can do ALL those things you said and STILL feel hungry. You literally never get the signal from your stomach that you have consumed enough. For those people, fasting isn't effective, because you STILL have to watch your diet on the non-fasting days. People who do feel full don't need to, so fasting can be effective (their stomach tells them they're full before they go and overcompensate. From memory they typically only eat about 10% more than normal on the non-fasting days, so there's still an overall reduction, and can eat whatever they want on those days).

Thread Thread
 
smartmanapps profile image
SmartmanApps

P.S. I lost 40kg and didn't have to give up sweets, nor ate less frequently. I did have to give up on the idea of ever feeling full (which is what I realised when I saw the doco which mentioned this genetic issue - "Oh! That's me!!").

Collapse
 
michalispapamichael profile image
Michalis Papamichael

Consistent exercising, better diet(eat better), and live in a better environment which will makes you continue the cycle, this will eventually produce results. (Based on personal experience though still working on it)

Collapse
 
noxartdev profile image
NoxArtDev

I don't think the experiments are correct - you might have lost/gained 1 pound but you didn't lose/gain 1 pound of fat. Weight fluctuates throughout the day and from day to day for multiple reasons (large part is water), this is completely inconclusive. If you see -1 pound the reality might be +0.5 pound of fat and -1.5 pound of water

Collapse
 
winstonpuckett profile image
Winston Puckett

This is a totally fair critique, and the reason I tend to run experiments multiple times.

One of the experiments I ran was just adjusting when I drink water, which shifted my weight by about two pounds.

For me, direction is more important than accuracy, so if an experiment stops yielding results, I find a different experiment to run.

I thought about using something more accurate, but everything was either too expensive for me or too much effort day to day. Measuring weight directly has been accurate enough to continue yielding results over a long period of time

Collapse
 
shah_kaleem_91e4c45cd8142 profile image
Shah Kaleem

My takes after a few years of experiment.

Exercise is the worst and slowest method to lose weight. It helps you to gain confidence, stamina, muscles, and better health, but not weight.

Diet does not work, but fasting works wonders. It may be confusing, but there is a difference between dieting and fasting.

Collapse
 
smartmanapps profile image
SmartmanApps

"Exercise is the worst and slowest method to lose weight" - correct. Michael Mosley (R.I.P.) specifically advocated AGAINST exercising whilst trying to lose weight.

"Diet does not work, but fasting works wonders" - diet works if you're following the right advice for you. Fasting didn't work for me because I'm one of those people (less than 10%) who doesn't feel full, like ever. Fasting works for the rest because you don't overcompensate on the non-fasting days - cos you end up feeling full and stop eating before you've overcompensated - doesn't work for those who don't feel full. The only option there is diet changes.

Collapse
 
winstonpuckett profile image
Winston Puckett

We've definitely seen similar things with exercise - I struggle with depression and exercising works wonders for my mental state, but does almost nothing for my weight

Collapse
 
barry_rijsdijk_5b490d29aa profile image
Barry Rijsdijk

At the beginning of my weight loss journey I was so curious about what my weight was during the day and week that I weighted myself constantly.

Now that I know that my weight fluxuates throughout the day and even week I am no longer concerned about a possible uptic. As long as I keep track on my journey I know that the longterm results will be met.

I do intermediant fasting, keto diet, cycling and bodybuilding-light.

So farI lost 20kg dat and gained a couple of kg in skeletonmusscle.

Collapse
 
smartmanapps profile image
SmartmanApps

"Now that I know that my weight fluxuates throughout the day and even week" - things you eat/drink can be in your system for days, so daily weigh-in is just a rough guide of how you're going - the long-term trend is what matters.

Collapse
 
tig_3r profile image
Ray

Losing weight does not mean you are healthy but can help you be healthy.

  1. Have Apple cider in the morning. It'll help reduce your blood sugar spikes

  2. Eat less. You don't need to eat 3 times a day.

  3. Practice fasting. If you snack all day your blood sugar is high and you'll crave food as soon as it goes down

  4. Eat more proteins and high fibre carb.

  5. Exercise. It can be as simple as a daily walk

  6. Read the glucose revolution

Collapse
 
mardydev profile image
Joseph D'Souza

I'm fortunate to not have any weight issues right now that need solving, but I love the way this article is written. It perfectly maps to my mind. So, I read the whole thing! Thanks for sharing and well done for a brilliant solution. Keep up the good fight 💪🏼

Some comments may only be visible to logged-in visitors. Sign in to view all comments.