Uncategorized

Did HMG succeed in its assignment?

Here’s the thing. In our earlier busy thread, Jaime Jessop was thinking like a Haskell programmer and John Ridgway a Ruby one. Perhaps even more fascinating, what was the government thinking?

References:

Wikipedia : Assignment (computer science)

Demystifying Haskell assignment

Ruby – Operators

Basic Programming – Operators

What’s New In Python 3.8 – Assignment expressions

Why did I include Basic and Python? Because traditionally, from 1970s, Basic was the teaching language of choice. A terrible choice, we’d all I hope agree – with the benefit of 2020 hindsight. Nowadays my hunch is that Python is the leading teaching language in schools but I’d be very open to correction by any passing stats nerd.

The irony is that Jaime admitted to having only learnt programming through Fortran at university (I hated it too) and Fortran was probably the biggest reason the much-disputed and derided

today = “Tuesday”
money = 35000

chance_would_be_a_fine_thing = true

syntax for assignment prevailed in imperative languages from the late 1950s. (Basic and the C language kept the bad habit going and were followed in the 1990s by Python, Ruby and JavaScript. Though there are subtle differences even then, as the Python reference shows.)

It’s clear Jaime had put that evil behind her and instinctively adopted the high-minded – not to say snobby – Haskell line:

Haskell has two separate symbols for <- and = because assignment and equality are not the same thing. Haskell just happens to be the first mainstream language that supports mathematical equality, which is why the language requires this symbolic distinction.

They are snobby, some of them. But not the great Simon Peyton Jones, one of two Simons I knew at Cambridge who have since been admitted to the Royal Society. (There weren’t many other names, to be frank.)

The last time I spoke to Simon, after a talk of his in London in 2017, it was to ask how he thought the teaching of coding is going in UK schools. He wasn’t terribly optimistic but he was at pains to say that Python he thinks is fine for kids, not the much more mathematically pure and rigorous language to which he has devoted his adult life.

In their choice, then, did the government intend to signal, subliminally, to those who have learned at least a modicum of coding, that it was ever so down-with-the-kids? I think we should be told.

