
Mastering computer programming requires more than just memorising syntax; it demands a structured mental model for reading, interpreting, and creating software. One of the most effective pedagogical strategies developed to bridge this gap is the PRIMM framework. Standing for Predict, Run, Investigate, Modify, and Make, PRIMM provides a systematic path that guides individuals from passive code reading to independent software creation.
Rooted in the established “Use-Modify-Create” model, PRIMM was introduced by researcher Sue Sentance in 2017. By unifying diverse, evidence-based instructional practices into a single workflow, the framework offers a cohesive methodology for software education. Subsequent empirical research published in 2019 evaluated the framework across hundreds of participants, demonstrating that individuals who utilised the PRIMM approach achieved significantly stronger comprehension and performance outcomes compared to traditional learning groups. Furthermore, facilitators noted that the framework naturally accommodates diverse skill levels, allowing for seamless differentiation in instructional environments.
The Five Core Stages of PRIMM
1. Predict
In the opening phase, individuals are presented with a complete, functional segment of source code. Before executing the program, they must carefully analyse the syntax and deduce its operational outcome. This step emphasises verbalisation and collaborative discussion, encouraging participants to articulate their reasoning in pairs or small groups before documenting their hypotheses. This dialogue helps build a robust technical vocabulary. The underlying objective is entirely focused on code comprehension, determining exactly how the system will behave once initiated. To maximise effectiveness, the provided code should rely primarily on familiar programming constructs, introducing only one or two novel concepts at a time.
2. Run
Once predictions are established, individuals execute the program to test their theories against real-world outcomes. This stage is highly interactive and benefits significantly from structured guidance. A mentor or instructional resource can help steer conversations, prompting individuals to verbalise the software’s actual functionality and analyse any discrepancies between their initial predictions and the real runtime behaviour.
3. Investigate
The investigation phase shifts the focus towards deep, analytical code comprehension. This stage frequently leverages the structural insights of the Block Model (developed by researcher Schulte), which categorises software understanding into four distinct hierarchical layers:
- Atomic Level: Analysing individual lines of code or discrete micro-expressions within a single line.
- Block Level: Examining groups of adjacent lines that operate collectively to perform a localised function.
- Relational Level: Understanding the interplay between distinct, non-adjacent code blocks or components across the program.
- Macro Level: Grasping the overarching purpose and architecture of the entire program or major subprograms.
To systematically target these four levels of understanding, instructors design targeted exercises using four key techniques:
- Tracing: Monitoring the step-by-step state changes of variables as the program executes. Tracing cultivates foundational logical reasoning, helping individuals confidently navigate sequential logic, conditional statements, and iterative loops.
- Explaining: Articulating the inner workings of the code. Discussing the software’s mechanics with a peer reinforces vocabulary and builds a multi-layered understanding, starting at the atomic level and working upwards.
- Annotating: Adding detailed commentary directly to the source code, explicitly documenting the purpose of each line or functional block.
- Debugging: Isolating and correcting errors. Instructors may intentionally introduce subtle logic bugs or redundant code, challenging individuals to diagnose flaws and ensure optimal program performance.
By mapping exercises directly to the Block Model, mentors can precisely pinpoint conceptual gaps. When a student of programming struggles, it is typically because a specific level of the Block Model has not been fully internalised, allowing for highly targeted support.
4. Modify
With a comprehensive understanding of the original code, individuals transition to altering it. This stage involves executing a series of programmatic modifications that scale up in complexity and challenge. As individuals demonstrate comfort with the new concepts, instructional scaffolding is systematically removed, encouraging greater autonomy.
5. Make
The final phase challenges individuals to apply their newly acquired insights to an entirely new problem. While the problem scenario changes, the underlying logical structures and technical concepts remain familiar. This phase places a heavy emphasis on algorithmic design and computational thinking, requiring individuals to break complex problems into manageable sub-goals before writing the final solution.