Nathan's Blog

Web development and useful information

Nathan's Blog

Author: Nathan Kowald (Page 1 of 8)

Health, Happiness and Hunter-Gatherers

Exercise and a good diet is healthier for you than being sedentary and eating junk food. Why though?

Is there a model of health that can explain why exercise and a good diet is healthy? Can this model predict other activities that promote health and happiness? One model that accurately predicts healthy activities is living like a hunter-gatherer.

Our bodies evolved over millions of years where hunting and gathering was the dominant way of life.

Two million years is a lot of time for evolution to reward the activities that helped us survive and reproduce. Eating food is an essential activity for our survival. The way we got food in the past is a lot different to how we get it today.

Three ways we got food:

  1. Hunting and gathering
  2. Agriculture
  3. Agriculture & Technology <-- today

A timeline from this blog that shows just how long we were doing this hunting and gathering thing.

Hunting and gathering was humanity’s first and most successful adaptation, occupying at least 94% of human history.

There is evidence of our ancestors hunting and gathering as far back as 2 million years ago. When we (homo sapiens) appeared 200,000 years ago hunting and gathering was still the dominant way of life. It stopped being the dominant way of life around 12,000 years ago with the move to agriculture.

I’m using 120 years ago as the introduction of refined processed foods, enabled by improvements in technology.

If we include our ancestors:
Hunting and gathering = 99.4%
Agriculture = 0.6%
Technology = 0.00006%

If we only include humans (homo sapiens):
Hunting and gathering = 94.3%
Agriculture = 5.7%
Technology = 0.0006%

That’s a lot of time to adapt us to hunting and gathering!

Here are some examples of health advice, and how they match those hunter-gatherer activities that lead to survival and reproduction:

  • Exercise. It boosts physical strength, makes you happy, lose weight, increases your energy levels, improves brain function, memory and sleep (1)
    It was beneficial for hunter-gathers to be at their best while finding food. Exercise is analogous to hunting and foraging… here, have some BDNF to improve your brain function for the hunt. Exercise use to happen naturally. It was tied to our survival.
  • Walk 10,000-15,000 steps per day (2)
    Same thing. Hunter-gatherers walked and hunted for food. Their survival depended on being active.
  • Intermittent fasting(2)
    It increases BDNF and attention. I’m going to give your brain a boost to give you the best chance to find food.
  • Eat fruit, vegetables, small amounts of lean protein and fish (3)
    Hunter-gather diet.
  • Avoid processed foods, added sugar and bad fats (4)
    Our bodies are not adapted to eating lots of added sugar, fat and processed food. We feel good when we eat these things because it used to be hard to find calorie dense foods like honey. When we did we were rewarded with a surge of dopamine (survival and reproduction neurotransmitter). Energy dense foods are good for survival.
    Today you can easily get these dopamine hits because sugar and fat is everywhere, and cheap!
  • Sun exposure produces vitamin D, lowers cortisol, increases serotonin and dopamine (5)
    Hunting and foraging in the sun.
  • Being in nature makes you happier and more creative (6) 
    Hunter-gatherer life.
  • We learn best through trial and error (7)
    Hunter-gatherer learning is practical.
  • We are social animals and feel happy when we help each other (8)(9)
    We are adapted to live in close communities of about 150, as our hunter-gather ancestors did.
  • Minimalism (10)
    Hunter-gatherers were nomadic. They moved where the food was.
    They could not carry a child, a 60″ TV, two wardrobes of clothes etc. Could be why we feel free when we own less stuff.
  • Sleep (11)
    Before the invention of artificial light – which suppresses the sleep hormone melatonin – we were more likely to get better sleep.

That we’re born with Hunter-gatherer bodies into an environment that’s so different to the one we’re adapted to explains today’s mismatch diseases.

Two great books on the subject if you want to know more:

References

  1. http://informhealth.com/neurotrophins-fertilisers-for-your-brain/
  2. http://www.health.com/heart-disease/how-many-steps-a-day-prevent-heart-disease
  3. https://edition.cnn.com/2017/07/05/health/hunter-gatherer-diet-tanzania-the-conversation/index.html
  4. https://www.theguardian.com/science/2013/sep/22/dieting-disaster-evolution-daniel-lieberman
  5. https://www.selfhacked.com/blog/avoiding-sun-will-kill-14-proven-science-based-health-benefits-sun
  6. https://greatergood.berkeley.edu/article/item/how_nature_makes_you_kinder_happier_more_creative
  7. https://www.psychologytoday.com/blog/freedom-learn/201105/the-human-nature-teaching-ii-what-can-we-learn-hunter-gatherers
  8. https://www.theguardian.com/technology/2010/mar/14/my-bright-idea-robin-dunbar
  9. http://www.cracked.com/article_14990_what-monkeysphere.html
  10. http://www.greenhighfive.com/did-we-evolve-to-be-minimalist
  11. https://www.health.harvard.edu/staying-healthy/blue-light-has-a-dark-side

