Saturday, 14 February 2015

AES as a test of software engineering

I've recently been using an AES CCM program that someone wrote at work a while back - apparently downloading one of the many public implementations was a bad idea, for some mysterious reason. It works. I'm using it to compare to hardware, and since the two are completely independent versions, if they agree its virtually certain that the hardware is correct. So far so spiffy.

I've only briefly looked at the internals of the program but I have read the wiki page, and its fairly clear that, whilst not exactly rocket science, getting the code right is far from trivial. And I know this in the other direction from personal experience, as I struggled with getting the encodes to match whilst guessing what byte-ordering the hardware used; as is deliberately the nature of this stuff, if you get even a tiny bit wrong the whole output is junk.

But the interesting bit, to me, is that I regarded the guy who wrote the program as close to incompetent. Certainly I wouldn't have trusted him to do anything major on his own, and I watched him struggle on a variety of tasks making simple mistakes that someone else had to come in and undo. And this throws up the difference between software engineering and programming. I'm a software engineer, at least in my own mind and in my job contract. The amount of time I spend actually writing computer code is a small fraction of my time. Its clear you can be a reasonably decent programmer - at least in terms of making programmes that produce the correct output - whilst being rather poor at the overall software engineering task (though even there I should qualify that somewhat. If you poke into the internals of the code its a mess, sufficiently so that I didn't stay in there for very long. And in terms of design, it doesn't really produce the output you want it to, exactly, nor does it allow you to input data in the form you'd want to, and the commenting is poor, and the documentation also. So much so that a simple perl script to pre-format the input and play with the output massively improved my productivity).

So much for the example. Onto the generics. Software engineering - collaborative working on a large codebase years old - is about far more than just making the bit of code you've got now, to work, just on its own terms. The code has to fit into the overall structure without bending what's already there, without breaking the poorly documented assumptions, permitting future maintenance and extension, to be readable, to run fast enough and not use too much memory; and more. And it has to do what it supposed to do, which - a familiar plaint - is frequently not quite what you've been told its supposed to do.

This makes recruiting people hard. Being able to write coherent C is a basic requirement, but its not sufficient. Unfortunately, its the only bit that really possible to hard-test in the limited time available. You can talk about all the rest, but its hard to judge bluster from real experience. In my experience.

Wednesday, 11 February 2015

Notes on The Composition of Kepler's Astronomia Nova by James R. Voelkel

I bought a copy of this, I forget who recommended it, most likely The Renaissance Mathematicus.

These are some notes, not a finished post, and will be updated I hope. Page numbers are from the hardcover edition.

The book, as a whole, is themed around Astronomia Nova being an exposition, rather than being the apparently-historical presentation of the research as it happened, that it appears to be. And the reason for this is that Kepler knew he would not be believed, so had to drag people through carefully contrived false leads, in order that they appreciate the truth when revealed.

p 56. We're still on the Mysterium Cosmographicum. The bollocks about the 5 solids is, errm, bollocks, but forget that. Kepler is thinking about the planets moving more slowly when further away from the Sun, and about the motive force that the sun provides (he has no idea of inertia, of course, so he's still thinking in terms of the Sun making them rotate. Since he has no real physics (he doesn't even really appear to distinguish physics and metaphysics very carefully). He's still rather stuck on the idea of celestial spheres (or is he? Probably, but on p 58 there's a quote where he notices that even without the spheres it all works; Voelkel's text claims that K claims that the spheres are non-existent, but that's not clear to me), but he *has* noticed that the same idea - slower further from the sun - that applies to the speeds of the various planets can apply also to the motion of individual planets. As far as I can see he doesn't try to quantify this, though. He's tried to quantify it for the relation between the size of the orbit and the period (but appears to have got his maths wrong, insofar as I understand it, ending up with *2 instead of ^2; p 109 notes this). But not within an orbit.

Its so hard to write this stuff without adding my own words; without misrepresenting by using words that mean different things; and of course I'm not familiar with their use of words either.

p 64. Letters to Haffenrefer, concerning the physical reality of the subject, and/or whether K could keep his chapter attempting to either reconciling Holy Writ with Copernicus, or showing that the Bible could not refute C. Showing that in 1598 calling heliocentrism a mathematical thing rather than a physical reality was the approved subterfuge. With H saying that good men would be incensed if K did otherwise. The trouble is that, with his wacky solids, K really did think he had managed to make some pure-maths stuff say something about physical reality; he thought he had done the a-priori stuff that previously people had thought impossible, and since this was his major claim to fame, he didn't want to drop it. p 65: H rather suggests that there has been more strife over astronomy within the church than is tolerable; I would take this as a suggestion that things really needed to be toned down, and certain things not talked about, regardless of who was right, for the greater good.

p 86: T saying that the orbits must be compounded of circles, because it would be inconvenient otherwise. WTF? p 87: T (and K, unbeknownst to T) both agree that the celestial spheres are immaterial (and therefore don't exist? Less clear. Aether-like, perhaps).

[Long pause.]

Round about p 138 we're back on Kepler and the shape of orbits. Kepler has come to a version of the "area law" and has decided that circular orbits won't work; he needs the planet "closer" away from perigee / apogee, and hence the orbit is "oval" - but so far, this is qualitative. He's using the word "physics", but perhaps not in the sense we would. The sun is the source of motion - somehow - but the planet has its own spirit moving it closer and further; and since orbital speed depends on distance from the sun, this speeds and slows it. However, the then drifts off to an egg-shaped oval - broader at apogee, for whatever reason.

P 139 is interesting. The prevailing epicycles stuff essentially had the planet orbiting an empty point, not the sun. If you're thinking "physics" rather than geometry, this is incomprehensible. And to be fair to K, though his physics was odd, at least he appreciated this basic point.

P 152: the suggestion that Kepler's battles with Tycho's heirs - Tengnagel - could have lead to the apparently aimless structure of the Nova.


Feynman on Brahe
The sleepwalkers

Saturday, 31 January 2015

Entries for the Austrian Alpine Club (UK) photo competition

I've uploaded all my "maybe"s to 2014-Stubai-Maybe on flickr; the full set is 2014-Stubai and has nearly 700 pix. There are only 19 "maybe"s. There's also the blog-diary of the trip.

I'll list them all here, in order to decide which to actually submit.

1. Innsbrucker Hutte, from early on the Habicht, with the Kalkwand behind.

2. Cloud creeping over the Innsbrucker hutte and cloud sea beyond.

3. Green and White: east from the Nurnburger to the Inn. Wetterspitze.

4. [Chosen] From the Wilder Freiger: Becherhaus with Botzer in the background.

5. Lake below Seescharte, above Sulzenau hutte.

6. Same lake, distant views of Wilder Freiger

7. Path up to Sulzenau hutte.

8. [Chosen] Looking back on the Blaue Lacke above the Sulzenau hutte (1 of 4).

9. Looking back on the Blaue Lacke above the Sulzenau hutte (2 of 4).

10. [Chosen] Looking back on the Blaue Lacke above the Sulzenau hutte (3 of 4).

11. Looking back above the Sulzenau hutte (4 of 4).

12. [Chosen] The retreating Sulzenauferner.

13. Miriam en route from Dresdener to Neue Regensbuger.

14. Falbesoner bach in the Neue Regensburger valley.

15. Black sheep.

16. [Chosen] Head of the Grawawand.

17. Alpeinerferner above the Franz Senn hutte.

18. [Chosen] Up valley, above the Franz Senn hutte.

19. [Chosen] Flowers, Stocklen Alm.

Thursday, 1 January 2015

My vegetable love should grow / Vaster than empires, and more slow.

I'm reading "The Discarded Image" by C S Lewis. Part of it discourses on the tripartite soul, although I really shouldn't use that phrase as its wrong: the soul was not in three parts, nor were there three souls, but there were vegetable, sensitive and rational souls, or aspects to the soul. The vegetable soul was appropriate to plants, and encompassed growth and the like; the sensitive soul included sensation and movement, and was appropriate to animals and encompassed the vegetable; and the rational soul included rationality, and included both.

Which immeadiately brought to mind Marvell's
Had we but world enough and time,
This coyness, lady, were no crime.
We would sit down, and think which way
To walk, and pass our long love’s day.
Thou by the Indian Ganges’ side
Shouldst rubies find; I by the tide
Of Humber would complain. I would
Love you ten years before the flood,
And you should, if you please, refuse
Till the conversion of the Jews.
My vegetable love should grow
Vaster than empires and more slow;

An hundred years should go to praise
Thine eyes, and on thy forehead gaze;
Two hundred to adore each breast,
But thirty thousand to the rest;
An age at least to every part,
And the last age should show your heart.
For, lady, you deserve this state,
Nor would I love at lower rate.
Which is a somewhat puzzling image. It kinda fits; I've thought of vast ancient trees, or even sub-soil fungus; vegetables are certainly slow, and can be relentless; think of tree roots. However - especially when you consider the rather more animal imagery of the end of the poem - the opening here does fit if you interpret vegetable in the "soul" sense.

“Vegetable Love”: Marvell’s “To His Coy Mistress,” Herrick’s “The Vine,” and the Attraction of Plants says similar, and also brings in Herrick's "the Vine" which is far more disturbing. I also think his interpretation of the violence implicit (in the system! Ha) or explicit in the closing of the poem is wrong, because its mutual.


* Stoat: While the youthful glue / sits on thy skin like morning dew (2007)
* Stoat: Poetry (2009)
* Stoat: Tear our pleasures with rough strife / through the iron gates of life (2005)

Wednesday, 31 December 2014

Exercise stats, 2014

A follow-up to the exciting Exercise stats, 2013

According to heiaheia, in 2014 I...

* rowed 124 times, for a total of 1310 km (2013: 1162 / 113; 2012: 1297; 2011: 1280)
* ran 60 times, total 786 km (2013: 1095 / 85; 2012: 879; 2011: 1155)
* cycled 43 times, total 3258 km (I amalgamate each week's commuting into one entry. 2013: 3182 / 50)
* erged 28 times, total 168 km (2013: 113 / 13; 2012: 238; 2011: 381).

There are also entries for climbing and gardening and stuff.

A bit low on the running, but otherwise decent.

September 10th: Neue Regensburger to Franz Senn

Prev: September 9th: Dresdener to Neue Regensburger and Ruderhofspitze: fail.

DSC_4695 Taking up where that left off: I returned to the hut as the light rain eased off, to meet M just coming out. So we went back in. My kit to the drying room, and we have a cafe+cake, plus some apricots and hazelnuts from the supply M brought with her. And write up.

As we sit inside the cloud comes and goes, with no clear trend. We were aiming to leave at 14:30 but don't till 15:00; book time is 4h so unless we grossly overrun we should make dinner. The hut-duck and chicken have been guardians of the toilets for quite a few years now.

Its a long - pleasant - traverse around from the hut before we start  heading up. this gets quite steep in the zig-zags, but its all good path. Top after 1:30, pause for chocolate and water briefly as its raining and we're in cloud.

To "the knobble" ~2500 m at 2:20, then a steepish descent. The path makers have done their best but there are several boulder fields this side of the pass and if you're not comfortable hopping from one slippery-when-wet boulder to another, don't come this way in rain.

The rain stops, mostly, and the cloud breaks, somewhat: at one point we have a distant view of the FS hut before the cloud returns, but it does look a long way away, and so it proves. Sometimes we can see downvalley to the Alm and the Parkplatz, but there are a couple of kms of traverse to do. The light is fading somewhat, and M says she is tiring a bit, but she is still keeping up the pace, so we arrive in 4:15, just-in-time for dinner.

So do that quick: kase brot for me and huttenrosti for M, which we share. Better quality cheese here. In various ways it seems the hut has been tarted up since last time - in 2012? One of the chaps serving recognises us, but says we "usually bring the family", which feels weird but nice.

After dinner: shower: ah! And free. Then get a glass of red wine instead of my usual coffee.

A thing from earlier: up on the Grawawandferner, I saw a hare.

This morning, my right ankle had hurt quite a bit, rubbed sore though not raw yesterday. I'd experimented with various things: double socks, plasters to cover it, raising up the insole to lift the sensitive area above the boot leather. But at the end of the day, ointment on it to ease chaffing, and care walking, and perhaps the rest, had helped it a lot. Also the "left ankle bone" pain I'd had before has gone.

On waterproofing: my theory, before coming here, was that if it rained all day I'd just stay inside for the day. That doesn't really work, especially if there are multiple wet days. What I'd replace it with, I think, would be a rucksac-raincover, and pre-pack stuff (wallet, etc.) that I carry inside in a dry bag; and stick with the rubbish-but-lightweight raincoat and accept getting a bit wet around the edges. But keeping the rucksac dry would be good, and well worth the weight of a rucksac cover.




Monday, 29 December 2014

September 9th: Dresdener to Neue Regensburger

Prev: September 8th: Sulzenau to Dresdener; prev-prev: Lubecker.
Next: September 10th: Neue Regensburger to Franz Senn.

Our room-mates rise at 6:30, but we wait till 7:15. B'fast is bought bit by bit: a slice of bread for 40 cents, for example. The sum total is about the same; I stick to tradition, M adds yoghurt. Its a fine morning, with promise of cloud later; we set off at 8:20.

(See last post for views of the hut; or this one looking down, with the hut in sun but the ski lift not in an effort to hide the latter; which was a nice concept shot but it didn't quite work).

Climbing up, just before the little lake, views back over the highlands where the lifts run to:


Then we've got over the steep bit and are at "bei der Lacke" which this morning is gloriously still under the sky:


There are pix of me too, but I look like an idiot in them all (here's proof, if you don't believe me). A little further up and we get to the col into a new side valley, which unfortunately is somewhat damaged for walking purposes by the ugly service road. Note for the future: as you come down the path, towards the road, look out for the "old path" which cuts off a small section, and is nicer, and pushes you in the right direction.


After that, its down parallel-ish to the road then a long "rising traverse" across the hillside under the Schafnock, seen here into the far distance: its a long day.


Identification: the snow-peak in the centre on the skyline is the Ruderhofspitze, of which more anon; below it is the Schafnock (S); further along is the Schafspitzle(s); the path dotted in green, as far as I can reconstruct it.

Views across to the WP, WF, Z and even Habicht in the distance. We meet hordes of people coming the other way, but no-one going our way. Here's looking back, from about the Schafspitzl or climbing up to it. The wiggly road rightish of centre is "service road valley"; the dark green mass in the centre is the Egesengrat, 2635 m.


Slowly climb up to 2780 at the Schlafspitzl, then up to where we can see up the Grawawandferner, though not much,as it is cloudy.


The final col really is at 2880 m; the Grawagraubenneider; finally we can see down into the Neue Regensburger valley.


Rest for a bit, and then head down: its 5:20(which I think I mean as hours taken, rather than time of day). This is the descent that I'd remembered as particularly icky from (looks at 2012 and 13, no) must have been 2010 when we were here with the children, and I had a day off up the W Seespitze and looked over the col at the end. However, its now fine, and only a tiny bit icky.


Go down some snow, then onto boulders, and finally onto path, which remains a good path all the way to the hut.


I get a bit irritated by M going slowly - I'd like to be in my end-of-day, stride-to-the-hut pace, and she'd rather favour her battered feet. Compromise: I hang back and play with streams and take pix, and catch her up just before the hut.

7:20 total, as against a book-time of 6 hours. We lost 20 mins with missing the way in "service valley", 20 in rests, a bit in slowness going up due to heavy packs, and ~30 mins coming down the valley. However, its worth lingering as the valley, with its river meandering gently through the march, is lovely in the afternoon light.


At the hut: small terrasse is crowded so sit inside in sun: tea, Radler and kuche. Get 2 places in zimmer 14. Rest.

Dinner: knodeln mostly, and kraut. Shower: 1 Euro for 2 minutes.

18:40: clouds close in, white outside, pouring rain and sleet.

20:00: still raining. A party comes in very wet indeed.

The accounting system used here (and in the Sulzenau) is a card on which drinks and food are pre-marked, and you tick off those you have. We paid 77 Euros for beds (2 in a shared room of 5), dinner, drinks and breakfast.