Want to code without typing (virtually) anything?
Block-based coding means that instead of typing a coding language, you drag and drop jigsaw-like pieces together to build things using tools like Scratch or Thunkable.
Block-based coding works by dragging together 'blocks' of code to make programs that can do things. There will be a range of different kinds of blocks that can be used, and often these have hints (as with a jigsaw) on which will fit together.
Below is an example of some code from Thunkable, a tool that allows you to make simple apps. The different colours of the blocks show their different functions: the yellow block is an 'event', looking for when a button is clicked, and then the purple block connected to it is a sound block, and will play a sound when told to by the yellow block.
Whether you use Scratch, Thunkable, or another block-based coding tool, they tend to have similar features, mostly based around coding concepts that you'll find in typed coding languages as well.
They all tend to revolve around two elements: creating the visual interface that the user will interact with, and putting together the blocks that make up the code.
Whether you're making a game, an app, or anything else, you're designing it with someone in mind, and they'll need a way of interacting with it. This is the interface and has different names depending on the tool you're using: in Scratch, for example, it's called the 'stage', whereas Thunkable uses different 'screens' in a main Design area.
You'll need to design the visuals and any features that need to exist in the interface. These might be things the user needs to click on (like buttons), visual elements (like backgrounds), or content (like text). Think about where these need to appear, what they need to look like, and if you need to set anything else (like whether or not they appear at first).
Whenever you're creating code to make a computer do something, it doesn't just know what to do: it also needs to know when to do it. Code has to be run, which is one way of saying that the computer follows those instructions, and usually this is done by telling the computer a rule for when it should run.
In block-based coding, this tends to be using event blocks, which are blocks that tell the computer which 'event' must occur for the code to run. These events are likely to be things like the user opening the app, pressing a button, or using another feature.
So you might have a block that says 'when button is pressed' and then you can connect other blocks to it that say what happens when that button is pressed.
Scratch is a block based coding tool designed for beginners and education contexts, which allows you to create games, animations, and interactive stories.
To use Scratch, you sign up for a free account on Scratch's website and then start building code in your web browser. You can create your own coding projects or view and 'remix' other people's to see how they work.
Scratch has some of its own tutorials, or you can use our Scratch materials below to get started using it.
If you want to try out first looking at Scratch projects, trying out building one, and then thinking up your own ideas, this Scratch exercise sheet will give you the prompts to move from exploring other creations to making your own.
Thunkable is a block-based coding tool for creating simple interactive apps, such as little games. It can also be used to add features like text-to-speech and image recognition, as it has blocks with specific features.
It's good for prototyping ideas and thinking about what you might need to make an app work, without having to learn one of the coding languages used to develop apps.
It's also useful for thinking about how you make an app functional for your users, as you can live test your app within your web browser to try out the features you give it.
A similar tool to Thunkable is MIT App Inventor, which is a block-based app creation tool focused on an education context rather than commercial apps. It has a different interface to Thunkable though the features are similar, so you might want to explore which is more suitable for your needs.
Thunkable has two sections: Design and Blocks.
When you're working in Design, you'll add components to screens, which are the different screens users will see in the app (a bit like different web pages). You'll also need to add navigation components, either through the built-in navigator options or by coding buttons so they will go to another screen.
When you're working in Blocks, there are different categories of blocks that can be put together. The shapes and colours suggestion what kind of block they are and which other blocks they might be able to connect to.
Designing to go with our Thunkable workshop, these exercises get you building a dual purpose app that can say what a user types and also translate what they type - without typing any code!
Another way you might find block-based coding languages is when using robot-building tools such as Lego or Makeblock kits. These kits often use a block-based coding language similar to Scratch to allow you to code the robots, dragging pieces that control different components of the robot. This makes it easier to get started with robot coding as, like with other block-based coding, you don't need to know what commands are out there, but simply find them in the app for that robot.
Elsewhere on the page, you'll find the resources and exercises for learning Scratch and Thunkable, if you want to try out either of them.
If you want to try out block-based coding with a creative focus, we've also developed a session for creating a point and click game in Scratch. Work through the slides and then use the walkthrough to create a game that you can then start to adapt if you want!
Once you've had a go learning Scratch or Thunkable, you might want to build more complex things with them, or move on to a typed coding language.
Both tools have their own tutorials, which get harder in difficulty and are worth trying out. Other websites can have free tutorials and courses too, sometimes aimed at how to teach the tools to children.
Or you might want to apply your knowledge to another coding language. Check out the other coding languages on this guide and think about what you want to do with coding. You might want to further your games by building them not in Scratch, but in something else. On FutureLearn there's a free course on how to move from using Scratch to using Python which might give you some ideas.
If Thunkable made you more interested in making apps, you might want to research online which coding languages might help you make the kind of app you're interested in. Lots of common coding languages are also used for app development.