Program some health
into your life
CodeMash 2016

Stan Jónsson
@sjonsson
sjonsson.com
whoami
Nerd who accidentally got
interested in health & fitness
Software architect with family 

of 5 and little free time
Found ways to fit health into 

busy schedule
Want to share what worked for 

me in hopes of helping others
Health at work
The sedentary Programmer
Why is sitting bad?
A lot of science links sitting to 

decreased life expectancy
Increased risk of heart disease
Correlated with cancer
The sedentary Programmer
Simple solution!
Take a 5 min break every hour 

and move around
Side benefit: increases your 

creativity, attention span, 

and ability to remember 

new concepts
In total you need 60 min of movement

per day (20 min at brisk pace)
Tips
• Never use elevator
• Use restroom on another
floor!
• Park at far end of parking
lot
• Have phone/tracker buzz
you if not moved for 1 hour
Tweak daily routine
Nutrition Basics
Macronutrients
Carbohydrates
Fats
Protein
Protein
Crucial in building, maintaining 

and repairing body tissue
Satiating & high thermic effect!
Opt for lean meat, seafood, 

low-fat dairy products, eggs, 

beans, nuts & seeds, soy foods
Avoid meat and dairy products high in fat 

(Not right kind of fat & too high in calories)
Fats
Essential! Protects.
Brain is fat!
Opt for: Unsaturated 

(poly- & monounsaturated) 

Olive oil, avocado, fatty fish, 

seeds & nuts
Avoid: Saturated & trans fats

Excessive animal fat & 

processed food high in fat
Watch the calories!
Fats have more 

than twice the 

calories per gram 

than protein and 

carbs
Carbs
Main energy source 

of the body

Opt for: Complex carbs
Avoid: Simple carbs

(white stuff)
The dangerous carb
Why sugar is bad for you
What is sugar
Simple carb - fast burning
High in energy (calories)
Zero nutritional value 

(no vitamins, minerals or fatty acids)
We are stuck in this loop
while (true) {
• We eat sugar
• Body quickly turns sugar into glucose
• Glucose enters blood stream - bloods sugar rises
• Gives us energy - we feel happy
• Pancreas secretes insulin to drive glucose into muscles & tissues
• Blood sugar drops - energy dissipates and we feel lethargic & irritable
• We start craving sugar
} • Excess sugar gets
converted to fat
• Increased Type 2
Diabetes risk
Oscillating Day
Simple carbs
Complex carbs
Blood sugar
Time
Complex carbs +
protein + healthy fat
Tip
Craving sugar?

• Try drinking a glass 

of water & wait 10 min


80% of the time, body is
just asking for water
How to lose weight
One law 

to rule them all
“To lose weight, you must burn more
calories than you consume each day”
Law of Energy Balance
Law of Energy Balance
Level = Weight Maintenance
Scale tilts right = Weight lossScale tilts left = Weight gain
Guaranteed way to lose weight:
Tips
• Pre-create
common meals
• Use measure-
friendly serving
utensils
Use a calorie tracker to ensure a calorie deficit
Diet tips
• You can train yourself to eat (almost) anything if you give it a month
• Eat slowly - smaller portions
• Avoid drinking calories - they count a lot, but don’t fill you up
• Don’t be too aggressive in your calorie deficit - slow and steady wins the
race
• Read labels! Know what you are buying
• Don’t buy unhealthy food.  If it is not around when hunger strikes, you
can’t eat it
• Slip-ups are going to happen! One bad day is fine. Get back on track!
Don’t use it as excuse to give up on your diet plan

Diet tips - Reading Labels
Regular Cheerios has 2g sugars and 6g protein
Exercise
Cardio
• Heart health
• Burn calories - advance
your weight loss
Consider Cycling
• Easy to get started
• Low impact on joints
• Bike for leisure 

Explore neighborhood
• Bond with family
• Run short errands
• Bike to work
Weight Training
• Maintain muscle while losing fat
• Helps you lose weight
Time saving tips
• Do 1 set instead of 4
• Skip stretching
• Minimal warm-up (use
with caution)
• Exercise at home
Money saving tips
• Planet Fitness $10 a
month
• Dumbbells in basement
Weight Training
• Target major muscle groups 

2-3 times a week
Tips
• Must progressively
increase weight
• Mix it up to keep
from plateauing
• Lots of routines 

on YouTube
• In and out of gym in 1 hour
• Or 15 min a day at home
Sticking with the program
Track, track, track
• Keeps you honest
• Shows you progress
• Prevents slipping
Use fat mass,
not weight 

to measure
progress
Tip
Social Element
Misery loves company
• Workout with friends
• Connect online
“UP members with 3 or more friends on their team, move 10 extra miles a month”
Gamification
Whatever it takes to keep
you interested / motivated!
Virtual Trophy Case! 6:31/mi
9:16/mi
•
•
6:34/mi
•
Guess when the zombies where about to catch me?!
References


Stan Jónsson
@sjonsson
sjonsson.com
Tip
Buy the audio
books & listen
during your
commute!


Stan Jónsson
@sjonsson
sjonsson.com
Questions?


Stan Jónsson
@sjonsson
sjonsson.com

