19 March, 2024

Collaborative Negotiation

 The best training course that I ever attended, when working at Hewlett-Packard, in the 1980s, was a course called 'Collaborative Negotiation'.

It has helped me enormously, over the decades since!

The essence of Collaborative Negotiation is to understand that negotiation is not a 'zero-sum game', where the 'win' of one party comes only at a 'loss' to the other. This is not true, a good negotiation ought to be a win-win collaboration towards the best solution for both parties.

The first step to using Collaborative Negotiation is to understand that everything is a negotiation and everything is negotiable.

The main route to success is for both parties to do their best to understand the motivation, needs, both tangible, and emotional, and use that understanding to find novel, unexpected solutions that meet these needs for all parties.

This requires work, imagination, and emotional intelligence - practicing negotiation every day, whenever the opportunity arises, helps build these skills.

Whenever you are presented with a situation that doesn't seem ideal, realise it is a negotiation and try to understand the position of the person you are working with.

Then you, and the other party, can frame the situation in a way that makes more sense, and, from that, work towards a solution.

The practice of collaboration, and the importance of negotiation is the core of my book Collaborative Consulting: Service Management Scenarios.

If you are interested in having things work out better, but don't feel comfortable bullying others, or tricking them, or using confrontation to get your own way, I strongly recommend the book to you.


https://www.amazon.co.uk/Collaborative-consulting-service-management-scenarios/dp/0113313918

TikTok ban - and the Tor Browser

There is a move for the US, and, now, US governnents to ban TikTok.

The claim is based on Sinophobia - claiming that it presents some sort of danger that Facebook, X(twitter), Instagram, and other platforms do not have.

This is bogus. All social media platforms 'spy' on users. If that is an issue, the argement could only be to ban all social media.

The actual reason, as is pretty well known, is that TikTok supports free speech. This access to free speech has led to lots of users, quite properly, discussing their horror at the genocide against Palestineans, being carried out by the Apartheid State of Isreal. They hope to suppress this discussion in order to continue their complicty with the war crime of collective punishment, by supplying arms and money to Isreal.

There is a solution, if this ban comes about.

Users of TikTok need to download the Tor browser:

https://www.torproject.org/download/

Then use this browser to create, and use, accounts on TikTok.

This will circumvent the ban, and allow free speech to continue - aiding the humanitarian effort to stop the genocide in Gaza.

05 February, 2024

Exploring the 'randomness' of /dev/urandom, and xored derivatives

 For quite a lot of cryptography, you need a good source of random numbers, particularly for one-time pads. It's difficult to get fast sources of natural event based numbers, so some sort of compromise is common.

Using /dev/urandom as found on linux and other Unix systems, like macOS, is generally considered quite a good source.

*** Update  - 19th March 2024 ***

The article stands, but more investigation has showed me that the major problem with /dev/urandom is that it is highly biased against repeated numbers. This is not representative of a good pseudo-random generator.

Compared to 𝛑, /dev/urandom gives very few repeated numbers ( 00, 66, 99 etc.), and hardly any occurences of multiple repeats (00000, 66666, 99999). This is a weakness to cryptanalysis.

So, if using /dev/urandom, it would be wise to process all sequences to add ('at random') repeats of numbers, allowing even long strings of repeats, maybe up to 8 repeated numbers, inserted at pseudo-random intervals.

*** End of Update ***

The initial statistics

To get a good characterisation of a sequence of 'random' numbers, you need quite a lot of them, so I generated 152,256,840,500 four digit hex numbers, like this:

od -x -An  </dev/urandom >fill_with_urandom

The 1.52 * 10^11, or just over a tenth of a billion, numbers take up 709Gb, and took 10 hours, 3 minutes and 59 seconds to generate on a Mac mini M2. 

To get an idea of the shape, I counted the number of times each hex number, from 0000 to ffff occurred. That's 65536 numbers. 

So the expected frequency would be 2323255 for each number, if they turned up equally often. The statistics give:

Min:              2316807  

Max:     2329592 

Mean:     2323255 

Standard Deviation:    1529.303 

Median:     2323255 

Fivenum:             2316807 2322219 2323255 2324284 2329592 

Skewness:     0.0004868033  

Kurtosis:             3.004057


As you can see, the mean is exactly that, and the standard deviation only 1529, which is only .0658%. The mean and median are the same, which also shows a very even spread of frequencies.

