Home

Contents

How to build mental models for CS concepts

Published 2026-06-30

Tags: #education

We previously argued for the importance of developing mental models. But, how does one develop them for computer science concepts like greedy algorithms?

Mental model definition

We first refine our understanding of “mental models” with this quote from Robins et al. (2019) “Expert programmers are characterized by a large library of useful schemata/plans that chunk and organize significant amounts of information in a form that reduces cognitive load. Many of the difficulties experienced by novice programmers arise from their lack of such organizing knowledge structures.”

So! Mental models are like brain-shelves that allow you to think more efficiently. You would be able to load more concepts into working memory and manipulate them with less mental tax. The more you have, the more efficient your thinking is. Let’s take a look at the mental processes needed to develop them.

Processes that develop mental models

As for how to develop these brain-shelves, you need to actively go through thinking tasks of varying levels of guidance in varying contexts.

Mode: active

In all the phases that we will see in the later sections, the most important qualifier is that you must actively engage with the material. By active, we mean one where you reconstruct from memory, without referring to external material. This is one of the two techniques rated as “high utility” in Dunlosky et al. (2013)’s review of learning strategies. Some examples – Active: self-testing verbally while closing your eyes. Non-active: highlighting textbooks.

The “no external material” part makes sense (that means no looking at textbooks or AI output, mind you). The mental model exists in your head. To build this mental model, you need to exercise / shape / mold it enough such that you can reproduce the study material without external help. That’s how you ensure that the mental model, on its own, is robust enough.

In practice. When I was a student, I tried to reconstruct the lecture materials from scratch on an empty piece of paper, and only looked at the lecture slide when stuck. This is like “self-quizzing”, but more thorough in that I really do try to re-derive all the concepts, as opposed to just filling in small blanks. There’s the pro that I don’t have to create flashcards too! The flash card is the lecture slide itself.

More readings on active recall here if interested: 1 2

Phases

Okay, we emphasized that we must be active in how we approach our learning. Now we’ll go through roughly-ordered phases that help you develop your mental model:

  1. Build your initial model by going through and reconstructing the guided instruction / lecture slides
  2. Test. Stress-test your mental model by doing practice problems from homework and quizzes
  3. Retain. Review the material at a later date to make it stick.

Build: Go through guided instruction. You start by reading through known materials and self-explain these in multiple passes until you can go through all below from scratch. Here is a list of concepts that ideally exist in the guided instruction (i.e. your lecture notes). If you want the more authoritative source rather than my personal re-ordering, please see the references section below.

Test: Practice / apply. This is where homework comes in. You see if the mental model developed by going through the known materials is flexible enough to generalize to new materials.

Retain: Spaced repetition. This is the only other top-rated tip from Dunlosky et al. (2013). If you want something to stick, review it periodically. The scattered cadence of quizzes, homework, and exams kind of already does this for you. To quote: “To remember something for one week, learning episodes should be 12 to 24 hours apart; to remember something for five years, they should be spaced six to 12 months apart. Although it may not seem like it, you actually do retain information even during these long intervals, and you quickly relearn what you have forgotten.”

Putting things into practice

Student. As a student, after every lecture, do the following:

Instructor. As an instructor, my job is to create a learning environment that encourages students to go through all the mental processes mentioned previously, both inside and outside of the classroom.

What’s next?

In summary, to develop mental models, you need to be able to actively reconstruct the material from memory and test it against a variety of problems. To retain them, you would revisit the material at least a week after you learnt it.

That’s a lot of work though! In subsequent posts, let’s see how external agents like CS educators and AI can help or hinder students as they go through these requisite mental processes.

References

Dunlosky, J., Rawson, K. A., Marsh, E. J., Nathan, M. J., & Willingham, D. T. (2013). What works, what doesn’t. Scientific American Mind, 24(4), 46–53.

Robins, A. V., Margulieux, L. E., & Morrison, B. B. (2019). Cognitive sciences for computing education. In S. A. Fincher & A. V. Robins (Eds.), The Cambridge Handbook of Computing Education Research (pp. 231–275). Cambridge University Press. https://doi.org/10.1017/9781108654555.010

https://teachtogether.tech/en/

Comment via: medium, substack, linkedin