Scratch (programming language)
Scratch is a high-level, block-based visual programming language and website aimed primarily at children as an educational tool, with a target audience of ages 5 to 16. Users can create projects on the website using a block-like interface. Scratch was conceived and designed through collaborative National Science Foundation grants awarded to Mitchel Resnick and Yasmin Kafai.
Scratch is developed by the MIT Media Lab and has been translated into 70+ languages, being used in most parts of the world. Scratch is taught and used in after-school centers, schools, and colleges, as well as other public knowledge institutions. As of 15 February 2023, community statistics on the language's official website show more than 123 million projects shared by over 103 million users, and more than 95 million monthly website visits. Overall, more than 1.15 billion projects have been created in total, with the site reaching its one billionth project on April 12, 2024.
Scratch takes its name from a technique used by disk jockeys called "scratching", where vinyl records are clipped together and manipulated on a turntable to produce different sound effects and music. Like scratching, the website lets users mix together different media in creative ways by creating and "remixing" projects, like video games, animations, music, and simulations.
Scratch 3.0
User interface
The Scratch interface is divided into three main sections: a stage area, block palette, and a coding area to place and arrange the blocks into scripts that can be run by pressing the green flag or clicking on the code itself. Users may also create their own code blocks, which will appear in the "My Blocks" section.The stage area features the results and all sprites' thumbnails being listed in the bottom area. The stage uses x and y coordinates, with 0,0 being the stage center.
With a sprite selected at the bottom of the staging area, blocks of code can be applied by dragging them from the block palette into the coding area. The Costumes tab allows users to change the look of the sprite with a vector and bitmap editor in order to create various effects, including animation. The Sounds tab allows attaching sounds and music to a sprite.
When creating sprites and also backgrounds, users can draw their own sprites manually, choose a sprite from the library, or upload an image.
The table below shows the categories of the programming blocks:
Offline editing
An offline "Desktop Editor" for Scratch 3.0 is available for Microsoft Windows 10 and above in the Microsoft Store, Apple's macOS, ChromeOS, Android, and unofficially in Linux, but Scratch is working with open-source partners to support Linux in the future. This allows the creation and playing of Scratch programs offline. Previous versions of the offline editor are also accessible.Extensions
In Scratch, extensions add extra blocks and features that can be used in projects. In Scratch 2.0, the extensions were all hardware-based and Pen was a normal category. Software-based extensions were added in Scratch 3.0, such as text-to-speech voices, along with some new hardware-based extensions like the micro:bit. The extensions are listed below.Physical
- LEGO Mindstorms EV3 – Control motors and receive sensor data from the Lego Mindstorms EV3
- Makey Makey – Use Makey Makey to control projects
- LEGO Education WeDo 2.0 – control motors and receive sensor data from the Lego WeDo
- micro:bit – Use of a micro:bit to control projects
- LEGO BOOST – Bring robotic creations to life
- Go Direct Force & Acceleration – Sense pull, push, motion, and spin
Digital
- Music – Play digital instruments. Previously part of the Sound category.
- Pen – Draw on the Stage with a variety of thicknesses and color. Previously a normal block category.
- Video Sensing – Detect motion with the camera. Previously in the Sensing category.
- Face Sensing - Detects motion with the camera to create costumes and games that interact with a user's face.
- Text to Speech – Converts words in a text into voice output, especially having an option for languages
- Translate – Uses Google Translate to translate text from one language into a variety of other languages, including Arabic, Chinese, Dutch, English, French, Greek, Norwegian, and Japanese
- Makey Makey – Options for better key pressing and press multiple keys in order. You can grab a join block if you want more control on the extension.
Scratch Lab
The Scratch Lab displays experiments from the Scratch Team, intended to explore whether new features may be added to the full website in the future. Experimental features currently under development include:- Video Sprites – Fill sprites with live video.
- Animated Text – Bring words to life with colors, fonts, and animations.
Community of users
Educational users
Scratch is used as the introductory language because the creation of interesting programs is relatively easy, and skills learned can be applied to other programming languages such as Python and Java.Scratch is not exclusively for creating games. With the provided visuals, programmers can create animations, text, stories, music, art, and more. There are already many programs that students can use to learn topics in math, history, and even photography. Scratch allows teachers to create conceptual and visual lessons and science lab assignments with animations that help visualize difficult concepts. Within the social sciences, instructors can create quizzes, games, and tutorials with interactive elements. Using Scratch allows young people to understand the logic of programming and how to creatively build and collaborate.
Scratch is taught to more than 800 schools and 70 colleges of the DAV organization in India and across the world.
In higher education, Scratch is used in the first week of Harvard University's CS50 introductory computer science course.
Online community
Users of Scratch are called "Scratchers". Scratchers have the capability to share their projects and receive feedback. Projects can be uploaded directly from the development environment to the Scratch website and any member of the community can view and download the full source code to study or to remix into new projects. Scratchers can also create project studios, comment, favorite, and "love" others' projects, follow other members to see their projects and activity, and share ideas. Projects range from games and animations to practical tools. Additionally, to encourage the creation and sharing amongst users, the website frequently establishes "Scratch Design Studio" challenges.Educators have their own online community called ScratchEd, developed and supported by the Harvard Graduate School of Education. In this community, Scratch educators share stories, exchange resources, and ask questions.
Scratch Studios
Scratchers can upload their projects to studios where other Scratchers can upload their project for others to see and for other Scratchers to view, comment and remix their project. A studio usually consists of different projects made by Scratchers. Some Scratch studios are created by Scratchers to put all their projects into one library. If you're the creator or the manager, you can invite users to become curators and you can promote them into managers. Only its creator or host can delete the studio.Scratch Wiki
The Scratch Wiki is a support resource for Scratch and information about its website, history, and phenomena surrounding it. Although is supported by the Scratch Team, it is primarily written by Scratch users and is hosted independently of the main Scratch website.Roles
Roles are displayed as a label under a user's username on profile pages and on forum posts. To prevent vandalism, new accounts have the "New Scratcher" role, as opposed to the usual "Scratcher" role. Some restrictions are imposed onto New Scratcher accounts, including the inability to use cloud data and a minimum 30 second cooldown period between posting comments. After a period of time of interacting and creating projects, an account will be eligible to gain the Scratcher role.Official moderators and developers of Scratch are labeled as part of the "Scratch Team" and usually have an asterisk at the end of their username. The site also has special types of accounts for Students and Educators to use Scratch in the classroom.
Censorship
In August 2020, GreatFire announced that the Chinese government had blocked access to the Scratch website. At the time, it was estimated that more than three million people in China were using it. The outlet cited the fact that Macau, Hong Kong and Taiwan were listed as countries on the website.Code base
The source code for the project editor in all three major versions, as well as a majority of the current website, is hosted publicly on GitHub across various repositories. Scratch 3.0 is JavaScript-based, 2.0 is programmed in ActionScript, and the 1.x versions were based on Squeak, which itself is based on Smalltalk-80.2.0 had an experimental JavaScript-based interpreter that was being developed in parallel with the ActionScript version.
On 13 May 2014, a year after the release of Scratch 2.0, it was announced by a developer on the Scratch Forums that 2.0 would become open source.
In 3.0, Scratch blocks are implemented using Blockly, a JavaScript library developed by Google for creating block-based visual programming languages.