How FORTRAN changed my life.

Back in the day, when dinosaurs ruled the earth and I was a college student, I took FORTRAN. I was well on my way to applying to Medical School, great MCAT’s, good GPA at a serious university in a real subject, and it just seemed the way I would go.

Then in my final term, I took FORTRAN. WATFOR on punched cards, using a cpu-minute at a time on a big IBM mainframe. A multi-million dollar machine my laptop would run rings around today. I took to it like a duck takes to water. I was in love. Within the first day, I’d finished the book and was on my way. My backup plan, graduate school in science, became my plan. Probably for the best, as I’m not sure how inspiring a Medical Doctor I’d be.

I ended up using far more CPU time than I expect was budgeted. Tried some simple numerical integration techniques in my Statistical Mechanics class, probability distribution analysis for the lab I worked in, and even wrote routines that are still in use today. (Translated into C and incorporated in a molecular mechanics package.)

FORTRAN even influenced the science I ended up training in. The NMR people didn’t play with programming, the crystallographers did. So I started on my career developing and studying algorithms, by working out methods to squeeze big problems into little machines with appropriate approximation algorithms.

So while I’m not allowed to admit it today, at least not admit it and keep my credentials as a full fledged computer science profession, I still have a soft spot for the language.

Irish Soda Bread – with a Greek Twist

Not sure if this will work when I get back to the land of the free but it works well in the UK. My family was getting their fix of sausage, bacon, and black pudding (They’re different over here). The trouble was how to accompany them. Irish soda bread would be great, but
a) we didn’t have any baking soda, and
2) we didn’t have any buttermilk.

What we had was self-raising flour (coarser ground and a different wheat from the US), Greek yogurt and the ability to improvise.

Preheat the oven to 200C (figure this out yourself if you want to use irrational units – but 350F would be a good guess).
While the oven is heating mix and then kneed gently:

2 cups (more or less) or about 250 grams of self-rising flour. In the USA, use plain flour and add a tablespoon of baking powder. Self rising flour in the USA is very salty and a touch bitter, nasty stuff.
1 tsp salt
100g +- of Greek Yogurt. (about a cup, you can mix in a little milk if it’s too solid)
This should form a dampish dough. You may need to add some water, or flour, but the dough should hold together and not be sticky.

Put it on a floured baking sheet, and cut a cross in the top. It should look something like this:

After about 1/2 hour in the hot oven, it will look like this:

It will also sound hollow when you tap it. (Much like yeast bread). It goes very well with bitter, sausage and carrots.  It can be a bit tricky, and will sound hollow when slightly underdone, so if you’re not sure wait a few minutes.

I “re-purposed” an old post for this. Here’s what it looks like in the USA

2015-10-22 18.14.38 2015-10-22 17.22.13

This recipe would work as a “damper” bread and bake well in a Dutch oven.

Concealment.

Continuing on from yesterday…

Even if you use a cipher system that does not carry incriminating evidence, you’re still left with the problem of sending the message. There were more than a few German spies picked up by the British in WW2 because one of their suitcases concealed a radio set.

If a message is obviously secret, even if it can’t be read, it’s obvious that the sender was trying to hide something. That could mean a short stay in a nasty prison followed by a short drop on a patented neck stretching machine or a shave with the ‘national razor.’ Neither is recommended for your health.

By the way this is a problem with book codes. Possession of a certain edition of a book, unless it’s dead common, could be evidence.

So what is a refined genteel lady of the regency to do?

Secret inks and concealed communications.

Step 1: write a letter. Not a problem, then as now females wrote lots of communications. Not email, twitter or texting, but on paper. Remember to inquire after everyone’s health and to tell the recipient up front that everyone here is well. (or not).

Step 2: Prick out or underline certain letters or words in the message. These are the real message. If these markings are noticed, and they will be if they’re in plain ink, you may be in trouble. On the other hand, if they spell out a love missive, you will be excused. It was not uncommon in the days when parents read every young ladies correspondence, to use a subterfuge like this.

Step 3: Use a secret ink to mark out the real real message. You could skip step 2 if appropriate.

So what can you use for an ink?

Here’s the problem, possessing the ink is evidence of your intent to conceal. A Lady of Quality would have vinegars, a few cosmetics, and even the contents of the ‘gozunda’ available to her. These make reasonably decent ‘organic’ inks, where the compound alters the browning temperature of the paper. Heat it and the message is revealed. (There were ‘sympathetic’ inks which required a developing reagent available at the time, but they’d be problematic for a Lady to be carrying around.)

Ciphers.

One of the books I’m writing involves a young woman training to be a secret agent in 1803 England. The running title is either “The Art of Deception” or possibly “Pride and Extreme Prejudice.”

Spies like her would need to be versed in secret communications. Unfortunately, possession of a code machine – like Jefferson’s disks – would automatically show that she was a spy. So would possession of secret inks.

