I’m through the Digital looking-glass

I think I’ve ‘got’ for the first time what the “DIGITAL” thing is.

I’ve been searching to find the meaning of the phrase “digital transformation”, which I assumed encompassed a change from ‘analogue’ to ‘digital’. I finally understood yesterday – that’s not what it’s really about.

The transformation happened slowly to me, over most of my life. My first programming was planned on paper then character boxes were filled-in with a graphite pencil on cards. They were shipped by road to a punch machine that punched the binary codes onto the cards which were then were fed into a computer by operators I never saw. A week later I got some printout back, usually telling me what had gone wrong.

Soon after arriving at university, I had access to GEORGE 3’s Multiple On-line Programming system: a terminal. I used a line editor to create a card-image file which was stored on disk then later submitted to the batch queue. Undergraduates were only allocated space to store one program at a time. There wasn’t room to keep things permanently on-line because of the price of disk space. Some of the research students still walked around with boxes of cards. It was easy to copy a card-stack on one of the card punches and keep it in a safe place. They could probably store more code that way.

I’ve been mostly digital since the 1970s but I saw my digital world as a binary virtualisation of a physical medium. I moved very slowly from dependence on physical to online-only artifacts which had always been representations of digital data.

I realised yesterday that most people have only recently moved their business objects: files, documents, photographs, drawings, 3D-models and social network connection information into the digital realm – from atoms to bits. That frees those objects from their bindings at a single, fixed physical location, leaving them to roam in more than the 3 dimensions of our visualisable reality. This paradigm shift has suddenly hit many without warning, like a revolution, whereas I experienced it as a series of small increments. I’ve been greatly underestimating how disorienting it has been for other industries to reluctantly release their tight grip on physical objects and how worrying it may be for those still facing the cultural adjustment.

I remembered the other day that I used to jump off a shed roof at 5 years old. I could see the spot where I would land. I can’t imagine throwing myself out of a plane into free-fall and that’s why there are ‘digital coaches’. My empathy has been retrieved from an old backup tape. I’m sorry if my lack of understanding ever inconvenienced anyone.

Advertisement

The functional Pi Racket

I have a love/hate relationship with Clojure tooling.

I wanted to learn functional programming (FP) in a Lisp because:
1. There’s a thing I want to do and it felt like the right way to do it
N.B. ‘right’ is not always ‘easiest’
2. Lisp once beat me up quite badly. I’m bigger now. I wanted to go back and punch it on the nose
3. I won’t really ‘get’ immutability until I do some, with no option to cheat.
3. I find homoiconic functional programming conceptually elegant…

…then you try using the Clojure development environment and discover there isn’t one that everyone agrees on and the one used by expert requires you to learn a new language of keyboard hieroglyphs first.

I’ve done just enough Lisping to think that we are being as irresponsible teaching kids only object oriented programming as the BBC were in teaching them BASIC, but it would be actual child abuse to introduce them to FP via emacs and a language dependent on the underlying Object-Oriented Java Virtual Machine for it’s connection to libraries & reality.

This morning I realised I hadn’t plugged my Raspberry Pi in for ages. If you were a child who started coding with Scratch and a few drum loops on Sonic Pi then maybe a bit of the Squeak Smalltalk (Scratch is written in Squeak) or Python in a nice IDE, imagine being handed the ancient emacs scrolls and sent into a corner for a week to learn spells, before you could even start to learn to function. FP is going to initially make soup of your flabby imperative, ‘place is state’-damaged brain anyway. There is no need to make it harder. Teaching languages don’t have to train you for a job, only to think.

If we are going to raise functional children, we need a gentle slope up to Clojure. Clojure is probably the best practical language but it’s too hard. I’ve seen a few people suggest starting with Racket, which is a version of the Scheme Lisp dialect. This morning I poured DrRacket onto my Pi.

There was a minor hiccup with DrRacket not knowing what language I wanted it to read. Kids would need to be protected from that. I wanted “Determine language from source”, not to tell it I was a ‘beginning student’.

Because DrRacket is multi-lingual, the first line of the source code tells it what language to read:
#lang racket

You type in code then press the run button. This is not your grandfathers emacs REPL. Children should have no natural fear of their (parens). Ooh look, cats!

#lang racket

(define (extract str)
(substring str 4 8))

(extract “the cats out of the bag”)

;;-> “cats”

Relative re-energising in 2018

I read the instructions on my microwav(abl)e lunch: “800W for 4 minutes”. I wondered if that was input or output power. If microwaves got more efficient, would there be an increase in burned food? I needn’t have worried. Our microwave is 1200W in, 800W out but is that Root Mean Square, like a guitar amp? That’s how to blow up 100W speakers with 50W valve amps. They’re Peaky Bosters, like that Cillian Murphy’s accent in Series 1. Should I worry whether my risotto rice will assplode at 3:2 efficiency.

