Skip to content
SciTools Blog
Menu
  • Home
  • Blog
  • Support
  • Contact
  • Login
  • Pricing
  • Free Trial
Menu
clear glass jar on brown wooden table

Short-term memory overload while debugging

Posted on September 29, 2021

TLDR:

Even if you are super smart your short term memory can only remember 5 to 9 things for 30 seconds. The decisions you make while thinking about code are far too complicated to trust to memory. Ken shows how Understand helps you not rely on short term memory and walk code in an organized fashion that misses nothing.

Details:

I had a class in Psychology in college where they covered short term memory and described a man who defied all the expectations of the 7 things in short term memory (+-2). He was remembering huge strings of ones and zeroes (binary). You know where this is going… he worked at Bell Labs and was chunking them into binary that he recognized instantly… so while he did have a great short term memory, he was chunking binary into 9 or 10 numbers and remembering them.

Short term memory is limited and it usually is encoded by audio (not visually).

Source code, even “simple” source code, usually exceeds your short term memory quickly.

For example, I’ve been looking at the source code for “Git” over the last few days. If I investigate its use of “stdio.h” – maybe for security compliance, or something similar, it starts off easy:

6 things – I can keep track of that!

One click later… things are getting a bit thornier:

Hmmm… I’m reaching my limit.

and one click later… overload!

Abort Abort!

In some cases you can “grep” or “find in files” – but what I’m looking at here are the possible uses of it, and there are too many names/symbols/macros to search for – I need to do it based on the relationship to “stdio.h”.

I didn’t count the uses, it’s too many to remember. I’m gonna have to scan thru looking for candidates, or grind thru looking at each. That’s okay, I don’t have to remember anything now – the list is there, I’ll just walk it.

Here, by the way, is the final fully expanded view of the potential usages of stdio.h. Given how large this is I’d be thinking about a script that would look at what <stdio.h> provided, and filter this graph to just code that used things it declared. That’s an article for another day!

Editors Note: It’s not actually the whole graph – the blog engine didn’t want to render the whole thing, so here is as much as we could fit.

  • Instagram
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Learn more about Understand's Features

  • Dependency Graph
    View Dependency Graphs
  • Comply with Standards
  • View Useful Metrics
  • Team Annotations
  • Browse Depenedencies
  • Edit and Refactor

Related

Leave a Reply Cancel reply

You must be logged in to post a comment.

  • API
  • Architectures
  • Business
  • Code Comparison
  • Code Comprehension
  • Code Navigation
  • Code Visualization
  • Coding Standards
  • Dependencies
  • Developer Notes
  • DevOps
  • Getting Started
  • Legacy Code
  • Licensing
  • Metrics
  • Platform
  • Plugins
  • Power User Tips
  • Programming Practices
  • Uncategorized
  • Useful Scripts
  • User Stories
  • May 2025
  • January 2025
  • December 2024
  • November 2024
  • August 2024
  • June 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • June 2023
  • April 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

©2025 SciTools Blog | Design: Newspaperly WordPress Theme