Bill Gates called the book
Moonwalking with Einstein: The Art and Science of Remembering Everything “absolutely phenomenal” and “one of the most interesting books I’ve read this summer.” I followed Bill’s advice, read it, and then read a half-dozen other books on memory techniques. I wrote about how those books changed my learning strategies in Relearning to Learn but I left out the “Remembering Everything” part.
I left out that little itty bitty bit because I needed to first prove to myself that I could memorize a tech book, since it seemed like such a daunting task. I have now done that with “Effective Ruby: 48 Specific Ways to Write Better Ruby.” I read and memorized that book in a little over two weeks on about two to three hours a day. In this article I will describe how I adapted the strategies illustrated in “Moonwalking with Einstein” for the memorization of a technical book. But, as Bill Gates said: “Don’t believe anybody who tells you it’s easy,” and “You have to be very serious about it.”
One of the developers at work asked me what you might be thinking: “Why would you want to memorize a technical book when you can search your books or google?” I told him: “Many times I know I’ve read a technique or idiom on a better way to do something but the shadow of that memory is too vague. I may not even remember which book it was in or if it was a blog post. Yeah, I could google but I just need to get the thing done.” But it goes much further than that. I have read more books on Ruby than most Ruby devs I’ve worked with, yet, there are times where they’d suggest a technique that I had forgotten. Sometimes I’ll find out they learned the approach from the same damn book.
My developer idioms have been developed from over 30 years of coding. I’ve been doing Ruby for six years or so and, to be honest, I don’t remember Ruby-specific idioms because my Rubyish variant of a Groovy, Java, or C++ idiom all too often suffices.
I’m currently employing the Method of Loci in the construction of memory palace for Refactoring, more specifically: The Ruby Edition. Martin Fowler says of his Refactoring book: “The bulk of the book is around seventy refactorings described in detail: the motivation for doing them, mechanics of how to do them safely and a simple example.” That’s not a book you sit down, consume, and remember. I’m putting those seventy-some refactorings in a memory palace.
Method of Loci
The memorization technique Joshua Foer described in “Moonwalking with Einstein” is not, like Angular and Vue, newfangled. It was discovered in 477 BC by Simonedes, a Greek poet, after he was requested to identify the crushed and mangled bodies in a palace — the roof of which collapsed immediately after he (and maybe Elvis) left the building. Simon identified the bodies not by sight — they were unrecognizable — but by the location in the various rooms where he had last seen a person. The technique worked so well that Simon began to memorize poems by visualizing a palace and placing words in visually rememberable spots (memory pegs) of each room. Loci, by the way, is the latin word for a specific point or position.
Humans have evolved to remember places, people, smells, and sounds. Our minds have not evolved to remember words and numbers and otherwise the stuff we are expected to learn by rote memory in school. When early man painted on cave walls it was not for art but to remember.
Ok, so you’ve seen one of those memory geeks on Johnny Carson (sorry, I’m old, let’s say Jimmy Fallon) that could remember a shuffled deck of cards in less than thirty second using the memory palace technique. And you’re thinking: “Really! You actually think this will work for tech?” Sure, it can work for tech, it is already working for other vocations where memorization is even more important.
As an example, my son is in his last year of medical school at UVA. The standardized tests in medical school are brutally complex, the results of which determine student futures. Sure, no one gets into medical school without being adept at studying and memorization, but listen to this: For the last 5 years all medical students pay to use courseware from sketchymedical.com, which is entirely based on the memory palace technique. Take 20 seconds, visit sketchymedical.com, and just watch the animation on its homepage. Their landing page says: “These guided sketches help you create a memory palace by associating medical topics with memorable visual elements.” Passing a pathology exam is a bit more complex that memorizing a deck of cards, yet med students do it with goofy cartoons.
I actually signed up for a sketchymedical trial and took a free lesson. While I had fun watching the cartoon graphics and listening to the audio, I didn’t remember much but the silly graphics. That’s because I did not have the context. The same goes for creating a memory palace for a tech book or seminar. You have to understand the material. There are two basic types of memory strength: storage and retrieval. Us geeks do a pretty damn good job of storing information we’ve read (or listened to) and understand. The problem is: we often are unable to recall that information. Putting that information in a memory palace makes it retrievable.
I published a text-based version of my memory palace for Effective Ruby in copious detail in a the following blog:
The Memory Palace of Effective Ruby. You need not go to such lengths — I created that readable version so I could share what I visualize in my head.
Building A Memory Palace
Your memory palaces (that’s right, you’ll need a bunch of them) don’t have to be rooms in a palace. You can use any building of which you have strong visual memories. Or a journey with roads, turns, landmarks, lights, and signs — like the U-turn sign my 16 year-old son hit when, he said, he was distracted by a roaming pig. Each of the rooms, and specific spots within that room, are considered pegs — because you “peg” visual images of things you wish to remember on them.
For my Effective Ruby palace I used the offices from a job I had in the early 1990s in San Antonio, Texas. I worked there 5 years so I have plenty of pegs. For my Italian conjugation palace I used the classroom from 7th grade French. Each desk has a peg for a visual of a different tense. I won’t do the whole list but it includes: Tony Romo, Yoko Ono, a purple vampire, the SoHo skyline, and Elmo.
In general, anything in a room that you can find in the dark — lamps, chairs, desks, desk drawers, and closets — work well as a memory peg. In my living room, our TV sits on a desk with 10 drawers so, with the table top, the TV, and drawers, that’s 12 pegs. Sure, some of the drawers are small, but my imagination is not. One of my rooms in my Effective Ruby palace holds the Atlantic ocean with a sinking Titanic. (The more ridiculous, the better it sticks.) Note that transient items — like magazines, flowers, or a coffee cup — should not be used as pegs.
You will need to always have a half-a-dozen or so empty memory palaces available. You’ll be consuming them so be sure to keep the queue stacked. Once you use a memory palace, it will house those images until you no longer need to remember them. And, actually, it’s kind of hard to clean up and reuse a memory palace. That’s right, once built, it’s hard to forget.
I find it fun to scour my past for memory palaces just before I go to sleep. For example, I’m working on reconstructing one that is the elementary school where I attended first and second grade.
A Memory Palace Construction Strategy for Tech
Read (or listen) actively while taking creative notes. Focus, using all parts of your brain: left, right, sensory, musical — all of it. Focus your whole self and don’t think that computer scientists with advanced degrees are more adept at focusing. Use your active brain. Yours — the one has a degree in literature or biology or art. The brain that played in the school band and spent a summer abroad or went to space camp or immigrated to the US from Sudan. The brain that will form analogies, jokes, and puns. The creative brain that will construct visual images using people and places from your past. The mind that has hopes and dreams for the future. After all, you are reading this post because it could change that future (otherwise don’t read it much less create a memory palace for it.)
Take notes of the thoughts you make as you read. The ah ha moments and the analogies and puns and visuals. Sure, highlight the important text but your notes should translate that verbiage into your words of comprehension. If you think of a mnemonic as you read, great, but don’t push it. Read to understand and comprehend and your notes should be triggers to those understandings.
Take more breaks from reading than you might normally. Active reading is hard. Your subconscious brain needs time to assimilate and process information during so called breaks.
Review your notes and begin to look for a visual. One with which you can attach a word or phrase. Simplify your notes: they are to jog your memory, not to be your memory. Bubble up your technical notes into visual descriptions adding action. Create an absurd and exaggerated scene, with characters (ranging from Wile E. Coyote to Barack Obama.) Perhaps make that action sensual or violent. Remember, you will only remember a scene if you can clearly visualize it. I find, when I’m having problems remembering, my vision is lacking clarity or absurdity and I need to add exaggerated action and improve the visual. Be sure to use tech keywords in your story. Puns and acronyms work as well.
Walk through your memory palace, in your head, without notes, regularly. The first phase of constructing your memory palace is to be able to rattle off the word/phrase for each peg. Initially, don’t try to visualize the full action of the scene until you can recall the peg sequence of the word/phrase by rote. But, with the memory palace strategy, you’ll find you can almost do that without trying. Be sure to start fleshing out your memory palace very early in the process of reading a book.
Continue reviewing and refining your notes until most of the tech notes have bubbled up into absurd visuals. Again, reviewing in your head is best. Here’s a list of scenarios where I have done memory palace walk throughs:
- Just before I go to sleep and, In the middle of the night, when I can’t sleep
- While watching reruns of my wife’s favorite episodes of Too Cute
- While driving or standing in checkout lines
- During dental procedures
Notes on Notes
I use Apple Notes. I take the option to keep my notes in the iCloud so I can edit them on my Mac and study them on my iPhone. I like to highlight or italicize text and change font and color to make keywords pop. Although, once I have a clear visual, the text itself, much less the formatting, is no longer important. For each memory palace, I create a folder. Each pegged visual has its own note, the top line of which I number and place the word/phrase followed, optionally, by a short description. Here’s a view of Notes on my iPhone from my palace of Effective Ruby:
- Manson: Atrium full of people…
- Neil Armstrong: Room full of…
- Crypt Keeper wearing pearls
- Duct taped girl: Constance
- Yellow flashing light
- Gramps: Dad and Gramps sitti…
- Superman with/without parents
I read from a variety of Kindle devices: Fire, Paperwhite, and iPhone. I make heavy use of highlighting and notes. The Kindle has a feature that allows you to send all your notes to your Kindle email in HTML format. I open the emailed HTML on my Mac and copy-and-paste to my Apple Notes. It is from my organized Apple Notes that I do my palace construction and walkthroughs.
Sample Note from my iPhone
Below is a sample Apple Note from my Effective Ruby palace. One point about the last two sections of bullets: they are pure tech notes. They are now extemporaneous as they have been obsoleted because their concepts have been bubbled up into the absurd scene.
16: Mice: Two guys doing scientific tests on mice
- first guy handed a bunch of mice to the second
- who was wearing a marshal’s badge
- the second guy cloned or duplicated the mice
- actually, most of the time he duplicated them
- sometimes he cloned them
- every now and again he used his Marshall capabilities and did a deep copy
- he hands them back to the first guy and then runs tests on the copies — tests that mutated the mice in indescribable ways
- args are passed as refs, not values
- but for Fixnum objects
- dup and clone make shallow copies
- Marshall can be used to create deep copies
- when needed, but be careful
- dup: best option
- always allows mutation
- won’t pull singleton methods
- honors freeze so might not be able to mutate
- pulls singleton methods
A Tech Idiom to Memory Palace Peg Walk Thru
Let me step through my process of converting a tech note to a visual that I have pegged into my Effective Ruby memory palace.
Item three of Effective Ruby is “Avoid Ruby’s Cryptic Perlism.” Right off I clue in on the word: Crypt. I mean, come on… Crypt Keeper! And then the word: Perl. Pearl. That was too easy: “Crypt Keeper wearing a string of pearls.” But that’s just the title of the idiom. Item three was covered in several pages of Peter Jones’s book as it detailed three recommended alternatives to the use of the Perl-like cryptic syntax supported in Ruby:
Avoid the use of
=~ and a regex as you then need to use the cryptic
$2, and so forth, variables. Peter recommends the use of
String.match which returns a
MatchData object on which you can use brackets to retrieve matches. “A man is holding a match in one hand while incessantly pointing at it with the slowly curling index finger of his other hand.” The curling finger looks like the tilde operator.
Don’t use Perl’s
$: instead use the more descriptive
$LOADPATH. You load a path with a wheelbarrow full of some kind of filler: “I stumble into a wheelbarrow. It’s full of chipped rubber tires of the type you use for paths in a park. Oddly, there’s a crisp dollar bill on top of the load destined for some path.”
Enable the use of other meaningful global Perl variables by loading the English library:
require(‘English’) and then you can use meaningful global variables with names like
$OUTPUT_FIELD_SEPARATOR instead of
$,. “The last thing strangeness of the room is that there’s an English dictionary sitting on the middle of the table.”.
Here’s a few other mnemonic word/phrases I used build the palace of Effective Ruby:
- Superman with/without parents: Best practices for parameters and the use of optional parentheses when invoking parent methods.
- Spaceship: The definition of <=> method, commonly known as the spaceship operator
- Titanic: Rescuing errors (in Ruby you rescue rather than catch exceptions)
- Aflac Duck: An idiom on the use of the ensure clause
- Hoarding: Garbage collection
- Trump/Baldwin: Alec Baldwin impersonating President Trump for Mocking
- MindHunters: Code profiling
For many of the items in Effective Ruby it was relatively easy, and fun, to create mnemonics. Others, like “Judge Ruby and the Gallows” (which is on use of the
exec methods to create or run dynamic code) took me some time. But, then again, it was a complex subject and, until I had the analogy worked out, I really didn’t have a solid grasp of the Ruby rules and usage patterns for
Why aren’t more programmers using the Method of Loci? Maybe because coders just aren’t aware of it. Or perhaps because it’s initially hard to get started and takes practice to do efficiently. But, probably because they haven’t heard of it! You can create a memory palace methodically and the extra time you spend constructing one will result in better memory retrieval strength, if not understanding. Lewis Smile, in his book “The Memory Palace”, said: “There’s no such thing as a bad memory, only an untrained one.”
I’m not going to construct memory palaces for every book I read or session I listen to. I’m going to create them for books full of idioms on languages and frameworks and design patterns — stuff I want on the tips of my fingers as I develop. I certainly will be constructing a palace to memorize basic syntax for my next programming language (Go, Haskell, or something, not sure yet.)
Elvis may have left the building but you, Simonedes, and I can construct palaces so our memory stays.
Brief list of books on memory
- Moonwalking with Einstein by Joshua Foer
- Pragmatic Thinking and Learning, Refactor Your Wetware by Andy Hunt
- Make It Stick: The Science of Successful Learning by Peter C. Brown
- Quantum Memory Learn to Improve Your Memory with The World Memory Champion! by Dominic O’Brien
- How We Learn: The Surprising Truth About When, Where, and Why It Happens by Benedict Carey
- Unlimited Memory: How to Use Advanced Learning Strategies to Learn Faster, Remember More and Be More Productive by Kevin Horsley