Technique – Identifying, Describing and Explaining Structured Code

Summary of Technique

Code Comprehension Identification And DescriptionPLAN C Project

Pupils are provided with a piece of code and are asked to identify particular concepts chosen by the teacher by either highlighting/underlining specific sets of keywords or by drawing a box around related lines of code. They can then describe parts of the program chosen by the teacher in terms of what the computer will do. Additional questions that link the program to the problem it’s trying to solve can be added underneath to encourage pupils to explain the function of parts of the program.

Structured code examples are focused on concepts and language features related to sequence, selection and repetition with simple variables and arrays and the use of predefined functions and procedures. The code does not include the use of user defined subprograms or concepts related to scope or internal data flow within a program.

Resources for Teachers

This includes a set of exercises designed for teachers to practice identifying, describing and explaining code. It uses the SQA reference language that teachers in Scotland are familiar with. You should download a copy of StructuredCodeTeacherEx.docx and the CS Language to Identify Structured Code Cheat Sheet and work through completing all, or a selection, of these example exercises.

You may find the difference between describing code and explaining code a challenge as the terms are sometimes used interchangeably. When we talk about describing code it should be in terms of what the computer will do when it sees an instruction and explaining is in terms of how a piece of code helps to solve the problem described.

Ways of Using the Technique in the Classroom

After learners have been introduced to a new concept this type of exercise allows them to quickly apply what they’ve been taught. It also demonstrates that they’ve understood how a particular concept works. In the classroom it’s ideal as a lesson starter or as a plenary at the end and can be combined with other comprehension orientated techniques such as Structured TRACS and relevant Peer Instruction questions. This type of exercise is also good for consolidating learning as a homework once learners understand how to complete them.

Identification on it’s own is the easiest process for learners to carry out followed by describing how code works and explaining how parts of it relate to solving the problem. This means identifying concepts can be carried out on it’s own if learners need more time to develop their understanding.

Benefits for Learners

  • If the exercise is carried out in pairs then they will often naturally use the Computing Science terms and discuss whether a piece of code relates to the concept or not.
  • Learners can build up a much larger bank of code examples and also have their own notes on how specific bits of the language work they that they can refer to.
  • The time needed to carry out this type of exercise means they can see more variations in how the concept is used. Developing their knowledge of how different concepts can be combined helps learners when they have to write code of their own.

Tips for Creating New Exercises

  • Early exercises should limit the number of concepts you want them to identify and describe in the code to between 4 and 7.
  • Identifying keywords or groups of keywords on a line can be carried out by highlighting in different colours. Alternatively different styles of underlining can be used. 1 colour of pen can create 4 different underlining variations and 2 colours allows up to 8 variations.
  • Boxing related lines of code can also use different styles of line,  although anything other than solid and dashed lines is difficult to do.
  • The way that different examples combine concepts can and should be varied otherwise the overall benefit for learning is likely to be low.

Links to the landscape and portrait Code Reading templates should go here

Pupil Materials

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *