Get started with coding

Completed

What is block coding?

Screenshot of MakeCode word coding blocks.

Block coding is an entry-level, visual programming language, which allows learners to use drag-and-drop editing to move blocks to create code. This simpler approach in education introduces learners to programming and affords learners a foundation to build computational thinking skills and learn coding concepts. Learners engage in a fun and easy learning process with block coding versus starting with text-based programming languages. Individuals who have never coding before can better understand the basic concepts of programming and creation of algorithms.

Block coding provides the ability to visually discern blocks by their structure. Understanding the structure of blocks allows students to begin to explore and understand how certain types of blocks work together to create code. This allows students to focus on the sequence and logic of assembling programs to complete tasks versus worrying about syntax errors (such as missing a colon, forgetting parenthesis, having an extra space). For example, if a student tries to snap two blocks together that are unable to form valid code, the block coding environment prevents the student from snapping the blocks together.

Screenshot of the MakeCode coding interface with drag and drop blocks.

Blocks are also color-coded by conceptual use. The blocks are sorted into categories so students can easily find all of the blocks related to the specific category.

Screenshot of MakeCode blocks in toolbox drawer.

Block coding takes away from young and early coders the frustration that happens due to syntax, such as missing a comma or forgetting to close a parenthesis, and leaves time to focus on understanding coding concepts. Block coding is positioned as a tool to create art, animations, stories, and games. Students are invited to create and solve problems, which provides a much more welcoming and less intimidating environment to begin their coding journey.

Reflection task

Let’s compare programming languages. How would you describe the code shown in each of the languages? What is the computer being “asked” to do?

Chart comparing three different samples of code in blocks, in JavaScript, and in Python.

For an accessible version of the code sample, see this Word document.

Reflect on your experience.

  • Which language was easiest for you to understand?
  • Which language was most difficult for you to understand?
  • How are the languages like one another? How are they different?
  • What questions do you still have about programming languages?

In a recent study, students who never coded before were placed into two different groups: block coding and text-based coding. They participated in five weeks of coding instruction. Students participating in block coding made greater learning gains than the students participating in text-based coding. Students who start with block coding are able to do better and faster in their CS coursework.

Also, before and after the five-week course, students were asked about their intention to take more computer science courses. The students who participated in text-based coding were less interested in pursuing computer science courses after this initial experience. Moreover, the study also determined that block coding is effective in increasing students’ confidence in their own programming ability.

Photograph of a smiling student at a computer.

All of these considerations are important for schools and educators. Students should have a positive and scaffolded experience with coding and computer science, as student perceptions and confidence are highly indicative of their learning growth. Low self-esteem or lack of confidence leaves students doubting their ability to succeed, making them hesitant to engage in learning or take appropriate academic growth risks. Just like when teaching young children to read, we need to consider the text and task students are asked to complete. The same pedagogical approach should be applied to coding. Learning needs to be scaffolded and supported over time.

This concept holds true as students transition from blocks to text-based programming. By utilizing the spiral method, educators can better support student learning over time. The spiral method focuses on gradual content introduction with increasing complexity in addition to providing multiple opportunities to interaction with the content and tools. The repeated use of tools over time allows greater exploration by students and promotes deeper understanding of basic programming concepts. Spiral learning also helps mitigate cognitive overload, contributing to the ease of learning.