She needs a cipher, one that she could easily generate, and one where she could easily destroy the evidence. Given what was available at the time, the best idea seems to be to move the invention date of the “playfair” cipher back a few years and have her use it.

Playfair was the top British cipher for much of the 19th century, which only shows how lame were the opposition. It is one step up from mono-alphabetic encryption (the cryptograms you sometimes have in the better newspapers (although not the AJC)). It encrypts pairs of letters, but in a systematic manner. On a small enough and random enough set of messages this can be really tough to break. A not dissimilar approach occupied Alan Turing for much of 1942 and 1943 when trying to break the German Naval Enigma (they used it to encrypt the rotor settings). Long chunks of text and repeated keys are much easier.

It starts with a keyword and a square (could be a rectangle).  Say “nevermore” and a 5×5 square.

1 2 3 4 5
2
3
4
5

Put the keyword (nevermore in this example) in the first row, dropping repeated letters. Then fill in with the rest of the alphabet. Have I and J in the same square.

n e v r m
o a b c d
f g h i k
l p q s t
u w x y z

Then for each pair of letters do one of three things.

  • If they’re in opposite corners of a rectangle (th above) take the other corners of the rectangle th -> kq and ht -> qk.
  • If they’re in the same row or column (gh above) take the letters to their right or below gh ->hi, is -> sy. Wrap around if you have to. There are alternatives here. It’s a pity they weren’t used because this is a weak point.
  • If the same letter occurs twice in a row, ‘ll’ for example, encode it as lx lx.

That’s all reasonable, except the distribution of pairs of letters is not flat. ‘th’ is by far the most common pair, and much more common than ‘ht’. So given a long enough message we can count pairs and from that deduce the structure of the 5×5 square. Repeated pairs are very useful because they define relationships between infrequent letters.

One simple way to harden playfair (though not enough to make it secure by modern standards) is to make the key ‘progressive.’

a n e v r
m o b c d
f g h i k
l p q s t
u w x y z
a b n e v
r m o c d
f g h I k
l p q s t
u w x y z

And so on until the 13th iteration. After that it begins to lose too much key to be unique. (Iteration 25 would always be just the alphabet in the square.)

a b c d e
f g h i k
l m n v o
r p q s t
u w x y z

Other schemes would be better than this, but you get the idea.

Rock Cakes, Translating an old recipe

A recipe from the “Sure to Rise Cookbook.” About 1900. This is a typical Victorian cookie or biscuit, and something that would have dated back to the regency. Modern baking powders only date from 1843, but there were other approaches that would have been used before that.

From P.G. Wodehouse

This is one cook who thinks rock cakes aren’t rock cakes unless you break a tooth over them. (Clara Lippet in Sam the Sudden)

I’ve always been curious to see how they taste.

ROCK CAKES

1 breakfastcup flour

2 heaped dessertspoons sugar

2 ozs currants

2 ozs butter (or lard)

1 oz or 1 round candied peel

1 dessertspoonful Edmond’s Baking Powder

Milk to mix.

Rub the butter into the flour, then add the other dry ingredients, the egg beaten and sufficient milk to make stiff dough. Place in rocky shapes on cold greased oven shelf, and bake in hot oven 10 or 12 minutes.

The first thing to note is there is no egg in the list of ingredients. It’s basically a shortbread with fruit. So time for a little research. I found similar recipes on an Australian web site, and they use eggs. It looks like the idea is to make shortbread-like bits and then suspend them in a looser mix.

Using conventional ratios for flour and baking powder (1 teaspoon/cup) I get:

1 cup flour

1 teaspoon baking powder

1 tablespoons sugar.

Mix, then work in 2 oz butter.  It’s probably a good idea to chill this for a bit so it hardens.

Add 50 g raisins (can’t easily find currants in the US) and 50 g candied peel (I’ll weigh these, but it’s about a quarter cup of each). The Australian recipe uses 115 g of each and a 1 1/2 cups flour but 28 g is an ounce.

beat one egg and mix. Do not over work this. It took 5 teaspoons of milk to make it into a dough.

bake at 350 F (200 C) on a greased cookie sheet. (I use a silicon sheet, but grease will do.) Use lumps about the size of walnuts.

2015-10-19 18.00.55 Before mixing
2015-10-19 18.11.17 After the egg and 5 teaspoons of milk.
2015-10-19 18.13.52 Before baking
2015-10-19 18.32.50 After they’re done.

How’d it do?

  1. They’re not rocks. Very delicate texture.
  2. Not as sweet as modern cookies. Modern recipes have more sugar and vanilla which make them decidedly sweet.
  3. D*mned good.  I’d repeat this recipe.

Fall in Alabama

The leaves haven’t really started to change color, yet. Some of the hickory’s are yellow, the sweet gum purple, and the oaks a tad brown. but the fall flowers, butterfly’s and mushrooms are out. There was even a bee gather some last minute supplies for her hive.
DSC_0009 DSC_0995 DSC_0996 DSC_0022 DSC_0027

