Plutonic Rainbows

How Rice crippled the Japanese Navy

There is a great article this month in Atlas Obscura detailing how fine, polished white rice helped destroy the Japanese navy and upset most of the residents of Tokyo.

Gleaming white rice was a status symbol—it was expensive and laborious to husk, hull, polish, and wash. In Japan, the poor ate brown rice, or other carbohydrates such as sweet potatoes or barley. The rich ate polished white rice, often to the exclusion of other foods.

In his book Beriberi in Modern Japan: The Making of a National Disease, Alexander R. Bay describes the efforts of Edo-era doctors to figure out the disease. A common suspect was dampness and damp ground. One doctor administered herbal medicines and a fasting regimen to a samurai, who died within months. Other doctors burned dried mugwort on patients’ bodies to stimulate qi and blood flow.

Memorizing Logic

Today, I will start trying to memorise the Truth Terms. Basically if something is true or false. These symbols forms combinations to tell Python what to do in a given situation. Now it's just a case of making them stick in my mind. Most of them seem fairly self-explanatory.

and

or

not

!= (not equal)

== (equal)

>= (greater than equal)

<= (less than equal)

True

False

Adding

I wrote a simple script for adding that uses a function to hold two variables and then add them together. You create a function by using def and then giving it a name.

# -*- coding: utf-8 -*-

def add(value_1, value_2):
    print "Adding %d and %d together." % (value_1, value_2)
    return value_1 + value_2

cost = add(2345,1234)

print "The cost is: £{0:.2f}".format (cost)

Be sure to use the utf-8 value at the top or else Python will not understand the currency character.

Dedekind Cut - Tahoe

Great new album from Lee Bannon. Tahoe has huge, cinematic sweeps often accompanied by feelings of sadness or unresolved strife. A really excellent addition, if you're into atmospheric ambient works.

Calculating Time

Simple script to calculate days between two dates.

from datetime import *

today = date.today()
past_date = date(1994,2,10)
diff = today - past_date
print "That was %d days ago." % diff.days

I don't understand the need for the asterisk on the first line.