Program some health into your life

  • 1.
    Program some health intoyour life CodeMash 2016
 Stan Jónsson @sjonsson sjonsson.com
  • 2.
    whoami Nerd who accidentallygot interested in health & fitness Software architect with family 
 of 5 and little free time Found ways to fit health into 
 busy schedule Want to share what worked for 
 me in hopes of helping others
  • 3.
  • 4.
    The sedentary Programmer Whyis sitting bad? A lot of science links sitting to 
 decreased life expectancy Increased risk of heart disease Correlated with cancer
  • 5.
    The sedentary Programmer Simplesolution! Take a 5 min break every hour 
 and move around Side benefit: increases your 
 creativity, attention span, 
 and ability to remember 
 new concepts In total you need 60 min of movement
 per day (20 min at brisk pace) Tips • Never use elevator • Use restroom on another floor! • Park at far end of parking lot • Have phone/tracker buzz you if not moved for 1 hour Tweak daily routine
  • 6.
  • 7.
  • 8.
    Protein Crucial in building,maintaining 
 and repairing body tissue Satiating & high thermic effect! Opt for lean meat, seafood, 
 low-fat dairy products, eggs, 
 beans, nuts & seeds, soy foods Avoid meat and dairy products high in fat 
 (Not right kind of fat & too high in calories)
  • 9.
    Fats Essential! Protects. Brain isfat! Opt for: Unsaturated 
 (poly- & monounsaturated) 
 Olive oil, avocado, fatty fish, 
 seeds & nuts Avoid: Saturated & trans fats
 Excessive animal fat & 
 processed food high in fat Watch the calories! Fats have more 
 than twice the 
 calories per gram 
 than protein and 
 carbs
  • 10.
    Carbs Main energy source
 of the body
 Opt for: Complex carbs Avoid: Simple carbs
 (white stuff)
  • 11.
    The dangerous carb Whysugar is bad for you
  • 12.
    What is sugar Simplecarb - fast burning High in energy (calories) Zero nutritional value 
 (no vitamins, minerals or fatty acids)
  • 13.
    We are stuckin this loop while (true) { • We eat sugar • Body quickly turns sugar into glucose • Glucose enters blood stream - bloods sugar rises • Gives us energy - we feel happy • Pancreas secretes insulin to drive glucose into muscles & tissues • Blood sugar drops - energy dissipates and we feel lethargic & irritable • We start craving sugar } • Excess sugar gets converted to fat • Increased Type 2 Diabetes risk
  • 14.
    Oscillating Day Simple carbs Complexcarbs Blood sugar Time Complex carbs + protein + healthy fat Tip Craving sugar?
 • Try drinking a glass 
 of water & wait 10 min 
 80% of the time, body is just asking for water
  • 15.
  • 16.
    One law 
 torule them all
  • 17.
    “To lose weight,you must burn more calories than you consume each day” Law of Energy Balance
  • 18.
    Law of EnergyBalance Level = Weight Maintenance Scale tilts right = Weight lossScale tilts left = Weight gain
  • 19.
    Guaranteed way tolose weight: Tips • Pre-create common meals • Use measure- friendly serving utensils Use a calorie tracker to ensure a calorie deficit
  • 20.
    Diet tips • Youcan train yourself to eat (almost) anything if you give it a month • Eat slowly - smaller portions • Avoid drinking calories - they count a lot, but don’t fill you up • Don’t be too aggressive in your calorie deficit - slow and steady wins the race • Read labels! Know what you are buying • Don’t buy unhealthy food.  If it is not around when hunger strikes, you can’t eat it • Slip-ups are going to happen! One bad day is fine. Get back on track! Don’t use it as excuse to give up on your diet plan

  • 21.
    Diet tips -Reading Labels Regular Cheerios has 2g sugars and 6g protein
  • 22.
  • 23.
    Cardio • Heart health •Burn calories - advance your weight loss
  • 24.
    Consider Cycling • Easyto get started • Low impact on joints • Bike for leisure 
 Explore neighborhood • Bond with family • Run short errands • Bike to work
  • 25.
    Weight Training • Maintainmuscle while losing fat • Helps you lose weight Time saving tips • Do 1 set instead of 4 • Skip stretching • Minimal warm-up (use with caution) • Exercise at home Money saving tips • Planet Fitness $10 a month • Dumbbells in basement
  • 26.
    Weight Training • Targetmajor muscle groups 
 2-3 times a week Tips • Must progressively increase weight • Mix it up to keep from plateauing • Lots of routines 
 on YouTube • In and out of gym in 1 hour • Or 15 min a day at home
  • 27.
  • 28.
    Track, track, track •Keeps you honest • Shows you progress • Prevents slipping Use fat mass, not weight 
 to measure progress Tip
  • 29.
    Social Element Misery lovescompany • Workout with friends • Connect online “UP members with 3 or more friends on their team, move 10 extra miles a month”
  • 30.
    Gamification Whatever it takesto keep you interested / motivated! Virtual Trophy Case! 6:31/mi 9:16/mi • • 6:34/mi • Guess when the zombies where about to catch me?!
  • 31.
    References 
 Stan Jónsson @sjonsson sjonsson.com Tip Buy theaudio books & listen during your commute! 
 Stan Jónsson @sjonsson sjonsson.com
  • 32.