Dash Button with Raspberry Pi

I set up my Raspberry Pi to listen for Amazon Dash Button presses recently.
Raspberry Pis are excellent devices for monitoring Dash button presses because they use very little electricity, so can be left running.

I spent some time getting it working so I’m adding the steps I took here.

1. The easiest way to get a Dash button’s MAC address:
Follow the steps in this post to find your Dash button’s MAC address.

View story at Medium.com

2. Install the required dependencies:

# Update your software
sudo apt-get update && sudo apt-get upgrade

# Install pydhcplib
sudo apt-get install python-pip
sudo pip install pydhcplib

3. Copy this script to your Raspberry Pi
The easiest way is to use wget:

wget https://gist.githubusercontent.com/mr-pj/75297864abef5c8f2d5c134be2656023/raw/adc4de046c8972243eb322a6137d508da9c80372/dashbutton.py

Here’s the script:

4. Replace the script’s MAC address with yours

# Replace "50:f4:de:f1:3b:a0" with the MAC address you found in step 1
# It needs to be lowercase, with a colon after every two characters
dashbuttons.register("50:f4:de:f1:3b:a0", do_something)

5. Make your Python script executable

sudo chmod +x /home/pi/dashbutton.py

7. Test the script
Your Python script should now be able to detect your Amazon Dash button presses. Test the Python script by running:

sudo python /home/pi/dashbutton.py

Press your button and you should see the message, “button has been pressed”.

8. Update the do_something function to make it do something useful
I’m using mine to track toilet roll changes. When I get down to two or less I send an email reminder.
I’m using another Dash button as a “digital habit tracker”.
I’m logging morning Meditation to a habits.txt text file on my Raspberry Pi. I’ve ordered four more to track other habits.


Analogue is so trendy.

Other uses for your Dash button:
Order pizza
Wireless doorbell
Control smart lights
Send a text
Track baby data
Track practice sessions

8. Set the Python script to run on startup

Edit /etc/rc.local

sudo vim /etc/rc.local

Add the following to the end of /etc/rc.local (before exit 0

# Wait for an Internet connection
# If you connect using an Ethernet cable, change 'wlan0' to 'eth0'
while ! /sbin/ifconfig wlan0 | grep -q 'inet addr:[0-9]'; do
    sleep 3
done

# Network connection now exists: run Dash listener
# Change /home/pi/dashbutton.py to the path you copied the script to
# Send errors to rclocal.log <-- Useful for debugging sudo /usr/bin/python /home/pi/dashbutton.py 2>&1 /home/pi/rclocal.log &

# Make sure exit 0 is the last line of rclocal
exit 0

9. Reboot and test your script

sudo shutdown -r now

You should have the dashbutton.py process running in the background, listening for presses.
To verify your Python script is running type:

ps wafux | grep dash

You should see something like:

root      2490  0.0  0.6   3756  2296 ?        S    May21   0:00 sudo /usr/bin/python /home/pi/dashbutton.py /home/pi/rclocal.log
root      2499  0.0  1.8   8904  6924 ?        S    May21   0:00  \_ /usr/bin/python /home/pi/dashbutton.py /home/pi/rclocal.log

This means the Python script is running and listening for your presses.

Prepaid energy monitor with a Raspberry Pi

Instructions: https://github.com/n8kowald/powerpi

My flat has a prepayment energy meter.
Sometimes I forget to check how much money we have and the power goes out, forcing me to walk to the nearest open PayPoint location at inconvenient times.

I wanted a way to automate these checks.

The Raspberry Pi B+ enclosed emails me a photo of the money we have left

I had an unused Raspberry Pi B+, camera module (REV 1.3), and a USB Wi-Fi dongle. With these I could take a photo of the amount left and email myself a photo every day at a specified time.

It turned out to be easy.
The most time consuming bit was experimenting with raspistill options to produce the best photo for the dark cabinet it’s enclosed in.

Amount of money left on our prepaid electricity meter

Amount of money left on our prepaid electricity meter

As you can see the photo is not amazing. However, considering it was taken in a dark cabinet I’m happy with the result.

Full instructions here: https://github.com/n8kowald/powerpi

Next, I want to use Optical Character Recognition (OCR) to detect the amount in the photo.
I could then take readings every 5 minutes, save that to a database and produce a graph of the times when we use the most electricity.

Page 1 of 8

Powered by WordPress & Theme by Anders Norén