If the figures were distributed exactly in a normal distribution, the Skewness would be 0 and the Kurtosis 3. So it is extremely close.

Using XOR to produce a new sequence of numbers

In theory, if you xor one random sequence with another, you ought to get another, quite different random sequence. I thought it would be interesting to do just this.

First I produced a new sequence by xoring each number with its neighbour, doing it in groups of eight - making up the eighth number by xoring the first with the eighth. Using the same Mac mini M2, this took 34 hours, or  1 day, 10 hours, 13 minutes and 44 seconds.

The same statistics as above, gives:

Min: 2317159 

Max: 2330445 

Mean: 2323255 

Standard Deviation: 1530.588 

Median: 2323262 

Fivenum: 2317159 2322224 2323262 2324284 2330445 

Skewness: 0.001143814 

Kurtosis: 3.001915 

This is impressively different. The mean and median are different. However, the spread is almost exactly the same, 1530, instead of 1529 for the standard deviation.

What I found interesting were the last two.

The Skewness is   0.001143814  compared to 0.0004868033 the first being 2.35 times bigger! Though they are tiny numbers, that is a big difference.

The Kurtosis is 3.001915 compared to 3.004057, again, small, but the difference is about double.


Using XOR a second time

I now performed exactly the same operation as above, but using the new sequence as a starting point. This gave:

Min: 2316959 

Max: 2330963 

Mean: 2323255 

Standard Deviation: 1523.088 

Median: 2323254 

Fivenum: 2316959 2322234 2323254 2324272 2330963 

Skewness: 0.005033493 

Kurtosis: 3.03291 

The standard deviation at 1523 is similar to the previous two  1530, 1529 but different enough to show a different shape.

This is confirmed, with:

                       1st                         2nd                    3rd

Skewness:  0.001143814   0.0004868033.     0.005033493 

Kurtosis:    3.001915          3.004057            3.03291 

This time both are very different to the previous two - the skewness five times the first set, and the kurtosis difference ten times greater. All three showing very different shapes.


The final test - xoring the previous sequence

 Instead of over each set of eight numbers, taking five lines at a time, and xoring sets of 40 numbers at a time (with the 40th result being the 1st xored with the 40th). This gives:

Min: 2317132 

Max: 2330652 

Mean: 2323255 

Standard Deviation: 1523.587 

Median: 2323256 

Fivenum: 2317132 2322226 2323256 2324275 2330652 

Skewness: 0.00861003 

Kurtosis: 3.021 

The standard deviation is very similar to the previous run,  1523.587 vs  1523.088. The mean and median again differ by only one, but in the opposite direction.

Then: 

                       1st                         2nd                    3rd                4th

Skewness:  0.001143814   0.0004868033.     0.005033493.  0.00861003 

Kurtosis:    3.001915          3.004057            3.03291           3.021

Conclusions 

These results, using 152 milliard four digit hexadecimal numbers give /dev/urandom a fairly thorough test, showing it is, indeed, highly stochastic.

The experiments using xor, show that xoring a sequence of numbers, with itself, produces another random sequence that is significantly different, including having a different shape, but is still a good pseudo-random sequence.

The latter two sequences do show an increased skewness, and a greater distance from a standard deviation.  In a sense, suggesting they have become more stochastic.

It looks as if it would be interesting to try a final experiment, with, the 4th sequence, but, maybe, taking it in batches of 80 numbers.

 

28 January, 2024

Eulogy to my halogen air-fryer / oven

Our halogen oven / air-fryer is a delight, and amazing technological improvement from the, already wonderful, invention of the air-fryer itself.

Having just cleaned my halogen air-fryer for the third time, since getting it last November, I thought eulogise it here, rather than boring people on Facebook with all the detail, I'll just point here, so most people can ignore it.

Yes, it is so easy, and satisfying to clean that I've cleaned it to sparkling clarity three times - it took ten minutes this time, because I'd made the mistake of cooking pastry (salmon en croute) on the grill, rather than on a piece of foil, usually, after its 'self-clean', it takes a minute to wipe it down.

Meanwhile our conventional oven has probably been cleaned annually over the past few years, maybe a little more often, but always an unpleasant, tedious job, including lots of powerful, pongy chemicals and the need to wear gloves.

Oh, and in case you're wondering, an 'eulogy' (eu = good, logy = words) is not only for the dead, our air-fryer is still in robust good health being in use most days, often for the perfect toasted cheese snack.

Over Christmas, I remarked, when we'd just had loin of wild venison, with roast potatoes - all cooked in 25 minutes. The venison is, accounting for the recency effect, the best I've had. Pink in the middle, succulent, moist, and tasty beyond my imagining. 

In a conventional oven, it'd have taken much longer, and would certainly have been dryer (despite the bacon wrapping and sauce), with a less full flavour. I'm very deply impressed!

The versatility is hugely impressive. The only single thing I've had to cook in our conventional oven is the Christmas goose, simply because it was too huge to fit - it only just fitted in the oven. Everything else, including the goose pie, made from that goose, has been halogened - I think a verb form of 'halogen' is now required.

Being able, with no effort, to see the food as it cooks, is a huge benefit, and the lovely warm glow of the oven makes the kitchen, in Winter, seem even more welcoming than usual.

The have to be some things that are less than perfect. The main one is that, the top, being very hot after cooking, can't be put down, so you have to get things out one-handed. The solution will be to put a large, sturdy hook above the oven, where the lid can be hung when getting things out - I'm going to make sure it's high enough and properly positioned so it's difficult to burn your forearms whilst doing this.

Apart from that, it is is quite magnificent. 




TheT lhat halogen oven is quite something! We've just had loin of wild venison, with roast potatoes - all cooked in 25 minutes. The venison is, accounting for the recency effect, the best I've had. Pink in the middle, succulent, moist, and tasty beyond my imagining.

In a conventional oven, it'd have taken much longer, and would certainly have been dryer (despite the bacon wrapping and sauce), with a less full flavour. I'm very deeply impressed!

01 October, 2021

Seeing - myopia, presbyopia, astigmatism - why can't children get new lenses?

 Seeing is an essential part of being

Being able to see matters. If we can't see, we are unable to take a full part in normal human activities. Replacing our natural lenses with plastic lenses is an amazingly effective way of restoring sight to people with myopia, presbyopia and astigmatism, but it is usually only used when people have cataracts.

I have been short-sighted (myopic) all my life - before my lens replacement, I was measured as being -12 diopters in terms of my myopia, my astigmatism was extreme, and, beyond that, I was able to see things less clearly, and differentiate colours badly, because of my presbyopia (old-age related vision decline) and my cataracts (that were clouding my vision).

This is not a sob-story about me. Many people are in just this position, and, often, when much younger than I was when my lenses were replaced.

When I was very young, my myopia was diagnosed, and I was prescribed the usual thick bottle-bottom lenses. I thought these were a huge improvement.

Later in life, I heard about Lasik, laser surgery to improve vision. So, I went for it. It was one of the most painful experiences of my life. As the laser cut away my eye, I could smell the burning. I was unable to be exposed to any bright lights, without pain, for three days afterwards. It took me several weeks to recover. I still felt pleased, after that, that I had done it, because I thought that my vision was so much better. I still needed glasses to read, and I still couldn't see things as other people saw them, but I didn't know that, so I thought it was a brilliant improvement.

Several years later, my optician examined my eyes, and said that I was developing cataracts. He referred me to a surgeon. This was a major turning point in my life.

The surgeon arranged for an operation to replace my lenses with plastic lenses - not the lenses in my glasses, the lenses in my eyes. I was quite apprehensive about this, because the lasik surgery had been so horribly painful for so long.

I need not have worried. My lens replacement surgery was completely painless - I really mean that, I had no discomfort whatsoever, none at all.

I could not believe the difference! Suddenly, colours were bright and I could see a huge range of colours. I could also see features far away, on the mountain, so clearly that I thought they might be artificial. When I went to the supermarket, for the first time, I could read all the signs, above the aisles, saying what was being sold there - before, I'd thought it was some sort of joke to expect people to read them, unless they were immediately below them, and I wondered why they bothered... Now I could see that the far aisle was for pickles and pasta - it was a revelation!

Yes, I still need reading glasses to see something close up. Yes, years, now, after the operation, the unbelievable brilliance of colour that I saw after my operation has settled down - our brain accommodates to things and they seem less exceptional. Still, my experience of the world is so rich and varied, and clear, compared to what it was during the first fifty years of my life that it continues to amaze me. Just this afternoon, I was looking at a tree at the bottom of the garden, and marvelling at how I could see all the leaves, not a a blur, but as leaves, and I could see the bright blue of the sky and the many different greens of the tree - for most of my life, this has been impossible.

