Teaching Decomposition

Ideas to develop Decomposition Skills

Decomposition is an incredibly difficult skill to teach. Below are a few examples, which may (or may not) help you in your quest to develop your students’ decomposition skills.
***Please note, these are ideas that have been collated from a variety of online discussion, from various teachers***

Flaggy Flags

Provide the students with a load of flags and ask them to decompose them into separate shapes. Get them to write down these shapes as subheadings. Then under each subheading, get them to write down the steps needed to draw each shape. Then get them to write down the sub-routine calls in order to produce the shape. Take this further and get them to code this in python.

Ask yourself “and then…”

Get the students working in pairs with each pair competing against each other in class. One student is given a problem to decompose and the other is the “and then” coach. The decomposer has to begin breaking the problem down. When the decomposer is stuck, the coach has to encourage the process further by picking a partly decomposed problem and saying ‘and then?’ to the decomposer. The pair that has decomposed the problem the most in the allotted time wins – important that you share the decomposition with all to see.

The Boss (A Visualisation Technique)

Get your students to visualise a problem coming bundled with a hundred workers and get them to think of themselves as the boss. Their aim as boss is to do as little work as possible by deciding what jobs to give their workforce. First, decide what jobs need to be done to get the problem solved. Then decide the order the jobs need to be carried out in. Also, decide if any workers / teams of worker need to interact.

The Exemplar

Provide an example of a problem, already decomposed. Give them copies of the decomposition process ‘visualised’ (perhaps in the form of a top-down design) and let them use it as a reference when they try to decompose their own problems.

The Storyboard

Get students to describe their morning routine (e.g.: Get out of bed, have a shower, get dressed, clean teeth, have breakfast, etc.). Then ask students to write these different activities as subheadings. Under each, they are to write further details about how each of these activities are performed. This could be taken further where students are asked to write a program with subroutines for each part of their routine. In each subroutine students could write print statements, outlining the details of each activity. Finally, students can call the subroutines in the main program, in the correct order.

Reverse Engineering

Code a well-known game with all elements coded modularly, in subroutines. Remove all the sub-routine calls form the main program and ask the students to try to put them back in, in the correct order.

Carry on with the FLOW

For big problems, give the students a top down design of a problem with broadly decomposed parts. Then ask the students to continue to break down each element further. Then, ask students to write sub-routines for each decomposed part, simply writing comments in each one, to describe it. Finally get students to then implement each subroutine, turning text into code.

Practice Practice Practice! – An Algorithm A Day

Simply give students lots of experience trying decomposing and writing algorithms and letting them learn from their mistakes when exemplar solutions are shared.

Scroll to Top