An example of teaching this can be viewed at 1:09:56 in this video.
An example of teaching this can be viewed at 1:09:56 in this video.
Writing a computer program involves planning what you're going to do, "coding" the instructions, testing them, tracking down any bugs, and changing the program to that it works correctly. In these activities students explore a simple programming language by taking on separate roles to make these elements of programming explicit.
This isn't completely artificial; most substantial program is written by a team of people, and often the roles of design, coding and testing are separated out. The program is made because there is a problem to solve to help other people to improve their lives. The people who write the program using a programming language are called the programmer (or possibly a developer or software engineer) - they write the instructions to tell the computer what to do. To be sure that the code is working exactly as it needs to for the people it’s been written for, someone needs to test the program and feeds back to the programmer(s) what needs fixing and why. They are testers. In a small project usually the testing is done by the person who wrote the program, but for larger applications testing is often separated out, partly to spread the workload, but also because sometimes the programmer might be so familiar with the program that they can't see it from a users' point of view.
The Kidbots activities separates the programming from the testing to avoid the programmer adjusting their program on the fly, and also support students to understand that programming is about working together, thinking through what you want to have happen and collaborating to solve problems.
Programming or "coding" is when a person (a programmer) types in instructions in a programming language so that the computer knows what it needs to do (programmers do lots of other things as well). Common programming languages that are used in the junior classroom include Scratch, ScratchJr, Python, Snap!, Blockly, and some older languages like Basic and Logo (which are still popular today).
Being a programmer isn't so much about knowing the particular commands in a programming language, but knowing how to put together the building blocks such as loops, if statements, variables, input and output in a way that the computer will do what is intended. This involves working out the general process for achieving the goal, representing that process in the particular language, and making sure that it does what is intended.
There are strong connections between mathematics and programming. Good programmers need to have a good base of mathematical knowledge, since a program is effectively a mathematical formula, and getting the structure of a program right requires good reasoning.
Giving sequential instructions are an important element of all programming languages, and so the Kidbots activity lays the foundation for understanding more conventional languages. It also exercises the ability to predict what a program will do, reason about where any bugs are, and understand that there can be multiple correct ways to program a solution.
Being able to give exact sequential instructions, work well together and understand how to break a big problem into small pieces and then tackling the small piece one at a time are all life skills that can be transferred from computer programming to other tasks that students need to do.
What was most surprising about the learning that happened from the teaching of this unit?
Who were the students who were very systematic in their activities?
Who were the students who were very detailed in their activities?
What would I change in my delivery of this unit?
Throughout the lessons there are links to computational thinking. Below we've noted some general links that apply to this content.
Teaching computational thinking through CSUnplugged activities supports students to learn how to describe a problem, identify what are the important details they need to solve this problem, break it down into small logical steps so that they can then create a process which solves the problem, and then evaluate this process. These skills are transferable to any other curriculum area, but are particularly relevant to developing digital systems and solving problems using the capabilities of computers.
These Computational Thinking concepts are all connected to each other and support each other, but it’s important to note that not all aspects of Computational Thinking happen in every unit or lesson. We’ve highlighted the important connections for you to observe your students in action. For more background information on what our definition of Computational Thinking is see our notes about computational thinking.
Throughout this unit students will be creating algorithms to ‘program’ the bot to move across grids. The algorithmic thinking focuses on students learning to sequence a set of instructions to complete a task, to use specific types of instructions in their algorithms, and to find equivalent ways to achieve the same outcome.
The ‘programming’ students will be doing in these activities is an abstract version of the type of programming we do on computers using conventional programming languages. In this unit students will use a small set of very basic instructions as their programming language, write their programs in simple words, and give their instructions verbally to the bot. This allows students to learn about sequencing in programming and practice creating algorithms without needing to learn a programming language first or use technical terminology and tools.
The choice of commands for the programming language also demonstrate the use of abstraction (such as using "L" or an arrow to represent the command "Left").
In lesson 3 students will also be using another level of abstraction, as some instructions will be encapsulated inside a loop.
In every activity in this unit students will be practicing decomposition, as they break down the movements they want the bot to make into basic and specific instructions. They will also be encouraged to write their programs incrementally, to write the first few steps, test them, and then add the next steps to the program, instead of trying to solve the whole problem at once.
As students write their algorithms and programs in this unit there are many different patterns that emerge in how the instructions are sequenced. Groups of instructions might tell the Bot to move a specific way, such as walk in a square, and if students identify these patterns they can reuse these groups of instructions if they need to have the Bot make the same movements again.
Each time students write their programs and test them they will be evaluating them, because the most important thing they need to determine is “did the program work?”. Each time they test their programs they can identify whether it accomplished the task or not.
There will almost always be multiple programs students could use to accomplish each task, but some will be more efficient than others as they will use fewer steps. Students can compare these and explain why they think certain programs are better than others.
There is also the opportunity to compare programming languages. We explore reducing the number of instructions available; in some cases the same goals can be achieved (the language has the same computing ability), but the programs might be longer.
Students will be continuously exercising their logical thinking skills throughout this unit. As they are planning their algorithms they will need to step through what they think will happen with each instruction, e.g. “at this point they’ll be facing that way so if I then say move forward twice then they’ll end up on that square”. They will also need a logical approach to debugging their programs when they do not work correctly. They will need to step through each instruction and identify when something goes wrong and how they can fix the bug so the program then behaves as expected.