So, with all this wonder, and improvement, what is my point?

Why can't we offer young children, with bad myopia and bad astigmatism, lens replacement? Why should they wait until they are old enough to have cataracts?

If only, as a child, my lenses had been replaced, my life would have been quite different. I'd have found microscopes and telescopes useful instruments - as it was, I wondered why anybody bothered, because, to me, they just offered blurs. I could have seen the beauty of mountains, I might have been able to play sport - I hated rugby and cricket because I could not see the ball. It seem silly to say this, but, when they sneered at me for dropping the ball it was because I only actually saw the ball when it was a metre of so from me, far too late to catch it.

Can't we spare children this diminished perceptions?

Can't we give people with bad eyesight good lenses?

I really think that we should. Contact lenses, glasses, laser-eye-surgery, all seem to offer improvement, b ut, from personal experience, I know they are actually quite useless. The only thing that really works to fix your eyesight is new artificial lenses.

15 January, 2021

Depression - it's not just feeling bleak

 I've been depressed twice.  By that, I mean diagnosed as clinically depressed, no simply 'feeling bleak'

There's something wrong with the diagnosis of 'depression', because it is so very easy to think that it is the same as 'being depressed' - It is not

The first time I was clinically depressed was back in the 1990's. I was not coping with life, and used the company mental health option to uget an interview with as 'counsellor'. He listened to me for about half an hour, then showed me a picture of the signs of depression, and explained that I fell into all of these, from what I'd said.

So, I went to my GP, and got a prescription for Prozac. The odd thing was that it worked at once, within a week, I was feeling better. SSRIs are not supposed to work that quickly, but the did. It might have been the   placebo effect, but, within three days, I felt better, and started to engage with life.

 I was lucky. I got better, and started to understand the reasons for my depression. Mainly, it was because I'd broken up a relationship

So, I'm an analytical sort  of person. I score quite high on the autism scale, meaning that I analyse things, before feeling them.

Twenty years later, I suffered a few set-backs. My wife was diagnosed with breast cancer, and I spent time with her during her treatment. Her brother dies. My father died. I was stabbed seven times by a burglar. I was suffering severe financial difficulties, and I couldn't see a way out.

What's really peculiar is that, from all of the above, I didn't realise that depression was a likely outcome.

I found that I couldn't do anything. I spent my time in bed.

I started to think about suicide. I looked at sites that sold inert gassed, such a nitrogen, that I knew would establish an easy death. I worked our ways to kill myself - but, at the same time, tried to make a distance, so that the means to kill myself were not immediately to hand. I had to be that, if I killed myself, I was not just on the spur of the moment.

I told GP about these suicidal thoughts, and he referred me to a psychiatrist, who, after a chat, said, a if it was obvious that I was depressed.

I understood, then, what the problem was. I'd managed, over several years, to keep mysense of self under control by going to Amsterdam and having huge doses of psilocybin, in the form of truffles, from magic mushrooms. These helped me centre myself, and resolved the depression completely.

It has still been a struggle. I'm coping today, but I look out for the signs - I mainly sleep around 11 hours a day, which is more than it should be, but, I'm coping, despite that.

What's amazing to me now, that I'm better, is that I still sleep far more than most people. The great thing is that I've not had any thoughts of killing myself for over a year.

It's odd, really, that it should be such a defining thing, but, if you are reading this, please accept that it is. The practical working out of how you are going to take your own life isn't what you think it is - it's not a conclusion, it's a symptom.

Understand that, and you're on the way back to happiness.

04 July, 2020

The power, and weakness of metaphor

We use metaphors all the time, hardly noticing that we do. They're an essential part of our thinking apparatus, enabling us to transfer notions from one, usually concrete, domain into other abstract domains.

They're so powerful, ubiquitous and unnoticed, that it's useful to see what happens when one doesn't work.

In the late 1970s,  was lucky enough to meet the HP programmable calculator, the 9100A. It was the size of a microwave oven and you could store instructions on little magnetic strips to execute as programs later.

It didn't have an alphanumeric keyboard, the commands available were on the keys - as with later HP handheld calculators, one key could have more than one meaning. The screen showed the x,y and z registers. You could connect a plotter to it, and the physics department had given me the exercise to plot the orbit of the earth around the sun.

Mostly everything made sense, but there was one part of the set-up that puzzled me considerably.

