Build up your knowledge of MartyBlocks blocks and learn to debug code

17 of 17 linked standards shown.
| Curriculum area | Linked standards |
|---|---|
| Digital Technologies, Design & technologies: Digital Technologies |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| General standards |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing | |
| Literacy & English: Listening and Talking | |
| Literacy & English: Reading | |
| Literacy & English: Writing | |
| Technologies: Computing Science |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| Computing, Design and Technology: Computing |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| International Society for Technology in Education (ISTE) |
Select a code to read the full standard.
Learners now have some experience with the MartyBlocks environment. This lesson will give them the opportunity to explore another person's code with the aim to find where something is a bit off. Learners will need to be a bit like editors who need to make sure that everything makes sense and that what is written works as intended.
Practice with different code from MartyBlocks: repeat, if/then statements
reading and writing, editing
Introduce a game learners may have played before, but they need to listen to the instructions carefully because they may have changed. Stress that it is important that they follow the rules of the game. You could choose to display the rules on the board but it is recommended that you read them aloud to focus learners' listening skills. If learners start telling you that they know this game, gently remind them that it is important that they listen to the rules, this time.
This will likely not even get past the second or third step, but it might: learners will likely protest. Pretend to look flustered and appear to consult some notes, then have some sort of 'ah-hah' exclamation and say you missed part of the instructions. Read the following list of steps:
Likely the learners will not agree to this either; in fact, it is hoped they will disagree before you get to the end. Display the list of rules; it is in the resources section in word format, feel free to paste the text into a different program if you are more comfortable editing that on the board.
As learners discuss potential changes to the instructions, inform them, "This process is what people, who work with computers and code, call debugging. The instructions, or code, are written but there is something that isn't quite correct so the program does not perform as expected. The people who debug need to understand what the code is meant to do, like you needed to understand how the game was supposed to work. The 'debuggers' then need to test each of the parts of the code to find the problem, much like you checked each of the steps of the game to see what needed to change so you could play properly.
Keep the updated rules somewhere to access later, perhaps you could play at the end of the cool down section.
Share the presentation and read the objectives, success criteria and story text.
Share some fairly basic examples from MartyBlocks where the code is complete and Marty carries out some actions but they do not go as initially intended. Share with learners what the person who wrote the code had wanted Marty to do. Have learners explore the blocks and work with their groups to see if they think it will work and record their ideas in the workbook. Have learners create the code in MartyBlocks to see if their thoughts were accurate. As a class, find the bugs and fix the code. Have learners build the updated code in MartyBlocks and have them run the code to check.
For each subsequent block in the workbook, learners need to follow the same process:
Some of the blocks have only one bug, others have more than one, and one has no bugs.
Bring learners back together to discuss the bugs they discovered. Check to see how many bugs learners found in the examples that had more than one mistake. Have learners share challenges they faced and any successes they experienced.
Suggested questions you might ask:
Carry out any end of lesson routines.
Log off devices and clear everything away.