On Imaginative Design: how an ancient memorization technique can help us programmers to better traverse the abstractions of our programs

Lucas Sorribes

--

At first, thinking in terms of design is challenging. Programming can be deceiving: because we deal with neat symbols, letters, and colorful highlights in our IDEs, we might think it’s similar to math but with more tangible materials. It’s not. Programming is incredibly abstract — an abstraction over an abstraction over an abstraction… In essence, we’re telling electrons where to go and where not to go. As a friend of mine used to say, it’s like “plugging in a brick and teaching it how to think.” But, as far as I know, electrons don’t understand English, so we need an intermediary. You get the idea.

Even beyond our favorite programming languages like Python or Go — abstractions in themselves — we need to reach even higher levels of abstraction. This is what “thinking in design” means: another level of abstraction when thinking about programming. How can we make this task easier? How can we make it easier to think in terms of components — myriads of cogs working together — without getting lost?

More than 2,500 years ago, the Greeks invented a method to memorize huge amounts of text, called mnemonics or mnemotechne (from Mnemosyne, the goddess of memory), known as the art of memory. The idea behind this long-lost art was that memory is essentially a way of thinking — not just some mental muscle that pushes things into our brains until they’re packed like a Tupperware container. For the Greeks (like Plato or Simonides) and Romans (like Cicero) who practiced this technique, memory was considered to be, in essence, the ability to link information to images in the mind.

For example, if you wanted to memorize the Iliad, you wouldn’t just start repeating verses like a parrot, as we might do today. No, that would be crude, as a classicist might say. Instead, you’d go to a building you knew well, like the Colosseum or the Temple of Athena, and walk around it — through it — until you had a perfect image of the building in your mind. You’d do this day after day until you could recall every wall, every room, every column, every niche, and every piece of furniture, with your eyes closed — using the eyes of your mind. Only then would you be ready for the real memorization.

Once you could visualize the building with your eyes closed, you’d start linking specific parts of the text to specific elements of the building. For example, if you wanted to memorize the Death of Patroclus, you’d associate that passage with the second niche to the left of the main entrance, where the statue of Hera was located. If you wanted to memorize the Rage of Achilles, you’d link it to the fifth column beside the right entrance. The idea was that, in the end, you’d have the entire text linked to the entire building, so that when you wanted to recall something, you’d just have to enter the building with your imagination, approach the architectural element linked to the part you wanted to remember, and it would come to mind. This fascinating technique was used for thousands of years, but it didn’t survive beyond the Middle Ages. It was later rediscovered by some of the most influential magicians of the Renaissance, especially Giordano Bruno, who became a master of the craft — but that’s another story. The most important thing is that it worked. People memorized entire libraries using this technique.

Now, let’s imagine we’re designing a chess program. What I want us to do now is to forget about the code for a moment and instead think about a spaceship (we can update the Colosseum) as iconic as the Nostromo, the spaceship from the movie Alien (1979). Picture its bridge, the crew cabins, the kitchen, the AI room, the hatchway… Now, think about chess: what are the most basic chess elements? We have the pieces, the board, the players… All right, let’s continue. Imagine you’re a new recruit who just arrived on a shuttle. Naturally, you’ll need to orient yourself in this huge ship. First, you see the main entrance to the bridge — this is the program’s entry point. Maybe it’s a main.py or something similar.

Great! Then, you notice some indicators beside the threshold with orientation help: that would be the README.md. Finally, when you decide to cross the entrance, you encounter a long bridge ahead of you—this could be the dll, lib, or a similar directory containing the files where the basic classes and functions are defined. This room would serve as the access point to every important section of the ship. I suppose you’re getting the idea now.

What I want to emphasize here is the importance of developing the skill to traverse different levels of abstraction, and how imagination can play a crucial role in improving this skill. To come up with a good design, we have to think in abstractions and put ourselves not only in the place of the user but also in the perspective of the future reader of our code, and even in the mindset of the programming language itself. We need a design that makes sense for both humans and machines — a design that makes life easier for us and for them. The more complex our programs become, the more clarity of thought we’ll need.

If you’re interested in reading more about this imaginative technique, I encourage you to read:

YATES, F., The Art of Memory, Random House UK, 2014.

--

--

Lucas Sorribes
Lucas Sorribes

Written by Lucas Sorribes

I studied Philosophy and Theology, with the specialization in Logic and Philosophy of Science. I pursue now a career in Software Engineering, my great passion.

No responses yet