PurelyFunctional.tv Newsletter 456: A sense of mystery

Issue 456 - December 27, 2021 ยท Archives ยท Subscribe

Design Idea ๐Ÿ’ก

A sense of mystery

This essay continues the series about Domain Modeling.

As you may know, I've been reading the ACM Turing Award lectures in order, starting with the first by Alan Perlis on my podcast. It's essential to understand the past, and these lectures give a snapshot of what was significant each year. One thing that I think is missing from today's landscape is a sense of awe and mystery at the phenomenon of computing.

I grew up on the likes of Carl Sagan and Richard Feynman. They always stressed the importance of the beauty of science. The world is a mystery, and science is our best way to make sense of it. Humility is required because the frontier of science starts where our knowledge currently fails. By exploring those mysteries, we uncover yet more mystery.

But where is the sense of mystery in our work? I hear about new frameworks and libraries that make something much easier or more practical. I hear about new hardware that gives incremental improvements in speed and capacity. There is excitement in those developments. However, where is the awe and sense of mystery?

Some things continue to amaze me even after 20 years in the industry. I may casually toss out a recursive function. But if I'm honest, I get a little thrill that it works at all. Defining a thing in terms of itself is terrifying. I write my base and recursive cases, then run it at the REPL. Strap in because it's going to be a wild ride!

Another one is a question I keep pondering: How can meaning emerge from mechanism? We write programs that, at the base, move electrons around in complicated circuits. But we assign meanings to specific arrangements of electrons, primarily because of the process that chose those arrangements. How can a mechanical process lead to meaning?

Since abstract logic, we have reduced some forms of thought to abstractions. We say "A ^ A => B", and we can deduce B. But A and B don't have meaning in themselves. Information theory also got rid of meaning. It's just ones and zeroes. The final nail in the coffin was the Turing Machine and the Lambda Calculus. They showed computation's expanse (and limits) with no meaning.

You might say that people assign meanings, but what makes people unique? Are we more than Turing machines? I doubt it. Computation has revealed mysteries in our understanding of the search for meaning.

Do you have a pet mystery that you are working on? Meaning is mine. It has spawned several conference talks, blog posts, and uncountable long conversations. What keeps you fascinated about programming? I think we need to spend more time in a state of awe.

Recent presentation ๐Ÿ“ข

My reClojure 2021 talk: The Art of Domain Modeling

Book update ๐Ÿ“˜

Good news: Grokking Simplicity is going into another printing! That gave me the opportunity to correct some errors my readers and I have found in the book. The book is only getting better!

You can order the book on Amazon. Please consider leaving a rating and/or review. Reviews are a primary signal that Amazon uses to promote the book. And they help others learn whether the book is for them.

You can order the print and/or eBook versions on Manning.com (use TSSIMPLICITY for 50% off).

Awesome book ๐Ÿ“–

The Character of Physical Law by Richard Feynman explores the mystery of science through the laws of physics. Such a beautiful view of the wonder of human knowledge.

Pandemic update ๐Ÿ˜ท

I know a lot of people are going through tougher times than I am. If you, for any reason, can't afford my courses, and you think the courses will help you, please hit reply and I will set you up. It's a small gesture I can make, but it might help.

I don't want to shame you or anybody that we should be using this time to work on our skills. The number one priority is your health and safety. I know I haven't been able to work very much, let alone learn some new skill. But if learning Clojure is important to you, and you can't afford it, just hit reply and I'll set you up. Keeping busy can keep us sane.

Stay healthy. Wash your hands. Wear a mask. Get vaccinated if you can. Take care of loved ones.

Clojure Challenge ๐Ÿค”

Last issue's challenge

Issue 455 -- Autocomplete -- Submissions

This week's challenge

Rhyming scheme equivalence

Roses are red    A
Violets are blue B
Sugar is sweet   C
And so are you   B

English teachers like to represent the rhyming pattern of poems with letters. Each line rhymes with lines with the same letter. In this case, B lines rhyme together, but the A and C lines don't rhyme. We will call that a "ABCB" rhyming scheme. However, the choice of letters is arbitrary. We could have called it "IBPB" or "XALA".

We want a way to know if two rhyming schemes are equivalent. Write a function that returns nil if they are not equivalent and returns a map of replacements if they are equivalent.

Examples

(equiv? "ABCB" "XALA") ;=> {\A \X \B \A \C \L}
(equiv? "A" "A") ;=> {}
(equiv? "A" "B") ;=> {\A \B}
(equiv? "AB" "A") ;=> nil
(equiv? "ABB" "XXY") ;=> nil

Thanks to this site for the problem idea, where it is rated Very Hard in Java. The problem has been modified.

Please submit your solutions as comments on this gist.

Rock on!
Eric Normand