Do you think that programming requires spatial memory? This author seems to think so, and I do not agree. I can’t speak for others, but I definitely don’t do any kind of spatial reasoning when I’m programming. Unless you are programming something with spatial meaning (3D or 4D brain maps, anyone?) the code is not inherently spatial. If there is any kind of higher order processing it’s more a combination of pattern matching and intuition.

For pattern matching, there are common ways of doing things based on structures or types and when you recognize that things fall into place nicely. A lot of us have our favorite organizational patterns that you can easily see across our projects. We’re pedantic about it. Being good at pattern matching is the same as being good at plugging numbers into equations on early math exams. You might get a good score, but you don’t learn to think.

Intuition in programming (per my definition) is knowing how things come together. In practice it means keeping a lot of different pieces that ultimately need to work together in your head, and then having intuition about everything from what checks to do, to what comes next. Intuition is being able to smoothly and comfortably move through complexity, and not freeze under uncertainty. As you are writing one thing you think about how it works with another thing and you keep mental notes. You are usually two to three steps ahead in your mind so you don’t lose pace. Or it could be backwards - you notice something wrong and you can mentally walk backwards through the logic until you have a hypothesis to test. I would suspect there are strategies that underlie intuition that once you get really good at they become second nature, hence “intuition.”

Pattern matching can make a good programmer, but I think intuition is what makes a great programmer. Or someone that can write a lot of fairly decent quality code, and quickly, because arguably you can lack intuition but be extremely detail oriented and look up or check everything as you go. But seeing spatial pictures in ours heads? Nah, dawg. My visual system isn’t interested enough to get distracted by that! 😄

Suggested Citation:
Sochat, Vanessa. "Visualizing Code." @vsoch (blog), 22 Jan 2022, (accessed 04 Feb 24).