Skip to content

The block model

See also: teaching-digital-technologies

Resources:

A method to break down the structure of a program to make it easier to understand by students as they read the program. Apparently designed to be directly related with the epistemology of programming and the development of schema.

Useful for understanding how students engage with programs. Novices read bottom up, experts bottom-down.

Based on a duality between

  • structure - text surface and program execution; and,
  • function
Dimensions Text surface Program execution (data & control flow) Function
Macro Structure Understanding the overall structure of the program Understanding the 'algorithm' of the program Understanding the goal/purpose of the program
Relations References between blocks, eg. method calls, object creation, accessing data... sequence of method calls - 'object sequence diagrams' Understanding how subgoals relate to goals, how function is achieved by subfunctions
Blocks 'Regions of Interests' (ROI) that syntactically or semantically build a unit Operation of a block of code, a method, or a ROI (as a sequence of statements) Purpose of a block of code, possibly seen as a subgoal
Atoms Language elements Operation of a statement Purpose of a statement
Dimensions Text surface Program execution (data & control flow) Function
Macro structure
  • annotate code or draw a diagram to show the overall structure
  • restructure an "untidy" program
  • Identify inputs needed to test all program branches
  • Will line X ever be executed
  • Choose a name for a given program
  • Select/write a sentence that describes a program's purpose
Relationships
  • Identify variable scope
  • Highlight function calls
  • Draw the flow of control
  • Find redundant conditional branches
  • Choose a name for a variable/function
  • Are two programs/segments functionally equivalent
Blocks
  • Identify block types, such as finite lops 'else' conditions, function definitions, etc.
  • Reordering lines of code
  • Parson's problems
  • Explain the purpose of a block of code
Atoms
  • Identify statement types, such as assignments and conditions
Trace values through a program Explain the purpose of a single line