What is Block-Based Coding?

Block-based coding is an entry level activity which allows learners to develop computational thinking. By dragging and dropping “blocks,” beginners are introduced to programming through a simpler approach: visually instead of text. Programmers can use coding instruction “blocks” to make Marty move, dance, kick and even talk.

 

Block Coding: A History

 

The benefits of learning programming are countless, from improving skills essential for an increasingly digital world to creative thinking. However, when it comes to learning the basic skills required to programme, traditional text-based languages can be difficult to learn.

In order to combat the difficulties faced by learners, MIT introduced the first block coding language, Scratch. Scratch was introduced in 2003 and, to this day, is still one of the most popular software packages. By eliminating programming text, beginners are able to minimise mistakes and focus on foundational principles, such as ordering; creating a fun and easier learning process.

 

How Scratch Works?

Scratch uses pre-prepared sections of code, which are grouped together in “blocks”. In order to create a sequence of code, a programmer will select the block they want, drag it to the input field, and drop it.

The process follows a cycle where a programmer will select another block of code, repeating the process until a full sequence is formed, thus accomplishing their objective.

There are many different blocks a programmer can use to control Marty. These include:

Motion Blocks: Used to control movement. A programmer will use these to make Marty move, turn or walk. These blocks can be adjusted by a number ensuring Marty completes the motion the number of times required.

For example: turn 9 steps to the left and walk 5 steps forward.

 

Looks blocks: Used to change Marty’s appearance, through his LED lights.

For example: set eye LEDs to green.

Sound blocks: Used to add sounds to Marty. These allow Marty to speak and the programmer can edit the sound effects such as pitch and volume.

For example: a sound block can be used to make Marty sound confused.

 

Sensor Blocks: Used to connect to Marty’s sensor add-ons.

For example: using Marty’s distance sensors will detect an object in his path. Therefore, avoiding collisions, allowing Marty to move around objects.

There are even more types of blocks you can use to create a full programme. You can check them out by downloading the Marty the Robot app and can create a code sequence even without a Marty.

What next?

 

The best aspect of block coding is that it creates a learning curve for learners. So, once learners have mastered the core principles of coding blocks, they can be as creative as possible when controlling Marty! Why not have a go at building a maze for Marty or even playing a football match. When learners are ready to move on from Scratch, they can try out more advanced text-based languages, such as Python, building on their acquired skills.

USD
USD-currency-flag
GBP
GBP-currency-flag
USD
USD-currency-flag
GBP
GBP-currency-flag