Block-Based vs. Text-Based Programming

Terry VanNoy
PD Specialist
News on July 01 2021

block-based-text-based-programming

When we think of STEM or STEAM courses at school, we usually include opportunities for students to learn coding and programming. This can be done with block-based code or text-based code, or both! What is the difference, and should students in a K-12 system learn both? What are the benefits and priorities of these types of programming languages?

Apps and websites for block-based programming

Block-based programming systems use colorful, draggable shapes in a canvas work area to simulate coded language. Students choose from color-coded categories to join together (snap) and create a sequenced program. As you experience block programming applications or websites, you’ll see that the categories are very similar. There will be movement blocks, control or events blocks, blocks for adding loops (iteration), variables, and functions. A student using Scratch will be able to jump into Snap, for example. Here are some examples of popular block-based coding apps and websites.

Scratch

This platform is the starting point for most STEM/STEAM and Computer Science programs. It is very intuitive, easy to learn, and students can program games, animations, dialogue scenes, etc. A great deal of other block-based programming is a copy or extension of Scratch.

Ozoblockly

Built for Ozobot robots, this program is both a website and mobile app. Students can use five levels of blocks, starting with pre-readers. Very user-friendly for younger grades, and students can flash the program they’ve built directly to the robot on the screen to make it run (or test the program on a virtual robot first).

 Blockly

Both versions of Blockly are similar. The Wonder Workshop link takes you to the mobile app for block code for the Dash, Dot, and Cue robots. Google Developers have made Blockly available for programmers to create blocks that tie into JavaScript code language.

Snap

Again, a very easy-to-learn system for students. These blocks come in familiar categories such as Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables. Very similar to Scratch.

Microsoft’s MakeCode

This block-based programming system created by Microsoft is a free web-based program. Built for the micro:bit, the blocks can be expanded by adding other block groups to the palette. If you have hardware added to your micro:bit, search for new blocks for your program. Very adaptable for expansion and creativity!

Apps and websites for text-based programming

As students get older, they will start to learn and use text-based coding languages. This is where the real computer science work gets done. In code language, programmers type into a code editor (Code Writer, Atom). The text will “call” packets of other code from libraries and modules, and rules of punctuation, spacing, and indentation are used to make things happen (this is known as “syntax”).

Each section of code in this text environment corresponds to the blocks students learned when they were younger. Most languages, such as the ones listed below, are color-coded to help us understand how the commands are used and implemented. 

Examples: 

  • Python
  • Java and JavaScript
  • C++
  • Swift
  • Ruby

Apps and websites for text-based and block-based programming

When students can use blocks to create a program and see what the text-based language of it looks like, then some real connections are made. It is critical that students understand the fundamentals of programming, such as events, sequencing, loops/iteration, functions, and variables. The programs, websites, and applications below do a good job of letting students build their programs with blocks or text and allow switching between both modes to help them understand how the program works (or doesn’t work!).

Arduino with ArduBlock

It is a bit of a process to add ArduBlock to your Arduino program. Once you place your ArduBlock downloaded library into the correct path, it becomes available in your Arduino program. Users program in either mode and switch back and forth as they develop their code.

Sphero EDU

Build your program for your Sphero robot in blocks — then show it in JavaScript.

VEXcode VR

VEXcode is a Scratch-like interface that was built to program virtual robots. Programmers can move their robot vehicles around in a playground space. It uses Scratch Blocks and Python code at the same time.

   

Code.org

Blocks can be shown in JavaScript.

   

Computer Science and STEM teachers of course need to give students experiences with both block-based and text-based coding. When students are ready to transition from blocks to text, I suggest using some of the tools listed above. Eventually, students who can get into text-based code for projects will be the most marketable in the industry.


For more tips, tricks, and tools for teaching in and out of the classroom, check out more articles on the Teq Talk blog.

We also offer virtual professional development, training, and remote learning support for educators with OTIS for educators. Explore the technology, tools, and strategies that can spark student success — no matter where teaching or learning are happening.

Related Articles & Other Recommended Reading

3 Must-Have Extensions for Google Chrome
Extensions are powerful additions to the Chrome browser that add extra functionality to websites and applications. Some of these extensions work by adding features to individual apps (think Google Meet Grid view) or to all websites that are visited in Chrome, like the Google Translate extension. Let’s take a look at some of the top […]

[ READ MORE ]

Discover AI While Using Google with Your Students
In our last AI-related blog, we provided an overview of 5 Practical Ways AI Can be Used in Education. Here we explore the many facets of AI built into Google. Google is a popular platform used during teaching and learning in the workplace, and even at home. There’s Google Drive for “storing, accessing, and sharing […]

[ READ MORE ]

Paced Instruction with SMART Learning Suite Online
SMART Learning Suite Online (SLSO) can be used as a stand-alone product, or can be integrated with Google Workspace for Education, Microsoft Teams, Canvas, and more. A feature of SMART Learning Suite Online that we like to draw attention to is the option for teacher-paced and/or student-paced learning. While delivering lessons to students synchronously via […]

[ READ MORE ]