Frankenkitty #1 #wewriwar

Frankenkitty

Welcome to Weekend Writing Warriors.  This is a sample from my work in progress, “Frankenkitty”, and I hope you enjoy it.  It started out as a young-adult superhero book, and well, you’ll see. The heroine has just lost her precious cat, “Mr. Snuffles” due to an unfortunate interaction with a moving vehicle. Her elderly neighbor from across the street has a present for her. We begin there.


 

Jennifer opened the lid and looked at the contents. They were books; dusty old hand-written books.

“Mrs. Jones, what are these?”

“They were my great grand-vaters, from his laboratory.”

Jennifer opened the one she held and tried to read it, “It’s in German; I don’t know German.”

“Not German, Schwabish; bring it here and I’ll read the first few words.”

Jennifer took the first volume to Mrs. Jones. The old woman opened it and began to read, “Experiments in the reanimation of dead tissue.”

Jennifer asked, “What is this?”

“Didn’t you know, I am a descendent of the great Dr. Baron von Frankenstein; these are his journals.”


This is a work in progress. In other news, I’ve become a booktrope author, but more on that next week.

 

Persimmon Bread.

DSC_0323 The persimmons are just starting to ripen (they really need a hard freeze) and it’s a race between us and the deer for them.

American Persimmons are surprisingly flavorful, especially once they’re ripe. While they’re still green, they’re hard, bitter and unpalatable. Ripe means almost rotten looking, decidedly gooey and gross.

They’re also more than a bit of a pain to clean. So here are a few tricks to make persimmon bread or muffins. (By the way if you have a friend with a tree, don’t tell them about it. Just ask for the fruit.)

The easiest way to prepare pulp is to mash cleaned persimmons with about a cup of sugar. Then add about a cup of milk and stir. Filter the mix through a strainer and voila you have persimmon pulp already dissolved for baking.

I use it much the way I’d use banana’s to make banana bread.

Persimmon pulp as prepared above.

  1. 2 cups flour
  2. 1/2 cup vegetable oil
  3. dash of salt
  4. cinammon, ginger and possibly a tiny hint of allspice or nutmeg.
  5. 2 eggs.

Mix together. Add some flour if it’s too soupy and bake in a greased pan and a moderate (350 F 200C) oven until done. I usually make muffins.

Rather proud of this

It’s 30 years Oct 21.

In honor of that I made an assignment for my class:

You find an odd DeLorean parked around the corner. Realizing that Doc Brown has left the keys in the ignition, you decide that a quick trip back to England in 1815 for the purpose of buying the film rights to Pride and Prejudice, Persuasion, and Emma would be remunerative.

As usual, the car fails and you are stranded.

All is not lost, Miss Austen (or her brother Henry, a dashing naval captain) are good company and you decide to settle in for the long haul. She needs a business manager, and having few other practical skills, you volunteer. This means understanding English currency.

Fortunately, you have your laptop, with a python interpreter, and by the use of lemon juice, copper pennies and zinc you are able to rig up a battery to keep it running.

English money is denominated in pounds shillings and pence (L/s/d). There are 12 pence to the shilling and 20 shillings to the pound. Half-pence (hapennies) and quarter-pence (farthings) are used so you must handle sums like 10/4/5 3/4

  1. Write a python program that takes a list of money and sums them correctly.

1/2/3

2/18/9 should sum to 4/1/0

Leading 0’s are usually left off, so 2/6 is 2 shillings and 6 pence.

  1. Make it do subtraction.

2/18/9

– 1/2/3 1/2 should be 1/16/5 1/2

\

A Meat Pie in the English Style

A Meat Pie in the English style.

This is something that would have been eaten during the Regency (although without the pyrex baking dish). Dashed good, if I say so myself.

Cut 2 lbs (1 kilo +-) of beef into 1 inch/ 2cm cubes.
Marinate overnight in:
1/2 bottle guiness stout
1 cup red wine
teaspoon dried thyme
2 cloves garlic, peeled and crushed.
2 bay leaves.

3-4 hours before eating:
cut up and saute:
2 onions
handful of mushrooms
2-3 carrots

when soft add the marinade, a teaspoon of bouillon paste (or about cup of stock) and reduce.

Meanwhile, flour the beef and brown it in a frying pan.

Once the marinade is reduced:
put the vegetables in the bottom of a baking dish, cover with the meat. Use the reduced marinade to deglaze the  pan the beef was browned in. (There will be flour that has stuck to the pan, this will dissolve it to thicken the gravy.) Add the deglazings to the baking dish. If the volume is correct, it will just cover the meat.

Bake in a cool oven (300F, 150C) for 3 hours. Use a covered baking dish. (important, you don’t want it to dry out.) The meat should be very tender by this time.

Remove from the oven, place a pie crust over the top (I used Type L biscuit mix here; my sister in law in the UK uses suet dumplings.)

Return to the oven and bake at 375F 180C for 45 minutes until the crust is done.

%d bloggers like this: