Tuesday, 14 January 2014
David Crisp-Hihn 1950-2013
David Crisp-Hihn died on December 27th 2013, after being admitted to hospital with a stroke on the 15th. He leaves behind his wife, Sandra, four children and a grandchild.
David Crisp was a pupil at King Edward VI School, Southampton when I knew him first. We became friends as a result of belonging to the same Christian Society and both attending Above Bar Interdenominational Church, Southampton. When David obtained a place at New College, Oxford to study Mathematics, he inspired me to apply also, and I was able to attend two years later. We remained firm friends throughout my university years and long after, and he was Best Man at my wedding in 1977, though later we lost touch.
About three and a half years ago we renewed contact (the internet is a wonderful thing) and arranged to go on a walking weekend together. This was so enjoyable we repeated it twice more, walking in Cornwall, the Welsh borders and Norfolk in the last three years. In Norfolk, David was less able to manage the longer walks.
I was blessed to spend these times with my old friend but I did not know how precious and important these last few days would become.
I miss him terribly.
Wednesday, 29 February 2012
I hate make
- the make level (where $ is special, and you double it to get a real one),
- the shell level (where $ is special outside of single quotes) and
- the sed pattern level, where $ is special and you “escape” it with a backslash to make it not special again.
Now, execute this on the command line (bash shell) and it nearly works — it should replace a complete line “ABC=” by the complete line “ABC=${VAR}” in the file called file.
It doesn’t actually work because of the second $. I have used (single) quotes so that the shell doesn’t try to substitute the (apparent) shell variable ${VAR} but I forgot that $ means ‘end-of-line’ to sed (even though I used it to mean that in the first part of the substitution string). So actually, it ought to be:
using a backslash escape to tell sed to treat the second $ literally.
So this second version goes in the Makefile, and of course it fails. (And, it takes me some time to find this out, since the make is executed in the heart of some long-winded build process, and if I don’t execute it there it will not have the context to make it work — bórza!)
The reason is that single quotes don’t protect expressions in make, so it tries to substitute the ${VAR}. “Aha,” I cried, “I’ll have to escape the backslash and the $ for make.” Like this:
But I was wrong, the backslash isn’t sufficiently special in make — well it is, but double backslash is not “escaped” to backslash: instead it leaves it as double backslash, and the single quotes still offer no protection. So we end up with “ABC=\${VAR}” in the output.
Round I go again:
Why all this fuss?
Because *nix systems and their utilities have internalized all this escapery, inherited from an old-fashioned and stupid macro-language-style command structure, and we are now stuck with it. Everywhere. And of course, *nix being the democratic organisation it is, everyone does it differently, with different rules and with different exceptions. Ugh.
So... I think we should start to unravel it. We could start with make, for example. Let’s create a version of make where all the expressions are evaluated with referential transparency, which is to say that a literal string, once established, is never rescanned and re-interpreted again, even if I pass it around in a variable and it appears in another expression. Substitutions are only made once if I say they should happen. If I write an expression with a $ in it, it cannot be interpreted as a variable indicator anywhere else.
Then, the utilities that we call from make should have an ‘uninterpreted’ interface. That is, it should be possible to pass them a literal string without worrying about the contents of the string. If we are a utility passing strings we haven’t checked, we no longer have to worry about what they might contain and scan them for things to escape. That way, we also don’t have to worry about what the utility is that we are calling, nor where it might send this string.
I guess we would have to tackle the shell, too.
There would be consequences: some of our tricks (for example: escaping the right number of times so that the cascade of string passings remove the escapes and trigger interpretation at just the right level; or, varying the name of a reference using the value of another) would be harder to achieve — but let’s face it, who needs these really? And when you do, how long does it take to get it right? And have you ever got it (really) right?
Yup, a proper referentially transparent shell would be a first step. Or maybe a grep....
hmm...
§ I also hate all these cheesy acronyms — it’s just a linguistic barrier to ensure the prols can’t easily join the club.
PS: Did you notice that the ‘footnote’ didn’t link properly? I don’t know how to do this in this form — how do I link to an anchor in the same page?
Friday, 12 June 2009
Spec thought for the day
Browsing around StackOverflow I came across a question about specifying binary files. One of the answers said that the Java spec for class files was a good example of how to do it.
So I went there to look and found this:
ClassFile {
…
u2 constant_pool_count;
cp_info constant_pool[constant_pool_count-1];
…
}
and the following description:
constant_pool_countThe value of the constant_pool_countitem is equal to the number of entries in theconstant_pooltable plus one. Aconstant_poolindex is considered valid if it is greater than zero and less thanconstant_pool_count, with the exception for constants of typelonganddoublenoted in §4.4.5.constant_pool[]The constant_poolis a table of structures (§4.4) representing various string constants, class and interface names, field names, and other constants that are referred to within theClassFilestructure and its substructures. The format of eachconstant_pooltable entry is indicated by its first "tag" byte. Theconstant_pooltable is indexed from1toconstant_pool_count-1.
and I wondered if this is a good spec what does a horrible one look like?
Granted, this is quite chatty, but when you read it for sense you get more and more confused.
It looks like a C structure, so let's read it like one…
Why is the count one more than the number of elements in the array? The array index starts at 0 when I declare one. Oh yeah: the valid indexes are greater than zero (why omit the zero index?)—except for some long and double stuff, life's too short—and then the valid indexes are from 1 to count-1.
Whoa! where do they go? The declaration a[3] normally allocates three elements (indexes 0, 1 and 2), but here we allocate count-1 and index from 1 to count-1. The last index would be invalid!??!
Aha! We must be basing our arrays from one and not zero!!
…and the
Ugh!
If this is a good spec my name is Edsgar Dijkstra.
Thursday, 2 April 2009
Install updates?
- postponing tasks is easier since there are enough small tasks planned to rearrange and even re-assign;
- re-ordering is easy, even if there are inter-dependencies, since the short sprint meant that not too many were scheduled at once, and the dependencies are manageable;
- rallying the troops is not hard, because only a week or so ago all the team members took joint responsibility for the deliverables--there is no shortage of offers of help.
- the expectations of the product owner can be skewed, and not allow enough team experience before expecting (or trusting) tight estimates -- hopefully this is something that can be ironed out over time;
- the team members have to work at close co-operation during the sprint (we are lucky to be all in the same room--although this could be a problem for a larger team);
- learning what `hours worked', `task complete', `ideal hours' mean requires several sprints to iron out--and this can easily be disrupted by team personnel changes;
- it is hard to do difficult things--especially if they require sustained, co-ordinated effort.
Sunday, 15 February 2009
Re:sprung
Jamie update
So now Jamie is nearly full-grown, and simply runs over the garden fence without a paws. He is delightful, wilful and fearless, and we can't imagine life without him.
Friday, 2 January 2009
Sprung
Friday, 27 June 2008
Jamie the Kitten
Not so his behaviour. Though terrified of our labrador bitch (Seal), he shows no sign of running away -- standing firm all spit and hiss (and twice his normal size). We are gradually getting them used to each other. It is clear that Seal will eventually come out worse in the arrangements, and we know who the king of the household is destined to be.
Presently his dominion extends from the kitchen into the (warmer) dining room, with Seal carefully shunted sideways when he roams. This will have to do for the moment, though in a few days they will be allowed to mix (supervised). More news then.
[I forgot just how much hard work a baby animal can be :)]
Monday, 23 June 2008
BSL new venture for me
It is fascinating how regional it is: the sign for my home village is surely not known more than a few miles from here :)
I've learned to finger-spell, but very slowly. I've learned that my surname has a short form -- many of these rely upon similar sounding words which signs are then used as a proper name -- mouthing the real words as you go helps to disambiguate.
The lesson was very well run, by a totally deaf teacher. She asked us to practice conversing (simple things like -- where do you live, and how did you get here today?) by moving 'round the room. It was a moment of revelation to me that I didn't have to get near someone -- I stood up on my chair and signed to someone on the other side of the classroom. It was very liberating!
I signed up (pun?) for this course because recently I met a colleague who is deaf, and who signs well. I was at a loss, and resented the feeling of impotence the lack of communication gave me. He helped me to learn a few words and signs, but I thought a proper course would be better. So here we go... My ability with non-native spoken/written languages is abysmal, so it remains to be seen how well I do with this.
The ability to hold a conversation across a crowded, noisy room is a plus, though.
Saturday, 17 May 2008
Norfolk Coast Path
Our plan was to walk the Norfolk Coast Path, in stages, over about five days, driving or bussing to the start and returning to the cottage each evening. The coast path goes from Hunstanton to Cromer (and normally in that direction) and a glance at the map shows Binham to be roughly centrally placed, less than 4 miles from the coast itself.
[Actually, it takes more than a glance -- quite close scrutiny is required to find Binham. Between Langham and Great and Little Walsingham is a clue!]
Photos later.
----
No photos arrived; sorry.
Thursday, 18 October 2007
Long time...
pastures new. To say that I envy him is not strictly accurate but I certainly envy the excitement he must be feeling around now. And the chance to learn new things and meet new people.
At my ripe age I wonder if I'll ever feel that sense of possibility again.
Tuesday, 8 May 2007
Red free
Fit the Third
So now I'm under and I've checked that power is getting to the pump (it would help if I set the universal meter correctly before probing), and I need to remove it.
A rather surprising piece of tubing is brushing my face as I work — it isn't attached at this end, is it a venting tube? Just hanging down?
I disconnect and get the pump off and go back to the diagrams in the Parts Catalogue (Moss) and look at the owner's maintenance manual, too. There are really good instructions there, and the parts are just discernible in the pictures. I need to take it apart.
This is nasty, since I don't have any gaskets or other replaceable parts, I have to be careful. But, hey ho, nothing ventured, and I can always buy another one if this one is damaged by my fumblings.
Inside the diaphragm is clean and sweet, the seals are re-usable, the springs are good and the points — uh oh the points are black.
Some paraffin later, and some ginger repositioning and I'm ready to try again.
Reassembly is a little awkward — I have to squeeze the five silicone plastic 'figure-of-eight rings' that centre the solenoid into their groove and then adjust the solenoid 'throw' by screwing it in and out. Unfortunately, this requires holding onto the diaphragm itself and turning. Not something I want to do with a lot of force. But the rings in place make this hard, so I remove them again (prise them out) and with just three of them in place I can turn it. When it seems about right (pressing in and out against the spring shows when this is) I align to the nearest set of holes to fix this setting and reseal the pump chamber. Tricky stuff.
I now reassemble the electrical end (don't ask) and notice that there are two venting tubes on the pump. One from the solenoid housing and one from the points end. Quick glance back to the parts manual: aha! there is supposed to be tubing from here to... where?
That tube — where did it go? After some scrabbling I find there is a T-piece, the two aligned ends of which simply open into the well of the boot. Actually there are two of them! Are these the places that the vent tubes should be connected to? Yes! I see in the parts catalogue that this is right! But the tubing I have doesn't fit on the vents (it is too big) so I suspect that this pump is not original. At some point in the future I'll get some more tubing and refit the T-pieces. For now they are removed.
Much later I read, in a book about restoration of Midgets and Sprites, that these are vents which were fitted to the earlier MkIII models. It's nice to have confirmation of one's guesses.
Now to try the pump again — it is a little awkward refitting the pump, there isn't a lot of room to tighten the connections — and I'm just a tad apprehensive when reconnecting the battery.
All is well; the reassuring 'clicking' sound is back. How could I have forgotten it? And Red starts first time.
Now all I have to do is start researching and fixing the rough running!
Sunday, 6 May 2007
Red too
Fit the second
Still no fuel at the carburettor.
Now many of my friends and colleagues will not be surprised to know that while I am at work I am not always concentrating on "matters at hand". I often think about other things and Red figured a few times. Sometimes, I had glanced at the manuals in passing.
- Haynes Workshop manual
- Owners manual (not for my model, but still handy)
- (old) Parts catalogue
First problem — where is it? It turns out this requires a closer look at the manuals. Haynes proved surprisingly unhelpful here: it gives a photo of the offending, but a mere word or two about where it is! The other stuff, including the parts catalogue (amazing how much you can learn from an exploded diagram if it includes everything), was more helpful. It was underneath; next to the Petrol tank. I got to it.
This sounds easier than it was, since I didn't have any ramps or stands, and getting under with only a jack or two is not recommended.
I therefore bought (second hand) a couple of ramps. This took another few days, and also some trouble getting the car up on a ramp! I couldn't push it, it wouldn't drive up and so I had to jack it up and put the ramp under. This involved a few bricks and two jacks. [I wonder if Anne will let me dig an inspection pit?]
Red
In my profile I mention a MG Midget MkIII. I acquired it last year and when I bought it it was in reasonable condition, and working (with an MOT!). This is a speculative purchase for me (spurred on by Anne, who thought that it might be fun — she knows me too well) and I don't have the tools or experience really. But half the fun of ownership is to gain the tools and experience. She tells me.
The first order of the day was to decide what to call it/him/her. My daughters decided it was male, although every other car I have owned (or my father has owned) has been female, so we wanted a suitable nom de la rue.
To cut a long story short, Jen wanted to call him Red Rum — the paintwork (such as it is) is Red, Tartan Red I think — but I thought that was demeaning since it implies it is only one horse-power. So in the end we shortened it to Red. I bought a Black n' Red workshop notebook, and ink-blackened the Black n' on the cover, so it reads (in red insert on a black background) appropriately, and was smug.
However, soon after we garaged him and I got a new battery (the old one loses charge quite quickly) Red failed to start. There was no trouble turning the engine over, so the new battery is OK — just no inclination to fire at all. We go into detective mode.
First, electrics: the spark was fine (this is so tricky to do on your own). Check.
Second, fuel: I took the fuel lead off the carburettor, switched on and turned the engine — no fuel. Aha! Have I run out? [It might true: the fuel gauge was one of the things marked dodgy when I got him, so looking at it was not obviously helpful.] From what I could tell by rocking him, and listening for sloshing at the filler, we might be very low.
Red had been lovingly managed by his previous owner, and amongst other things had been converted to run on unleaded petrol. My other car (no name, notice) is a diesel, so I do not have a ready supply of fuel in the garage: I had to get some. Also a can. Also a funnel. This took a few days.
Monday, 18 December 2006
Yo Ho Ho
Last night we hosted some 40 people in our house for 'carols, mince pies and mulled wine'. Mostly singers (and players) from our west gallery music group The Madding Crowd but we were also joined by neighbours and work friends. The neighbours especially came out of self-defence: the singing was rather loud.
As usual we over-catered. The mulled wine was made in three batches and was almost perfect, but 108 mince pies was a little too many to make! Oh well, we'll just have to eat them ourselves. The cheese and french bread we added at the last minute was overkill. Surprise surprise, people brought things with them: mostly wine, but there were (more) home-made mince pies and mini sausage rolls -- still hot from the oven.
One person brought a reed-organ, another a cello, another a violin and my daughter Jennie went upstairs and came down with a box of percussion instruments, including a kazoo which was nobly and shrilly played for most of the evening. Most of us were used to many old carols and a glee or two, and otherwise some well-known favourites were sung.
There is something quite special about making music and enjoying good things together with friends. At Christmas. Not only then, of course, but especially so as the sharp frosts and dark evenings draw in. Not a television on, nor a recording played; no canned laughter, no professional entertainment -- only real friends, real voices and real food.
Bliss.
Thank you, singers. Thank you.
Tuesday, 21 November 2006
Wot I'm reeding
This was published in 2005, but of course the book has been out for some time in earlier editions. This is the second time of reading it, and I can say that it is still fascinating, and readable in equal measure.
This is not a review however.
Reading this book has inspired me to share more of these insights with my colleagues (who work with me in a large middleware development organisation). The main problem is remembering them all -- there are subtleties and details it is hard to recall at the appropriate time.
So what I could do is to compile my own list of aphorisms that would be memorable, witty, and encapsulate a gem from the book, like:
- The only good code is eliminated code.
- Private data is too hot to handle.
- Exception safety is like pregnancy: you can't be only partially exception safe.
Tuesday, 14 November 2006
First pass the post, please
I don't know how to do that yet.
