R. Harrison's Blog, page 42

November 21, 2015

A Fun Thing to do with Young Children

This is a trick we used to do in Cub Scouts:

annotatedbox


Baking in a box. Take moderate-sized box, we usually used one the size used to deliver copier paper came in (24cm x 24cm x 48cm or so). Line the inside of the box and the lid with aluminium foil  (staples are a good way to attach it to the lid.) Put some stones or a tile on the bottom, both to hold down the box and to protect it from the coals. Run a few coat-hanger wires through about 2/3 of the way up to form a rack.


Light charcoal (this needs adult help or supervision), putting about 10 briquettes in an pan. The pan goes in the bottom of the box. When the lid is on the box, the air inside it will get to about 300-350 F (150-200C) which is well below the ignition temperature of paper, but more than hot enough to bake with.  A small tray with cookies or biscuits can go on the rack and after a few minutes will be baked. Since the temperature depends on how well the lid seals (there has to be some leakage to keep the coals burning, but this isn’t usually a problem), the exact baking time and temperature will vary.


Still it’s good fun, requires little advance preparation, and can be put together by 8-11 year old children without much assistance from mom or dad. Beats an “easy-bake” any  day.


 •  0 comments  •  flag
Share on Twitter
Published on November 21, 2015 07:12

November 20, 2015

Traditional Thanksgiving Turkey #recipe

This is our traditional way of preparing the thanksgiving bird.


Stuffing for a smallish turkey:



one loaf white bread
one pound cheap fatty pork sausage
four or five stalks of celery
one or two onions
salt, pepper, thyme, sage to taste
two eggs

Cook the sausage, crumbled up in small bits. Chop and add the onions and celery. Cook to sweat that. It should be limp but not browned. Add about 1 teaspoon dried sage and 2 teaspoons dried thyme.

It should look something like this:

20141127_104735

I would taste a small amount, and possibly add pepper (< 1 teaspoon) and maybe salt (there is usually plenty in the sausage). I typically use “lite” salt that has potassium chloride because I like the extra potassium in my diet.


While it’s cooking clean the bird, remembering to remove the neck and gizzards (use them to make gravy).

20141127_105536

Salt both the outside and inside of the bird. (The red dot is from a thermometer plug that’s common in the USA.) Find a pan which will fit it.

20141127_105531


Coarsely cut the bread into cubes and add to the mixture. Add the eggs to it and mix.

20141127_110505

I will typically deglaze the pan by putting about 1/2 cup of water in it and reducing that to about half the volume. It removes the brown, tasty residue from the pan and converts it into a brown, tasty liquid that gets added to the stuffing.


Stuff the bird. Cover in foil and bake at a moderate heat (300F, 150C) until done. I usually remove the foil about an hour before serving to let it color up.

20141127_163317


 •  0 comments  •  flag
Share on Twitter
Published on November 20, 2015 07:51

November 19, 2015

Morning Joy

Claude McKay


At night the wide and level stretch of wold,

Which at high noon had basked in quiet gold,

Far as the eye could see was ghostly white;

Dark was the night save for the snow’s weird light.


I drew the shades far down, crept into bed;

Hearing the cold wind moaning overhead

Through the sad pines, my soul, catching its pain,

Went sorrowing with it across the plain.


At dawn, behold! the pall of night was gone,

Save where a few shrubs melancholy, lone,

Detained a fragile shadow. Golden-lipped

The laughing grasses heaven’s sweet wine sipped.


The sun rose smiling o’er the river’s breast,

And my soul, by his happy spirit blest,

Soared like a bird to greet him in the sky,

And drew out of his heart Eternity.


 •  0 comments  •  flag
Share on Twitter
Published on November 19, 2015 14:45

Training the Next Generation

My day job involves warping, um teaching young minds the art of computer programming. Every now and then I get to slip in something fun.


This assignment is one where the students do a completely automated decryption of what was up until well after WW2 a state of the art cryptosystem.  While I did weaken it a little (a short key rather than a very long one), the linearity of the cipher is a fundamental weakness. More than a few of the students did the whole project, and at least one found it pretty cool. Cool enough to think about working for one of those un-nameable three letter agencies.


The basic techniques were used at Bletchley Park both for Enigma and Lorenz.


DSC_0319


Although largely by hand (until they built the machines) in small dark offices like this one. (Turing’s). Could you do it?



Assignment 8


RWH


due November 5 2015


Another encryption assignment



Vernam Encryption Write a program in C that will encrypt a file use XOR and a Vernam key. A Vernam key is a short string. (The real system used a much longer random sequence.) Read the input at low level, as binary data (hint unsigned char is useful here.) Then xor each character in the binary data with the character in the key. When you get to the end of the key reuse the key from the beginning.

The program should take command line arguments for the key, input and output.


./vern abc input.clear output.encrypted


Note that the cipher should decrypt its own output. The command:


./vern abc output.encrypted input.clear


should recover the original input. If you use open to create the output file, you may want to also set O RDWR or O WRONLY as well as O CREAT. You could also use fread and fwrite for this problem.



