How do I learn to program with Scratch?
Scratch is an interactive environment tool created by MIT to help them teach programming concepts. You get a stage, with cartoon characters, and drag blocks around to control them.
Scratch is easy to use, and generally fun. Here’s how to use it to learn programming and coding on a Mac.
More Mac coding tutorials:
How to set up and learn Python coding on a Mac |
Learn to code using the C# programming language on Mac
Learn programming with Scratch on a Mac
Don’t be fooled into underestimating Scratch. The blocks are similar to commands you’ll find in programming languages. You learn concepts like program flow, iterative loops and variables. Meanwhile the stage and characters (known as ‘Sprites’) represent objects. So you’re secretly learning object-orientated programming.
The other key asset to Scratch is its community. There are a huge number of individuals developing applications in Scratch. This vibrant community enables you to learn from others, and Scratch enables you to view projects built by other people. (The most interesting projects are highly upvoted by the community.)
How to learn programming with Scratch on a Mac: Installing Scratch on a Mac
There are two versions of Scratch:
Scratch 2.0 is an online web-based editor that you can run on your Mac. You’ll need a relatively recent browser (the specifications recommend Chrome 35, or Firefox 31 or later.) You also need to have Flash installed, which is problematic for some Mac users.
Scratch 2.0 Offline Editor (beta version) can be downloaded to your Mac. This is an offline application that enables you to create animations. It’s still in beta, although the earlier version (Scratch 1.4) is a stable download. You’ll also need to download the latest version of Adobe Air to run Scratch Offline.
On the whole we prefer the web-based edition of Scratch. New features are introduced first, and it saves all our work to the cloud automatically. We run it in Chrome with Flash installed (leaving Safari Flash-free for our main web browsing.)
Why you should learn to code on Mac (and how to do it)
How to learn programming with Scratch on a Mac: Creating projects
Getting started with Scratch couldn’t be easier:
- Log on to the Scratch website and you’ll see many different projects created by other users. Choose on a project and the animation will appear in a small box, with instructions on the right.
- Click Green Flag to start the program, and use the instructions to interact with it. You can now play the game, or watch the animation (or interact with the project in general).
- Click View Inside to view the Scratch project blocks used to create the program. You can play the project, using the Green Flag above the Preview window.
If you like the project, you can favourite or like it using the Star and Heart icons beneath. You can also click Remix to add it to your own projects, and then use it to build something of your own.
You can create a project from a blank template. Click on the Scratch icon at the top-left to return to the main window if you’re not there already.
- Click Create and you’ll be taken to the main Scratch interface. Here you will have a single sprite, known as the Scratch Cat and a blank Scripts Area.
- Blocks are dragged from the Scripts Panel to the Script Area.
- Click on Events and drag a When [Flag] Clicked icon to the Script Area.
- Now click Looks and drag a Say Hello for 2 Secs block and connect it to the bottom of the When [Flag] Clicked block.
- Now click the Green Flag icon to run the program. Scratch Cat will say Hello.
Learn Scratch programming on a Mac
There are lots of resources for learning how to use Scratch. These can help you get started with programming, and explain complex programming concepts in an environment that’s easy to understand.
Learn Scratch in 10 Minutes by Dadiwiki
Code With Google: Scratch
Jessica Chiang’s Scratch Lessons on YouTube
Shall We Learn Scratch Programming for Tweens
EDX: Harvard’s Programming with Scratch