9 thoughts on “Did HMG succeed in its assignment?

  1. “Perhaps even more fascinating, what was the government thinking?”

    Indeed, that is a very good question. Exactly what does anyone have in mind when they present these types of formulae/rules/recipes/pictograms? Clearly, this particular presentation fails as a formula, if only on the grounds of dimensional analysis. And yet the government was trying to convey an idea using mathematical symbols that invited the viewer to think, “I know what is going on here, they are doing that science thing they keep telling us about.”

    Well, not so much ‘science thing’ as ‘risk thing’, since this is the sort of psuedo-mathematical expression that risk analysts tend to use all the time, the most prevalent being:

    Risk = Probability * Impact

    It is in fact rarely the case that risk levels can be quantified by using a multiplication sign in this way. More commonly, the expression has to be more loosely interpreted as ‘risk is a function of probability and impact, such that an increase in either will increase the risk’. In that respect, one might as well go with:

    Risk = Probability + Impact

    Either way, the operator is really just a symbol representing some jiggery-pokery. Or, to describe the situation more charitably, qualitative assessment of risk is often the best that can be managed, with results determined by look-up tables formed by creating crude distinctions such as ‘high’, ‘medium’ and ‘low’. There is nothing too wrong with this as long as everyone is acquainted with the rules of the game (something I expect the government will be keen to prevent). Meanwhile, all sorts of over-interpretation are possible, usually involving the use of numeric labels as if they had cardinal value (e.g. two Level 1 risks are equivalent to a single level 2 risk). That sort of nonsense needs to be knocked on the head as soon as one sees it.

    So, in answer to your question, Richard, the formula is just a storyboard conveying a general idea, and I really don’t know what the government is actually using behind the scenes to calculate the Alert Levels, beyond knowing that R and Infection Level feature in their calculations – and I suspect ‘calculate’ may be too strong a word for it. Let’s go with ‘determine’.

    Liked by 3 people

  2. What was the government thinking? They were thinking Nando’s Peri-Peri; that’s what they were thinking. SAGE members were probably tucking into a takeaway as they devised the new, highly sophisticated, sciency-mathematical formula and accompanying graphic to illustrate. Whether that was before or after they all got pissed and laughed about how they were taking the British public for complete idiots, I know not.

    https://www.mirror.co.uk/news/uk-news/boris-johnson-accused-copying-nandos-22005325

    Like

  3. Thanks John, in more ways than one. Here’s two in fact.

    1. Giving the risk analysts perspective. Genuinely very valuable.

    2. Your suggestion that the + from HMG could be seen as a polymorphic function with two arguments. Very funny. But it also got me thinking.

    As you can see, it got me obsessed with the = as the even more fundamental symbol, because of the great divide between imperative and functional progamming, practical v academic, and because the equals sign is such a bad one for assignment. But that is the one that so many kids are being confused by learning, through languages like Basic, Python and not forgetting Mark Zuckerberg’s initial tool for his little empire, PHP.

    Smalltalk used <- for assignment, long before Haskell, certainly on its release as Smalltalk-80 in August 1981. (Joke here. Software delays anyone?) A year later I was reading all that and falling both for object-oriented programming and its most insightful proponent (and the guy who coined the term), Alan Kay, now favourite programmer- thinker of Dominic Cummings, well, him and Bret Victor, who I'd call Kay's disciple.

    Where was I? I was being a nerd, in my own particular way. But Alan Kay had cracked the learning problem for kids more than anyone else and the world ignored it or messed it up for 40 years. That bothers me. As do critics of Ferguson's code. Well, most of them. We used to have a saying about code like that in my company Objective. "It's not crap, it's a huge refactoring opportunity." You'll never know the context for such messes. Or as Woody said

    So …

    That sort of nonsense needs to be knocked on the head as soon as one sees it.

    Coming back to your comment. There’s loads of such nonsense possible or already underway. It’s finding the right way to address it as people like my sister struggle with her responsibilites as a local health guru come organiser of help for the most vulnerable in our area. She was admitting to being unsettled yesterday by the holes in what Boris had presented on Sunday. But I’m not sure our derision for the top guy is best for her and those like her either. (She would normally vote Labour. But it’s not about that. She doesn’t like seeing people trash stuff.)

    Wide-ranging is my middle name. Or something.

    Liked by 1 person

  4. Richard,

    I’m pleased that you saw the humourous intent behind my polymorphism reference — it was a joke that probably had a very narrow audience.

    I think that you are quite right to point out that the assignment in the formula is where the real ambiguity lies. Also, I appreciated the Zuill quote. I wish I had that at my fingertips when I was a lad.

    Liked by 1 person

  5. I really don’t know why the coders get upset about the = sign meaning two things. It does in ordinary maths too.

    1 + 1 = 2 is a statement that is true for standard base 10.

    y = 3x + 7 is a function, not a statement of truth at all.

    We do have the equivalent sign for the first, true, but is barely used.

    Like

  6. One reason Chester is the awkwardness of things like a == b in Ruby and JavaScript to test if the two are equal. That very easily leads to errors, where without thinking one uses the more ‘obvious’

    if a = b do this or that

    and that can be needlessly confusing for beginners.

    But by now I accept it’s pretty ingrained. My talk of evil may have been, in fact, shock horror, deliberate hyperbole.

    Jaime came out on the side of the angels though, in taking her to be a Haskell aficionado. And quite right too.

    Like

  7. Jaime,

    Incidentally, the only reason why I did not press the ‘like’ button for your last comment is because I am not so sure that the Alert Level cartoon provides any further evidence that the government is taking the public for idiots (not complete ones, at least). They very well may be, but I have seen too many such ‘formulae’ presented in good faith to presume that it forms part of a deliberate deception. Nor do I think it is a sign of incompetence. If anything, I think it patronises rather than deceives and betrays just how much the ‘science’ reduces to sheer guesswork, lubricated as per your suggestion.

    Like

  8. ‘what the government is actually using behind the scenes to calculate the Alert Levels’

    Glorified guesswork + inaccurate data?

    Like

  9. Oldbrew, for someone who understands virtually nothing in this thread, might I enquire if your + actually should be an =, and what exactly that might be translated into?
    The world is palpably shifting as I write.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.