Swizec Teller - a geek with a hatswizec.com

Senior Mindset Book

Get promoted, earn a bigger salary, work for top companies

Senior Engineer Mindset cover
Learn more

    Software engineers, exercise, health, and productivity

    Fellow reader Nathan asked how exercise/diet/sleep affects your coding career and as a total nerd, I have opinions.

    Have you written any blog posts about how exercise/good diet/sleep affects your productivity/career? Could be interesting to hear about that from a ”Silicon Valley” person’s perspective. (From your perspective, and from other accomplished people at startups, FAANGS, etc., how do people who work in Silicon Valley view fitness/eating right/sleep? Is it a non-priority, super important, etc., etc.) Also some data (or your thoughts) on amount of caffeine intake, amount of sleep, amount of exercise effects on your perceived level of productivity could be interesting as well :).

    For background: I used to be deep in the productivity and self-hacking scene ~10 years ago while writing Why programmers work at night.

    The field, especially online, is full of gymbro science, techbro experiments with N=1, and inconclusive results that don't generalize. The nutritional research papers you can find all suffer from methodology problems, small sample sizes, funding bias, and difficulty controlling variables.

    You'll find a paper to support any position you want to take. Most research is aimed at [hospitalized] diabetes patients, which you are probably not.

    Modern consensus seems to be: This stuff is super individualized. Try a bunch of things and see what works for you. Observe yourself and adjust.

    Also, you are a plant with complex emotions.

    You are a plant with complex emotions
    You are a plant with complex emotions

    The "silicon valley" approach to health

    There's broadly two camps:

    1. The billionaire techbro who wants to live 1000 years with six-pack abs
    2. The techie with the body of a 70 year old at 30

    First group is the loudest. These are the people going crazy about glucose monitors, growth hormone supplements, electrolyte shite, weird workout regimes, crazy diets, and making life miserable.

    They love to buy things so you'll hear a lot of marketing aimed at these people. Don't mention "diet" in San Francisco because everyone has heard of every weird diet and their friend tried it once and grew a 6th toe and that was bad.

    Second group is the most common. Sitting all day staring at a screen eating takeout is bad for you. Surprise.

    Many people have gym memberships (everyone), few go regularly.

    Do you need all the things people are selling

    No.

    Supplements give you expensive pee. That's about it. Eat a balanced diet instead. A veg, a carb, and a protein at every meal and you'll be fine. Avoid mystery sauces and ingredients built in a lab.

    If you're getting cramps, add electrolytes. If you're feeling brainfog, you may be thirsty.

    Does sleep make you more productive?

    Yes.

    Your brain works better on enough sleep. "enough" is personal, try different things.

    Research shows that sleep gives you better mood regulation, improves memory, helps you focus, reduces hunger cravings, raises your effective IQ ... Basically sleep makes you not act like a cranky baby.

    Great book about this, which I've yet to read: Why we sleep

    Does exercise help?

    Yes.

    You are a monkey evolved to live outdoors and do things. Hard physical things. Sitting on a chair staring at screens will make you cranky.

    In Driven to Distraction, the authors argue that the rise in ADHD tendencies can in part be explained by our modern environments. They just don't provide the stimulation our minds and bodies need so we become fidgety and unable to focus.

    Exercise has been shown to have effects similar to medication for ADHD and depression. The author of Driven to Distraction likens "one dose of rigorous exercise" to taking a small dose combo of prozac and aderall.

    Other research shows that running helps with neurogenesis for adults – growing new neurons in the brain.

    Does good nutrition help?

    I don't know.

    It seems obvious that being hangry is no good. You're short-tempered and no fun to work with.

    And stuffing yourself full of pizza may make you sleepy. That makes working more difficult.

    I've seen great engineers who are super careful about their diet and I've seen great engineers who eat like crap. I think as long as you're getting enough food, your brain will be fine.

    But nutrition has a big impact on your athletic performance and physique, if you care about that.

    Caffeine?

    Yes, I love it. Many people do fine without.

    The big secret

    None of this stuff can make you smarter or more productive.

    But it can help you go at 100% more consistently.

    Experiment. Get some sun, eat clean, hydrate.

    Cheers,
    ~Swizec

    Published on March 31st, 2023 in Health, Opinions, Productivity, Reader question

    Did you enjoy this article?

    Continue reading about Software engineers, exercise, health, and productivity

    Semantically similar articles hand-picked by GPT-4

    Senior Mindset Book

    Get promoted, earn a bigger salary, work for top companies

    Learn more

    Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.

    Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.

    Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.

    Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev

    Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization

    Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections

    Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️

    Created by Swizec with ❤️