“Why would They label things relative to an obsolete technical standard?”, you might ask, if you’d never seen a modern 11W, 50W-equivalent(ish) light-bulb. You’d think ‘They’d at least have introduced a light-output based standard. There is a standard: ‘Lumens’ (total) and/or ‘Lux’ (intensity.) That’s an adventure for another day.

How many Horse-Power is your car; what size of horse; and how frisky is it feeling? I took a photo of a horse once, using an Digital Single Lens Reflex with a zoom lens that was specified by a foal length in Millimeters equivalent to a 50mm lens on a 35mm diameter camera with a slightly different frame width:height ratio. There are no sprocket holes on the digital either.

I’m trying out dropping ‘title-case’ in blog post titles. I didn’t even know what it was until a week ago. Unnecessary upper-case letters in titles appear to upset the design sensitivity of the font-folk. They have other ways of emphasising and I prefer not to offend people’s aesthetic until I mean to. I was persuaded to conform because the convention scrambles structure, content and style, while over-loading capital letters.

Writing Wrong

I’ve always admired skillful calligraphy and my handwriting isn’t awful, so I’ve thought for a few years that I’d like to try some simple lettering for an art-break from all the digital typing. I’ve bought some cheap cartridge pens with italic nibs in a range of widths. They are flat ended, so they make a broad stroke when used vertically and thin horizontally. I’ve always assumed calligraphers modified the width of the line by rotating the pen. They don’t.

I discovered that modern calligraphers use a pointed nib that splays with pressure, to vary line-width. Now, of course, I’ve realised that would be a lot easier to simulate with a pressure sensitive tablet, without all the messy ink. I can’t help it; I’m a software guy. I’m more about the tools than the medium and I like to have an undo.

Midland Writing

At the both junior schools and the senior school in my village, sports days were organised by competing ‘houses’, named after great Staffordshire people. I think I remember Walton, Wedgwood, Dalton, Spode, Minton, Garrick and at least once I was in Johnson. On Sunday I finally made the long-overdue pilgrimage to visit The Samuel Johnson Birthplace Museum & Bookshop in Lichfield, having greatly enjoyed a Summer-time visit to Erasmus Darwin’s house, only a short walk away.

Johnson went to Lichfield Grammar School then Stourbridge before going to Oxford. he left after about a year, enraged at an anonymous gift of new shoes, the last straw in his attempt to cope with his relative poverty. After his marriage and a failed attempt to open a new school in Lichfield, which only attracted 3 pupils, he ran away to London with his pupil, the great actor David Garrick, who remained a life-long friend.

I’d also been to visit Johnson’s rented London home at 17 Gough Square in the City of London where he worked from 1748 to 1759, mostly on ‘A Dictionary of the English Language’. Johnson also spent some of his later years with Mr. Henry & Mrs Hester Thrale of Streatham who owned the Anchor Brewery, where Johnson also had an apartment and he remained in contact with Hester until she remarried after her husband’s death, when he cut off their friendship.

I tried writing with a quill pen which reminded me that my attempt to learn some basic calligraphy had lapsed. Johnson’s father Michael was a bookseller. I didn’t know that this also meant bookbinder. The books arrived as printed blocks to be bound on site. Johnson was first published in Birmingham by John Baskerville, now a resident of Warstone Lane Cemetery.

Since, I looked at therange.co.uk where I knew I had seen calligraphy dip pen sets. The ones I had remembered are by Manuscript, https://www.calligraphy.co.uk/. They come with a nib tin bearing the logo of D. Leonardt & Co. of Birmingham. They have now moved to Shropshire, along with Joseph Gillot, now part of William Mitchell Ltd. https://www.williammitchellcalligraphy.co.uk/ They are the only remaining English pen manufacturers. In 1850, Birmingham manufactured half of the world’s pens.

I also learned that I’ve been using the wrong kind of pen. Italic pens are not the route to good calligraphy.

What I Don’t Know

A Wiki is sometimes described by the ‘backronym’ “What I Know Is”.

Recently I’ve been using Quora. You can ask a question or, if you see someone else’s question and think you know the answer, you can reply. Over time, you become associated with areas of knowledge that interest you. The obvious equivalent to the Wiki translation would be “What I want to know is” but you always have to use social systems to understand their dynamics. I didn’t ‘get’ Twitter until I’d used it for some time because at first, nothing happens.

I discovered Quora is really about “What I Don’t Know Is”. It’s obvious that by asking a question, you declare a ‘known unknown’  but human ignorance goes deeper than that. As someone who tries to answer questions, you learn about the gaps in your own knowledge, that you are unable to explain a concept you thought you understood and that there are things many people don’t know or understand that you had assumed were obvious to everyone. We all struggle to provide good, clear, concise, unambiguous questions and answers, because we don’t know everything.

I discovered that other people’s thinking and motivations are often very different from mine. I wasn’t aware of how much more of a rush many young people are in to ‘be a star’ at something, often without much understanding of what that something is. I never hurried or set targets, so I wasn’t aware of how much I’d learned about life, until I read some of their questions.

