Consica Labs

Consica Labs
Chapter 1

Introduction to Scratch

Discovering visual coding through draggable blocks

Definition

Scratch is a visual programming language created by the MIT Media Lab that allows users to create interactive stories, games, and animations by snapping together color-coded Block instead of typing code. It is designed for beginners aged 8 to 16 but is used by people of all ages worldwide. Key concepts include Costume.

At its core, Scratch teaches computational thinking — the ability to break down problems, recognize patterns, think algorithmically, and design solutions. Each Block represents a programming command: moving a Sprite, playing a sound, changing a variable, or responding to user input. Block only fit together in logically valid ways, which prevents syntax errors and lets beginners focus on logic and creativity.

Real-Life Example

Think about how you give directions to a friend. You say things like 'walk forward,' 'turn left,' 'stop.' You give instructions in order, one after another. This is exactly how Scratch programming works — you give a Sprite a sequence of instructions to follow. Scratch is used in over 200 countries and in more than 70 languages. Schools worldwide use it to introduce programming concepts, and the Scratch online community has over 100 million shared projects.

A real-world example: A student in Brazil used Scratch to create an interactive science project about rainforest deforestation. The project shows trees disappearing when certain conditions are met and displays facts about the ecosystem. The student learned programming concepts while also learning about environmental science — showing how Scratch connects coding to real-world topics.

Interactive Diagram

Launch the interactive diagram to see this in action.

Open Interactive Diagram

The interactive diagram for this chapter demonstrates Introduction to Scratch. It shows the Scratch interface with its main areas: blocks palette, coding area, stage, and sprite list.

What to explore:

  • click each area to learn its name; drag a block to the coding area; watch the sprite respond on stage
  • Scratch is a visual programming language where you snap blocks together to create animations, games, and interactive stories

Introduction

Have you ever wanted to create your own video games, animations, or interactive stories? With Scratch, you can do all of that and more — no typing required. Scratch is a visual programming language created by MIT that lets you snap together colorful Block like puzzle pieces to build programs. It is used by millions of young people around the world to bring their creative ideas to life.

Scratch is designed to teach the fundamental concepts of programming — sequences, Loop, conditions, variables, Event, and more — without the frustration of syntax errors. Instead of typing code, you drag and drop Block that fit together only in ways that make sense. This means you can focus on what matters: thinking logically and solving problems creatively.

In this chapter, you will learn what Scratch is, how it was developed, and why it is the perfect starting point for your programming journey. By the end, you will understand the big ideas behind Scratch and be ready to start creating your own projects.

How It Works

Scratch works on a simple idea: programming is about giving instructions to a computer, and those instructions should be easy to understand and fun to create. Instead of writing lines of text like traditional programming languages, Scratch provides over 100 different Block types, each with a specific function. Block snap together vertically to form stacks, which are called Script. Each Script tells a Sprite (character) what to do.

The Scratch programming environment runs in a web browser or as a downloadable application. It has three main areas: the Stage (where your project runs), the Sprite list (which characters are in your project), and the Block palette (where you find and drag Block). The Block palette is organized by category — Motion, Looks, Sound, Event, Control, Sensing, Operators, and Variables — making it easy to find the Block you need.

Household Object Analogy

Think of Scratch like building with LEGO bricks. Each LEGO brick has a specific shape and purpose — a 2x4 brick connects differently than a wheel or a window. Similarly, each Scratch Block has a specific shape and function. Just as LEGO bricks snap together in ways that make physical sense, Scratch Block snap together in ways that make logical sense. And just as you can build anything with LEGO, you can create anything with Scratch.

Deeper Dive

Scratch was developed by the Lifelong Kindergarten group at the MIT Media Lab, led by Professor Mitchel Resnick. The first version was released in 2007, and it has since grown into the world's largest coding community for young people. As of 2025, over 100 million projects have been shared on the Scratch website, covering games, animations, simulations, digital art, music, and more.

Scratch is more than just a programming language — it is a community. The Scratch website allows users to share their projects, view the code behind other people's projects (a feature called 'See Inside'), leave comments, and remix (modify and build upon) existing projects. Remixing is a core part of Scratch culture and mirrors how real software developers build upon open-source code.