There were a few keys connected to 'flags'. You could 'set' or 'clear' a flag, and then test to see if a flag was 'set' or 'cleared'. I could understand why these were useful, because they allowed simple binary decisions to be made, based on earlier results.

What didn't make sense to me was the term 'flag', and it being used in this way. I knew about flags as things made of cloth that were run up flagpoles by people who were keen on that sort of thing - the same sort of people, usually, who were keen on uniforms, marching about, and killing people.

It wasn't clear to me how these flags were connected to the ones on the 9100. What was, to me, particularly puzzling was how anybody would think of a flag as 'set' or 'clear' and how you'd know which state a flag was in. If the flag metaphor was used, I'd have expected 'raised' or 'lowered' or 'half-mast' to be the terms used.

I wasn't able to resolve this from the manual, because it seemed to assume familiarity with flags used in this way, and nowhere described where the metaphor came from.

It was about four years later, when I visited California for the first time, that I discovered what it was all about. I'd seen photographs of letterboxes in America, and noticed them in films. They were cylindrical, with a flattened bottom and a hinged door. I was surprised by their uniformity, being used to seeing many different designs, not just one.

The other feature they had was a key-shaped bit of metal mounted about half way down. This, I discovered, was the source of the metaphor. This wasn't just a bit of decoration, but a signalling device. People who lived in the US knew this, and called the bit of metal a 'flag'. The protocol was that, when he deliver the post, the postman would raise the 'flag', thus 'setting' it. This signalled to somebody looking across the front garden that there was new post. When you collected the post, you'd put the 'flag' down (clearing the flag), to indicate that the postbox was empty. [I've now been corrected, you can see in the comments below. Apparently you, the owner of the letterbox 'set' the flag to indicate a letter was waiting to be collected, and the postman 'clears' it, by putting it back down, indicating that the letter has been collected, and that you have new post - the opposite of how I'd understood it... making it even clearer how difficult it can be to understand a metaphor from an alien source].

The alternative etymology, that might be behind the letterbox usage, is the 'flag' used on a taximeter to indicate if it is free, or 'for hire', or occupied, 'hired'. The OED doesn't give etymology for the computing use, so this isn't certain.

Clearly, the makers of the HP9100A, who lived in California, and worked for Hewlett-Packard, who'd paid for me to travel to California, as their employee, knew all about this, and thought the principle universal. Which was why there was no explanation of what 'setting' or 'clearing' these 'flags' was about.

In the years since, when meeting difficult metaphors, or thinking of a metaphor to describe something myself, I've often remembered this problem. If you are going to use a metaphor, you have to make sure that your audience will be familiar with whatever it is that you are going to use as a metaphor. Otherwise it will fail to communicate your idea - or, if it does, it'll involve a special effort of interpretation by the reader to work out what you were getting at.

26 September, 2018

Management Dream



Notes:

- First day as  a new manager
- Big HP office glass box in the middle. Decided not to bags a desk, but hover between the exposed space, with light, near the corridor, and the cave-like space in the middle. Hoping to have us moved some where better.
- Asked team to come up with agreement on what to use for rotas & scheduling by lunchtime - if they came to blows, I'd be excused as it was a first day
- Decided to order printers - discussed options like fan-fold, holes, considered noise - thought it a good plan to find out about my budget, learn how purchasing worked, and find out how noise-averse our neighbours were, and, by this means, who they were, and whether they'd help us move somewhere else.
- Went to find out about site meetings -- delighted to find a manager who said there were several a day, but kept a jar filled with minutes from all those worth knowing about, about six rolls of minutes - said he kept it fairly up to date
- My manager away, broken leg, skiing accident
- Leave out the bit about kangaroos and needing a seprate kanga-bog for the little ones
- Wondered whether to take my team out to lunch, it being the first day, thought about whether it'd be the canteen or local pub, realising either would set all sorts of precedents,. Decided to suggest the canteen, but allow myself to be persuaded the pub would be a better idea, as long as it was informal and not me taking everybody out. The excuse of leaving that to my manager, when he came back with his leg in plaster, seemed sound
- Had wondered if I should start clearing up the area and bags a desk, or if I should find where facilities was and see if they could help (unlikely on the first day, but I'd learn who'd given them the best bribes last year). 
- I wasn't quite sure who my team was, there were various people floating about the area. I hoped that lunch and the group task would sort it out, more or less.