A journey of a thousand thoughts can begin with a single question. The view from the far end of that trail may be different. We need to be curious about everything around us rather than too ambitious to arrive at a fixed destination by the fastest or shortest route. You can dream about the future but it may not arrive packaged as you expect it and pieces may be missing. Plan your early moves, travel at a sustainable rate and stay aware. I’m worried that many of the young hopefuls on Quora will burn-out before they get close to their targets and become disillusioned.

I’m still hungry to learn. There is so much I don’t know and it’s growing all the time.

The importance of a letter, to the BBC

I have entered politics. I asked for this tweet to be corrected and the BBC did.
https://twitter.com/BBCr4today/status/904958811546554368
It originally said “your”. I think that 1-letter difference is quite important.

Iceland’s foreign minister says countries want free trade deals with the UK #r4today

It could have been a simple typo. It could have been an optimist, wanting to believe some good news about Brexit or it could have been government propaganda. I wish I could be sure that it wasn’t the latter.

1 letter to change a flood of international imports into hope of exports and fixing the UK’s balance of trade deficit. Politics is the art of getting people to agree with you, whether you are right or wrong. Sadly, the reality of Brexit will still be true, whatever it is, and believing it will work doesn’t actually help much.

How Low, Linux Hardware Punks?

I volunteered a couple of times to help at kids’ coding events. One of the first things I noticed was that they had better kit than me. I like keeping old computer hardware going as long as is humanly possible. I’m not retro, I’m ‘careful’; with the Earth’s resources rather than with money. I was giving my time freely in the hope of giving young people a better start in life. I realised I was giving it, almost exclusively to the children of Middle Class professionals. They were great young people, they’d had their parents support.

What the ‘other’ kids need, is a punk movement. They need the junk-shop chic of battered second-had guitars and home re-styled charity shop clothing. They have Raspberry Pi’s at school so they’ve seen Linux but they need their schools to give them access to downloads. More than 15% of UK homes don’t have Internet. THIS 15%. Meanwhile, companies throw away perfectly good kit because it’s cheaper than upgrading. There’s now a Raspian Linux for PCs so I’m not the only person aware of this untapped resource for education.

I wrote a couple of tweets this morning:

“What low spec hardware running Linux are people doing things with? Is already a Thing? (please RT: for reach)”

and https://twitter.com/WooTube/status/900646598019080194
“I want to make disposable kit cool for kids without access to disposable income (from my Eee PC 1000 netbook )”

I don’t see this working as a charity. No-one wants to be a charity case.
It might work as a youth movement. I’m both too old and too comfortable to lead a ‘working’ class rebellion. Do any of you young’uns fancy a go?

“A storm is coming and it’s name is Linux” as we used to say in the olden days.
(CopyLeft Martin Houston. He’s the guy who corrupted me at a DECUS meeting
http://www.deluxetech.co.uk/history-linux-magazine-cover-disks/
Linux-FT was my first distro because of him.)

Truth is beauty; but is that all?

I was reading about Clojure’s views on truth and falsehood this morning. Some of them are interesting:
(true? true) ; -> true
(false? false) ; -> true – a classic double negative

Clojure also has the value ‘nil’.
(true? nil) ; -> false
(false? nil) ; -> false

Then I went on LinkedIn and someone asked if there is ever an absolute truth. It’s a question I’ve been thinking about, so I wrote this:

I think that “at non-quantum scales”, it seems likely there can be only one set of events which actually happened but every human is wandering around in their own model of reality, based on their perception of incomplete data. Sometimes, a slow-motion replay helps fill in some of the gaps but it will be the same every time we look and it may not reveal ‘the whole truth’ we seek. We all have a simplified view of what reality is, based on our personal knowledge and beliefs and we can’t go back in time for more data, so our view of truth is an approximation. Heisenberg’s Uncertainty Principle says that it can only ever be an approximation.

In summary: I believe there is one truth but that doesn’t mean we will ever know what it is. Alternative perceptions may be just as valid as our own; possibly more so.

[ The original version of this post said nil meant “I don’t know.” I immediately discovered that was wrong. In Clojure, only ‘false’ returns ‘true’ to ‘false?’ but nil is ‘falsey’, so each of the following forms returns “F”:
(if false “T” “F”)
(if nil “T” “F”)
You can see how that could confuse a stupid person ]

Process + Data + Structure = Engineered Software

I tried to address a question about data structure on Quora. This post is a stand-alone version of the answer I gave.

‘In the beginning’ there was ‘Data Processing’. That is: ‘data’ and ‘process’, expressed in the form of a program. Programs implement algorithms.

In 1976, the practice of ‘Structured Programming’ was trending and a book was written: Algorithms + Data Structures = Programs ( Wikipedia entry)

Processes and their structure + Data and it’s structure = Programs.

If you ignore interactions with the real world, that’s all there is. If you take any working program and ignore the processes and their structure and the raw data, then whatever is left is data structure.

We structure data because the alternative is data sauce, traditionally only ever served with spaghetti code.