Finding the period

This cipher is vulnerable if the key repeats, and with a short key, like abc above, it will repeat many times for any reasonably sized input.


The incidence of coincidence slides the cipher along itself and counts the number of times the same symbol is seen.


ABCABCABC            count is 9


ABCABCABC then shift 1 ABCABCABC        count is 0


ABCABCABC then shift 2 ABCABCABC      count is 0


ABCABCABC then shift 3 ABCABCABC    count is 6


ABCABCABC


Clearly the period is 3.


Write the code to do that. The file classcipher.vrn is in my directory for this.



EXTRA CREDIT The character ’ ’ (space) is most common in English text. After finding the period count the most common character for each period and recover the key by XOR’ing it with ’ ’.

 •  0 comments  •  flag
Share on Twitter
Published on November 19, 2015 05:15

November 18, 2015

Swamp Critters

From a trip to the Lafitte wilderness, just south of New Orleans. Well worth braving the mosquitos.

DSC_0603DSC_0628DSC_0613DSC_0619


 •  0 comments  •  flag
Share on Twitter
Published on November 18, 2015 17:00

The Thaw

Henry David Thoreau


I saw the civil sun drying earth’s tears —

Her tears of joy that only faster flowed,


Fain would I stretch me by the highway side,

To thaw and trickle with the melting snow,

That mingled soul and body with the tide,

I too may through the pores of nature flow.


But I alas nor tinkle can nor fume,

One jot to forward the great work of Time,

‘Tis mine to hearken while these ply the loom,

So shall my silence with their music chime.


 •  0 comments  •  flag
Share on Twitter
Published on November 18, 2015 05:53

November 17, 2015

Mnemosyne

Trumbull Stickney




It’s autumn in the country I rememberHow warm a wind blew here about the ways!

And shadows on the hillside lay to slumber

During the long sun-sweetened summer-days.

It’s cold abroad the country I remember.


The swallows veering skimmed the golden grain

At midday with a wing aslant and limber;

And yellow cattle browsed upon the plain


It’s empty down the country I remember.


I had a sister lovely in my sight:

Her hair was dark, her eyes were very sombre;

We sang together in the woods at night.


It’s lonely in the country I remember.


The babble of our children fills my ears,

And on our hearth I stare the perished ember

To flames that show all starry thro’ my tears.


It’s dark about the country I remember.


There are the mountains where I lived. The path

Is slushed with cattle-tracks and fallen timber,

The stumps are twisted by the tempests’ wrath.


But that I knew these places are my own,

I’d ask how came such wretchedness to cumber

The earth, and I to people it alone.


It rains across the country I remember.


DSC_0948





 •  0 comments  •  flag
Share on Twitter
Published on November 17, 2015 14:16

Waiting for the Cranes

DSC_0521


It is a little early yet, but the Sandhill  Cranes overwinter near us. They love hunting bugs, frogs and other such small deer in the cotton fields at the Georgia Alabama border near Centre. We’ve even seen, once, the Whooping cranes fly through.


This shows what a 200mm lens does. I’m just waiting to try with a bigger one.


 •  0 comments  •  flag
Share on Twitter
Published on November 17, 2015 10:55

With Music

With Music



Helen Hay Whitney

Dear, did we meet in some dim yesterday?

I half remember how the birds were mute

Among green leaves and tulip-tinted fruit,

And on the grass, beside a stream, we lay

In early twilight; faintly, far away,

Came lovely sounds adrift from silver lute,

With answered echoes of an airy flute,

While Twilight waited tiptoe, fain to stay.


Her violet eyes were sweet with mystery.

You looked in mine, the music rose and fell

Like little, lisping laughter of the sea;

Our souls were barks, wind-wafted from the shore—

Gold cup, a rose, a ruby, who can tell?

Soft—music ceases—I recall no more.





DSC_0864


Slapton Sands

photograph (c) 2015 R. Harrison


Follow my blog with Bloglovin


 •  0 comments  •  flag
Share on Twitter
Published on November 17, 2015 05:03

November 16, 2015

Getting Buggy

dragonfly

I’ve taken almost all the pictures on this blog myself. It’s probably worth sharing a couple of tips for catching bugs and critters.

DSC_0009


The first trick is to use the correct lens, assuming you have a camera that can take lenses (The digital SLR’s are now, and have been for several years, more than good enough to be worth it for serious photography.) I use a moderate telephoto (200mm) for insects. It can focus close enough to bring the insect into focus, but lets you stay far enough away to not disturb the critter. I could use a longer lens, but the depth of field is too shallow – which makes it difficult to keep the creature in focus.


DSC_0996


The depth of field can be used to artistic effect, but I’ve found much longer lenses problematic.

DSC_0995

I use a “skylight” filter to keep the lens clean, but don’t bother with a polarizer for these (I do when taking scenery – with a wide angle lens, but that’s a different post.)


 


 •  0 comments  •  flag
Share on Twitter
Published on November 16, 2015 05:12