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

Add Apps to Your SMART Board
Looking for a way to integrate learning apps into your classroom? SMART Technologies has you covered with a curated list of approved educational apps from the Google Play Store that you can add directly onto your classroom board and start using right away!  In order to use this feature, you should be using a SMART […]

[ READ MORE ]

3 Ways Rube Goldberg Machines Can Engage Your Students
Looking for a fun and extravagant way to stretch your students’ creativity? Or perhaps you want to exercise their social skills?  Then the challenge you have been looking for may be building Rube Goldberg machines. A Rube Goldberg machine is a fun, outrageous, and wacky invention that performs a simple task. The process requires bizarre […]

[ READ MORE ]

Build Your Perfect Lesson in Seconds with Lumio!
Over the years, teachers tend to accumulate a lot of materials. Now that the world has gone digital, and education along with it, there is more out there than ever before. Picture this: you have an amazing assignment from two years ago that you’d love to do again with a more modern twist. Your student […]

[ READ MORE ]