Thoughts on Software

Join Semilattices and Winnie the Pooh

eno writer

One day, when Christopher Robin and Winnie-the-Pooh and Piglet were all talking together, Christopher Robin finished the mouthful he was eating and said carelessly: "I saw a Heffalump to-day, Piglet."

"What was it doing?" asked Piglet.

"Just lumping along," said Christopher Robin. "I don't think it saw me."

"I saw one once," said Piglet. "At least, I think I did," he said. "Only perhaps it wasn't."

"So did I," said Pooh, wondering what a Heffalump was like.

"You don't often see them," said Christopher Robin carelessly.

"Not now," said Piglet.

"Not at this time of year," said Pooh.

This week I had coffee with a friend who has done a tremendous amount of work on text editing data structures and protocols (checkout Automerge). We were talking about a data structure for storing text and he explained it worked like a git repository's commit history then paused and said "it's a join semilattice." I felt a bit like Winnie the Pooh as I nodded my head while wondering "what's a join semilattice". My friend intuited my confusion and offered "it's just a math thing that means git repository". Crisis averted - just another one of the countless math things I missed while I was doing an undergrad in English.

In any event, I went home and watched a video on join semilattices and I kind of get them and they do kind of help me better understand what a git commit history actually is. I didn't really want to write about join-semilattices though. I wanted to write about this because it's not infrequent that I encounter some technical term that turns out to precisely describe something I have been doing unwittingly. This can often be quite rewarding because if I start typing my newly discovered term into Google I discover all sorts of smart people writing papers and blog posts on the same problems I am trying to solve.

On the other hand, I worry new terminology sometimes slows my thinking down. In a world where I know nothing, I look at a technical problem from first principles and just do whatever I need to do to solve it. When I approach a problem with a library of terminology for various solutions I sometimes switch into pattern matching mode. "What I need here is a join semilattice!" This can shortcut some problem solving when I'm correct, but sometimes it can draw me into a spiral of complexity as I try to glue together concepts that seem correct but don't exactly suit my problem.

This was originally written as part of my weekly devlog for eno, the modern word processor I am writing.