Graph Paper Programming Turns Paper Into a Coding Station
The first move in the sample for CodeAI's opening graph paper programming puzzle leaves the grid blank. In that sample, the class starts in the upper-left square and directs the teacher to move right. A separate command tells the teacher to fill the square the pointer has reached. Once the class agrees on how to write each command, students can send a drawing across the table as instructions. Another group can run those instructions on a blank grid with a pencil instead of a computer.

A move changes the position; a fill changes the page
The current square is the one the next command acts on. A move shifts the current position by a square in the indicated direction and leaves the shading alone. A fill shades the current square and leaves the position where it was. A student running the program can track position with a fingertip and use a pencil to shade, lifting the pencil when the finger moves. Keeping the two actions separate lets the finger travel through squares that need to stay white.
| Command | Effect on position | Effect on shading |
|---|---|---|
| Right or left | Moves to the neighboring square in that direction | Existing shading stays as it is |
| Up or down | Moves to the neighboring square in that direction | Existing shading stays as it is |
| Fill | Holds the current square | Colors the current square |
A pixel drawing, a picture built from individual squares, shows where the color ends up. The program also records a route through the squares, including moves across parts of the grid that stay blank. If a fill comes before a move, it affects the square the pointer is about to leave. If it comes after the move, it affects the square the pointer has just reached. The two commands take up the same amount of space on the page in either order; the order determines which square gets colored.
How spoken directions become a written program
The teacher begins with the target picture, a blank grid and the movement and fill commands in view at the same time. The class calls out a direction and the teacher repeats the command being carried out, giving everyone a way to track the position even on steps that leave the screen unchanged. That spoken demonstration comes first in CodeAI's graph paper programming teaching guide; students will write the symbols for the same commands once they have seen what the words do.
The teaching guide's sample starts with a move to the right and a fill. Then it moves right again, moves down and fills there. The filled squares end up in different rows and columns. The square reached with the second move to the right stays empty because the next instruction sends the pointer down before the pencil colors anything. That gap in the picture is the result of a command being carried out, just like the colored square below it.
- Start
The pointer rests on the upper-left square of the blank grid. - Right
The pointer moves to the next square along the top row. - Fill
Color appears in that square. - Right
The pointer continues along the top row to an empty square. - Down
The pointer moves directly below that empty square. - Fill
Color appears in the square below.
The spoken list is an algorithm, an ordered set of steps for finishing a task. To write it as a program the class substitutes a symbol from the shared key for each phrase and keeps the order. The lesson gives a short translation: right, right, fill becomes a pair of right arrows followed by the fill symbol. The arrows record separate moves; their repetition is how the receiving group knows how far to go. The fill symbol then does the coloring at the end of those moves. This is the same rule the teacher followed out loud, put in a form that can leave the demonstration table.
The guide introduces the symbols after the class starts spelling out the route for a more complicated picture. Longhand directions repeat the same words whenever the pointer has to cross a row or backtrack past a colored square. On the written program, each move still gets its own place, but a repeated direction takes up a short run of arrows. The class can point to the line on the page and agree on where a run of moves ends and a fill begins. The teacher can then put away the longhand directions and use just the key and the symbol sequence for the next demonstration.
When the class shifts to the station, the written key takes over the part of the demonstration that defined each command. A teacher planning where to put the materials for classroom learning stations has a specific decision here: the blank grid and the key need to be available to the group that will run the program as well as to the group that writes it. The target picture follows a different route.
What crosses the table, and what stays behind?
The guide calls for each pair or small group to choose a picture from the worksheet, work out the steps, write them as symbols and trade the program with another group. The writers can see the target while drafting the instructions. The group receiving the program gets the written sequence to run and uses the shared key and an empty grid. The target stays out of view while the receiving group draws, so the result shows what the instructions produce without a picture to copy.
For a paper station, the worksheet and the strip used to write the program serve different ends. The worksheet stays at the first group's place so the writers can look back at the pattern. The strip can travel by itself because the command key is already available to the other group. Keeping fresh grids with that key gives the receivers a clean sheet for every program they take. A sheet with a shaded square left over from a previous run would make it harder to tell which marks the new program actually produced.
| Piece of paper | At the writing side | At the receiving side during the run |
|---|---|---|
| Target picture | Open as a reference | Out of view |
| Command key | Used to write the symbols | Used to read the symbols |
| Program | Written in the order the steps run | Followed in the order written |
| Blank grid | Available for tracing a route | Filled only where the commands specify |
In a number talk at the teacher's table, the reasoning is spoken so that the group can follow it. In the graph paper exchange, the instructions have to make sense after the writers slide the paper away. Before the trade, the writers can trace the symbols from the start square on a spare grid to see whether the route stays inside it. The receiving group then has only the sequence on the page, the command key and the starting position to work from.

After the run, the target and the result can be laid side by side with their starting corners aligned. If a mark is out of place, the students can replay the instructions to find the first point where the pointer goes astray. The University of Canterbury's Computer Science Education Research Group, which develops coding lessons without computers through its CS Unplugged project, makes the order explicit in another grid exercise: "A key point in this activity is that the instructions are all written before they are tested." Because the paper program is already written, the students can return to the exact command that led to the stray mark.

The guide's demonstration accepts a working route even when it contains unnecessary steps. At the station, a group can check where the drawing went wrong before trying to shorten the route. The original picture stays at the writing side again during a retry. On a fresh grid at the other end of the table, the group can see whether the pencil now lands on the square that was left blank.
Frequently Asked Questions
Can graph paper programming start with a four-by-four grid?
CodeAI's teaching guide uses a four-by-four grid and allows the same area to be marked off on a larger sheet of graph paper. The border on a larger sheet gives the receiving group a visible boundary for the portion it is using.
Can two groups write different programs for the same picture?
The CodeAI guide suggests discussing alternate ways of filling the same grid. Different routes can reach the same set of squares, so the useful comparison is between the drawings that result, even when one route takes a detour.
Can students make their own pictures once the command key is familiar?
The guide's extension asks the class to make up images and then write programs for them. The student who draws the original then has to find a route to its colored squares using the same shared commands as everyone else.
Can graph paper programs run across more than one written line?
The teaching guide describes a continuous left-to-right layout and notes that some students start a new written line for each row of the grid. The group receiving a wrapped program needs a clear reading order, and movement between grid rows still comes from the move commands.
Can the same classroom activity use a larger grid?
In CodeAI's class challenge, the teacher draws a picture on a five-by-five grid for the class to encode together. For an exchange, that change belongs on both sides of the table: the receiving grid needs to match the dimensions of the target.
Sources
- CodeAI: Lesson 4: Graph Paper Programming
- University of Canterbury Computer Science Education Research Group: Sending a Rocket to Mars