Not all productivity advice out there applies to being a software engineer. Whereas typical knowledge workers need to focus on managing their time and the throughput of tasks they complete, software engineers are responsible for consistently discovering solutions to problems. For this reason, most productivity advice wont apply to being a software engineer, at least not without some rethinking.
One of the most important things for software engineers to manage is their short-term memory: the number of things they’re juggling and tracking in their mind at a given time. Successfully fixing a bug requires having a rough understanding of how a whole system works, while have a high-fidelity understanding of the piece in front of you. All of that lives in your short-term memory while you’re working.
The purpose of this article is to explain the Zeigarnik Effect and how it can help you better manage your short-term memory. While it is just one aspect of how your brain works, learning about it can have a large impact on your productivity. Specifically, it can help you manage distractions, remember how something works, and bootstrap a project into your short-term memory quickly.
The Zeigarnik Effect
Things occupy a limited number of “slots” in your short term member, until your brain decides what to do with them. Your brain makes one of two choices with anything in one of these slots: remember it forever or forget it permanently. This is why you’ve walked into another room and completely forgotten the reason you got up from your desk. It’s also why you can’t remember what your grocery list was on February 7, 2019. Your brain didn’t think the information was important, and so dropped it.
This effect goes farther than that though. Psychologist Bluma Zeigarnik was amazed by a waiter who could remember everyone’s order at a large table without writing anything down. But when she went back to the restaurant a few minutes after paying her check, to pick up a forgotten jacket, she was shocked to learn that the same waiter didn’t remember who she was or having ever met her. The waiter was unbemused: all his colleagues experienced this too.
If you’ve ever
git blameed a line of code only to learn it was you who was to blame for it, that is the Zeigarnik Effect.
Putting it into Practice
Now that we’ve covered what the Zeigarnik Effect is, let’s discuss how we can put it into practice. I can recommend three simple practices that will leverage this new knowledge of how your brain works to make you more productive:
- Write down anything that is distracting you from concentrating on your work
- Finish each work session by summarizing what you did, what problems are still unsolved, and what needs to happen next
- Start each work session by reading your previous summary and writing an overview of what you’re going to work on next
Let’s explore each in more depth.
Write Down What’s Distracting You
The next time you’re distracted by something while working, write it down. I keep a pen and a notebook next to my keyboard and will write the idea down there. Another tactic I’ve found that works well is to use the quick capture feature on Todoist or Things, which you can pull up with a keyboard shortcut. That thing you have to do later or nagging idea in the back of your head is distracting you because it’s occupying one of the slots of your short-term memory. You can pop it out of that slot simply by writing it down.
This is the key observation behind systems like Getting Things Done. And if you’re still not sure this will work for you, Einstein apparently kept a pen and paper at his desk, separate from the pen and paper he used to work with, where he kept a Stop Thinking About list. When something was distracting him, he would write it down using this other pen and paper to get it off his mind.
Working through a complex problem requires keeping the problem in your memory and everything else out of it. By writing down anything that’s distracting you, you can get it out of your memory and free up a slot for the problem at hand.
Describe What You Did That Day
The second way you can implement this advice is to use the pen and paper next to your keyboard to summarize the work you’ve just completed. What did you do, where are you in the process, and what needs to happen next? This will get the work out of your short-term memory and is a favored technique among many writers.
This point isn’t immediately intuitive: the point of summarizing your work is to get it out of your head, not convert it to long-term memory. Hemingway was known for doing this, jotting down a few lines about what would happen next before he stopped working. Then he would do anything to not think about his work:
It was in that room too that I learned not to think about anything that I was writing from the time I stopped writing until I started again the next day. That way my subconscious would be working on it and at the same time I would be listening to other people and noticing everything, I hoped; learning, I hoped; and I would read so that I would not think about my work and make myself impotent to do it.
A Moveable Feast, Ernest Hemingway
When you write your summary of the day’s work, focus in particular on where you are in your thinking and any open or unresolved problems you need to finish. In addition to getting these out of your short-term memory, doing so will push your work to the back of your mind where your subconscious can take over.
I’ve experienced many more shower-epiphanies about my work as I’ve been doing this. Except, for me, they happen during my afternoon workout and I often have to stop in the middle of a set to text myself some ideas on what to do next.
Describe What You’ll Do Today
The final way to use the Zeigarnik effect to your benefit is to read your journal entry from yesterday, then write about what you’ll work on today. This will bootstrap the project back into your short term memory while also helping in two other ways: (1) you’ll naturally pull together and summarize any epiphanies you’ve had and how to implement them in your project and (2) you’ll break down your work into smaller tasks that can occupy a slot of memory.
John Steinbeck took this approach as far as writing a dedicated journal for each of his books. His journals from The Grapes of Wrath and East of Eden have both been published and are a treasure trove of insights. They could have just as easily been written by a software engineer:
Every book seems the struggle of a whole life. And then, when it is done — pouf. Never happened. Best thing is to get the words down every day. And it is time to start now.
Working Days: The Journals of The Grapes of Wrath, John Steinbeck
If I’ve had a shower epiphany since my last work session, I’m very tempted to skip this step and dive right into coding. When I do that though, I find I lose steam quickly and get stuck. Summarizing the work I need to do that day helps me think through everything at a high level, almost like creating a map of the day’s work session. That makes writing tests and pseudocode easier, which in turn makes writing actual code easier.
A really important part of being a successful software engineer is managing your short-term memory. And yet very few software engineers could tell you the first thing about how short-term memory works or how to leverage it to make a coding session go well. Understanding the Zeigarnik Effect, as just one aspect of how your brain works, can have a huge impact on your productivity as a software engineer.
In this article, I gave three ways you can implement this in your coding practice:
- Write down anything that’s distracting you from the problem at hand. This will remove it from your short-term memory and free up a “slot” for your work.
- When you finish coding, summarize the work you did that day, where you are in the process, and what needs to happen next. You can do this in a few sentences and it’ll free up your brain to relax after a good day’s work.
- Before you start coding, read your summary from the day before and write a few sentences about what you need to do that day.
As a bonus, your new understanding of the Zeigarnik Effect gives you an excuse to go buy a new notebook, and who doesn’t want that.
Join the newsletter to receive the latest updates in your inbox.