Scratch has been translated into over 70 languages and is used in more than 200 countries. It is available completely free of charge, and the offline editor works on Windows, macOS, and ChromeOS. Many schools use Scratch as part of their computing curriculum, and there are Scratch-themed camps, clubs, and competitions worldwide.

Key Insight

The name 'Scratch' comes from the scratching technique used by hip-hop DJs, who Scratch vinyl records to create new sounds by mixing existing music. Similarly, Scratch lets you mix images, sounds, and animations in new ways to create digital projects. The name reflects the idea of creative remixing and reuse.

Advanced

Scratch 3.0, released in 2019, introduced several major improvements over previous versions. It runs on HTML5 instead of Flash, making it compatible with tablets and Chromebooks. It added new extension capabilities, allowing Scratch to interface with physical hardware like the micro:bit, LEGO Mindstorms, and Makey Makey. The extension system uses a simple JSON-based protocol that anyone can implement.

Under the hood, Scratch uses a block-based visual syntax that translates directly into a tree-based intermediate representation. When you snap Block together, Scratch builds an abstract syntax tree (AST) in memory. When you click the green flag to run, the Scratch VM (virtual machine) traverses this AST and executes each node in order. This approach is similar to how many professional programming languages work internally.

Scratch has inspired numerous derivatives and spin-offs. Snap! (formerly BYOB) extends Scratch with first-class lists, procedures, and even recursion. mBlock is a Scratch derivative designed specifically for robotics, with Block that control Arduino-based robots. App Inventor, also from MIT, uses a similar block-based approach but targets Android app development rather than animations and games.

Vocabulary Table

Term Definition
ScratchA block-based coding language designed for learning programming logic through visual blocks.
SpriteA character or object in a Scratch project that can be programmed with scripts.
BlockA visual coding instruction that represents a command or code structure, snapped together to form scripts.
ScriptA stack of snapped-together blocks that defines a sprite's behavior and actions.
StageThe background area where sprites perform their actions, using a 480x360 coordinate grid.
EventA trigger (click, key press, message) that starts a script's execution.
LoopA control structure that repeats a set of blocks a fixed number of times or forever.
CostumeOne of multiple visual appearances a sprite can switch between, enabling animation.

Fun Facts

The Scratch mascot is an orange cat named Scratch Cat. It is the default Sprite when you create a new project and has appeared in every version of Scratch since 2007.

Over 100 million projects have been shared on the Scratch website. If you watched each one for just one minute, it would take over 190 years to see them all.

Scratch is available in over 70 languages, including Klingon and Pirate English, thanks to volunteer translators from around the world.

The largest Scratch project ever shared contains over 100,000 Block and took its creator more than a year to build.

Scratch Day is a global network of Event where Scratchers gather to share projects, learn from each other, and celebrate creativity. Hundreds of Scratch Day Event take place worldwide each year.

Common Misconceptions

Misconception: Scratch is just a toy and not real programming.

Truth: Scratch teaches real programming concepts including sequences, Loop, conditions, variables, Event, and parallelism. MIT designed Scratch specifically to lower the barrier to entry while teaching transferable computational thinking skills.

Misconception: Scratch can only make simple games.

Truth: Scratch can create complex projects including platformers, multiplayer games, physics simulations, chatbots, music synthesizers, and even simple artificial intelligence demonstrations.

Misconception: You need to know how to type to use Scratch.

Truth: Scratch is visual block-based programming. You do not type any code at all — you drag, drop, and snap Block together. This is why it works well for young children and beginners.

Misconception: Scratch is not used in real computer science education.

Truth: Scratch is used in introductory computer science courses at universities including Harvard, UC Berkeley, and MIT. It is also the foundation of the AP Computer Science Principles curriculum.

Knowledge Check

1. What is a character or object in Scratch called?

Answer: Sprite

2. Which group developed Scratch?

Answer: MIT Media Lab

3. What starts a script execution in Scratch?

Answer: An event block (like Green Flag)