chapter two

2 Mental models

 

This chapter covers

  • Understanding the concept of mental models in software engineering
  • Recognizing the value of different mental models covering the same aspects
  • Recognizing the value of different mental models covering different aspects
  • Reasoning about a system in terms of different mental models

The title "Thinking in Distributed Systems" emphasizes the significance of mental models for this book. Mental models are the very foundation of reasoning. Given this fundamental role, before we dive into the mental models of distributed systems, let’s explore mental models themselves: What are mental models, and what makes a good mental model?

2.1 Mental models of systems

A mental model is the internal representation of the target system and is the basis of comprehension (the ability to understand) and communication (the ability to convey understanding).

For example, Figure 2.1 illustrates a simple electric circuit, the system (right), and the corresponding internal representation, the mental model (left). The mental model is the basis for our reasoning about the system.

Figure 2.1 Mental Model and System.

A tangible way to think of mental models and systems is as a set of facts:

  • System. A system can be understood as a set of facts that constitutes the ground truth
  • Mental Model. A mental model can be understood as a set of facts that constitutes our perceived truth

A good mental model is a mental model that is correct and complete:

2.2 Mental model of software systems

2.3 Different models

2.3.1 Different models describing the same aspects

2.3.2 Different models describing different aspects

2.4 Thinking above the code

2.5 Summary