Moving From Blocks to Text Coding
About
In this session, you will learn about:
- The differences between Blocks, Hybrid and Text Coding Environments
- Why you might choose one of these types of Coding Environments for teaching Coding to your students
- How Hybrid Coding Environments can be used to help students (particularly those that are in Years 7-8) move from Blocks to Text Coding,
- Examples of different Blocks, Hybrid and Text Coding Environments that are freely available and that can be used for a variety of purposes (for example, music composition or creating art)
After a presentation that explains the differences between Blocks languages to Text languages, there will be an activity where you use Pencil Code to draw different patterns and shapes with Code.
Pencil Code is an example of a Hybrid Coding Environment, which allows you to switch between Blocks and Text modes.
Consequently, Pencil Code could be a useful tool to use for helping students move from Blocks to Text Coding, or for differentiating instruction in your lessons.
In this session’s activities you will apply two of the Computational Concepts that you learned about yesterday (Sequences and Loops), as well as some Mathematics concepts, to command a Turtle Sprite in Pencil Code to draw Art.
You will also learn about another Computational Concept called Operators.
Operators can be used for a variety of purposes, such as the random block that you will use in the activity to move the Turtle Sprite to random positions on the Canvas.
Key Terms
algorithm, computational thinking, computational concept, computational practice, computational perspective, coding, visual programming, general-purpose programming, hybrid coding environments, sequences, loops, operators, debugging, testing, random
Materials
Presentations
Activities
Links
In this section, we have included links to resources for learning and teaching with Pencil Code, as well as links to websites for the different types of Coding languages that are commonly used in K-12 education.
PencilCode
Blocks Languages
Hybrid Coding Environments
Introductory Text Languages
Session Outcomes
Computational Concepts
Computational Concept |
How the Concept is Addressed in the Session |
Sequences |
When drawing Art with Pencil Code in this session, you will create Sequences of instructions for the Turtle to follow. For example, in the Drawing a Sky Full of Stars activity you will create Sequences of fd and dot commands that will cause the Turtle to draw in different spots on the Canvas. |
Loops |
When drawing Art with Pencil Code in this session, you will use Loops to make the Turtle repeat certain steps. For example, in the Drawing a Sky Full of Stars activity you will use the for block, along with the fd and dot commands, when drawing patterns on the Canvas. |
Operators |
When drawing Art with Pencil Code in this session, you will learn about different Operators blocks. For example, in the Drawing a Sky Full of Stars activity, you will use the random block, with the moveto and dot blocks, to draw randomly sized dots in random positions on the Canvas, in order to create a starry night scene. |
Computational Practices
Computational Practice |
How this Practice is Addressed in the Session |
Being incremental and iterative |
You will be incremental and iterative when creating blocks of commands for drawing Art in Pencil Code. For example, in the Creating Dot Paintings activity you will build up a stack of blocks iteratively (one part at a time). |
Testing and debugging |
You will test and debug (fix problems in your Code) during the session’s activities. For example, when creating your code for the Creating Dot Paintings activity you may find that the code does not work as you expected. The process of checking that the code works as expected is called Testing and the process of identifying and fixing code that does not work is called Debugging. |
Computational Perspectives
Computational Practice |
How this Practice is Addressed in the Session |
Expressing |
In this session, you will have the opportunity to use Coding as a tool for creative expression. In the Drawing a Sky Full of Stars and Creating Dot Paintings activities you will create Art by drawing patterns with the Turtle in Pencil Code. |
New Science and Technology (K-6) Syllabus Outcomes
Stage 1
Stage 1 Outcome |
How the Outcome is Addressed |
ST1-3DP-T: describes, follows and represents algorithms to solve problems |
In this session’s activities, you will describe, follow and represent algorithms (sequences of step-by-step instructions and decisions) when writing instructions to draw Art with PencilCode. |
Stage 2
Stage 2 Outcome |
How the Outcome is Addressed |
ST2-3DP-T: defines problems, describes and follows algorithms to develop solutions |
In this session’s activities, you will define problems, describe and follow algorithms (sequences of step-by-step instructions and decisions) when writing instructions to draw Art with Pencil Code. |
Stage 3
Stage 3 Outcome |
How the Outcome is Addressed |
ST3-3DP-T: defines problems, and designs, modifies and follows algorithms to develop solutions |
In this session’s activities, you will define problems, as well as design, modify and follow algorithms (sequences of step-by-step instructions and decisions) when writing instructions to draw Art with Pencil Code. |
New Technology Mandatory (7-8) Syllabus Outcomes
Technology Mandatory (7-8) Outcome |
How the Outcome is Addressed |
TE4-4DP: designs algorithms for digital solutions and implements them in a general-purpose programming language |
In this session’s activities you will learn about Hybrid Coding Environments, which allow you to switch between Blocks (Visual Programming) and Text (General-Purpose Programming) modes. When you write the algorithms in the Blocks view of Pencil Code (a Hybrid Coding Environment), you will be able to switch to the Text view to see the algorithm implemented in a General-Purpose Programming Language. You could also use the Text view in Pencil Code to edit the Code during that activity, once you are familiar with the different commands that can be seen in the Blocks view. |
AITSL Professional Teacher Standards
Standard |
How this Standard is Addressed |
2.6.2: Use effective teaching strategies to integrate ICT into learning and teaching programs to make selected content relevant and meaningful |
In this session you will learn about using Pencil Code when integrating ICT (specifically Coding) into learning and teaching. For example, in the session’s presentation you will learn about different educational Coding environments that are available and how these could cater to students’ different interests. One example of these Coding environments is Sonic Pi, which is a Coding environment that allows you to compose music through code. Another example of these Coding environments is Processing, which is a tool for learning how to code within the context of the Visual Arts. |
3.3.2: Select and use relevant teaching strategies to develop knowledge, skills, problem solving and critical and creative thinking. |
In this session you will learn about ways to help develop students’ critical and creative thinking when Coding. For example, in the Creating Dot Paintings activity, you will be encouraged to be creative when you draw different patterns by writing commands for the Turtle in Pencil Code to follow. |
3.4.2: Select and/or create and use a range of resources, including ICT, to engage students in their learning. |
In this session you will have the opportunity to use a range of resources that have been developed to assist the teaching of Coding to students at the various Stages of K-12. The focus of the resources that will be presented are those that can assist students moving from Blocks (Visual Programming) to Text (General-Purpose Programming) languages. |
6.2.2: Participate in learning to update knowledge and practice, targeted to professional needs and school and/or system priorities. |
In this session you will be given some examples of how Coding and Computational Thinking can be incorporated into different areas of the curriculum and STEM. |
6.4.2: Undertake professional learning programs designed to address identified student learning needs. |
In this session you will learn about Hybrid Coding Environments, which could help you differentiate activities when teaching lessons that involve Coding. For example, if you were using Pencil Code for an activity, you could suggest students that are confident Coders to complete the activities using the Text mode only and suggest that the rest of the class to use the Blocks mode (or switch between Text and Blocks modes appropriately). |
Numeracy
Numeracy Element |
How this Element is Addressed |
Estimating and calculating with whole numbers |
You will calculate with whole numbers when you complete the session’s activities in Pencil Code. For example, you will calculate with whole numbers when commanding the Turtle to move around the Stage with the fd and rt blocks in the Creating Dot Paintings activity. |
Recognising and using patterns and relationships |
You will recognise and use a variety of patterns during the session’s activities, when commanding the Turtle to draw Art in Pencil Code. For example, you will have to recognise and use the relationship between the number of turns that the Turtle makes, the dots that it draws on the Canvas and the degrees that the Turtle turns, in order to draw a circular pattern of dots. |
Using spatial reasoning |
You will have the opportunity to use spatial reasoning when drawing Art with Pencil Code in the session’s activities. For example, you will use some of the blocks in the Move section of blocks in PencilCode, which can be used to change the position of the Turtle on the Stage (a Cartesian plane). |
Critical and Creative Thinking
Critical and Creative Thinking Element |
How this Element is Addressed |
Generating ideas, possibilities and actions |
You will generate a variety of ideas, possibilities and actions when completing the session’s activities. For example, there are multiple ways to draw the patterns and images in the Drawing a Sky Full of Stars and Creating Dot Paintings activities. Each of these different ways will cause the Turtle in Pencil Code to draw very different results. |
Reflecting on thinking and processes |
In the session’s activities you will have the opportunity to reflect on the approaches that you used to create the different projects. You will also have the opportunity to view the projects that other workshop participants and Pencil Code community members have made and reflect on how the processes used to create those projects differed from yours. |
Information and Communication Technology (ICT) Element |
How this Element is Addressed |
Creating with ICT |
In this session you will apply your knowledge of ICT, specifically your knowledge of Computational Concepts and Coding, to create Art with Pencil Code. |