When I was in 8th grade, I discovered the world of programming. My first project was simple: I learned how to make a green circle and a red square appear on a computer screen. These small steps were part of a bigger journey, and soon I realized that with programming, you can create almost anything you imagine. Computer science is all about understanding how computers work and how they process information, so you can teach them to do new and exciting things. Today, the possibilities in computer science are truly incredible, and it feels like having a superpower!
In the next hour, we’re going to dive into a fun game that will teach you the basics of programming. Normally, programming involves writing text, but we’ll be using Blockly. Blockly is a tool that lets you create programs by dragging and dropping visual blocks. Even though it looks like a game, you’re actually writing real code behind the scenes!
Our first task is to help a bird navigate through a maze to reach a pig that has taken its eggs. Blockly is divided into three main sections:
On the left side, you’ll see the bird’s maze. This is where your program will run, and you’ll see the bird move according to the commands you give it.
In the middle, there’s a toolbox filled with blocks. Each block represents a command that the bird can understand, like moving forward or turning.
On the right, there’s a white space called the workspace. This is where you’ll build your program by snapping blocks together.
Let’s start by dragging the “move” block to the workspace. When you press “run,” the bird will move forward one space on the grid. Want the bird to do more? Add another block! Try dragging the “turn right” block underneath the “move” block until they snap together. Now, when you press “run,” the bird will follow the commands from top to bottom.
If you need to remove a block, just drag it away from the stack and drop it into the trash can. After running your program, you can always press the “reset” button to bring the bird back to the start. Now, let’s help the bird get those pigs!
With Blockly, learning to code is like solving a puzzle. Each block you add is a piece of the solution. Have fun exploring and creating your own programs!
Try to guide the bird through a more complex maze using Blockly. Experiment with different block combinations to find the most efficient path. Can you solve the maze using the fewest blocks possible?
Design a maze for your classmates to solve. Use graph paper to sketch your maze and write down the sequence of Blockly commands needed to navigate it. Swap mazes with a friend and see if they can solve yours!
Use Blockly to create a simple animated story. Choose characters and actions, and sequence them using blocks to tell a short story. Share your story with the class and explain the code behind it.
Work in pairs to solve a series of Blockly puzzles that contain errors. Your task is to find and fix the mistakes in the code so the bird can successfully reach the pig. Discuss the errors and solutions with your partner.
Use Blockly to create a piece of digital art. Experiment with different shapes and colors by combining blocks in creative ways. Present your artwork to the class and describe the process you used to create it.
Sure! Here’s a sanitized version of the transcript:
—
I was in 8th grade when I learned to program. I first learned how to make a green circle and a red square appear on the screen. You learn these lessons, and there aren’t that many of them, and eventually, you can reach a point where you can do almost anything you want. Computer science is about understanding how a computer works and how it processes information, so you can teach it to perform new tasks. These days, the possibilities in computer science are truly amazing. I think it’s the closest thing we have to a superpower.
In the next hour, we’re going to play a game that will teach you the basic concepts of programming. Usually, programming is done in text, but we’ll use Blockly, which utilizes visual blocks that you can drag and drop to create programs. Under the hood, you’re still generating code.
To start off, we’re going to build code for a program that will help a bird navigate through a maze to reach the pig that took its eggs. Blockly is divided into three main parts. On the left is the bird’s maze where your program will run. The instructions for each level are written below the maze. The middle area is the toolbox, and each of these blocks represents a command that the bird can understand. The white space on the right is called the workspace, and this is where we’ll construct our program.
If I drag the “move” block to our workspace and press “run,” what happens? The bird moves forward one box on the grid. And what if I want the bird to do something after moving forward? I can add another block to our program. I’ll choose the “turn right” block and drag it underneath my “move” block until the yellow arrow appears, then drop it so the two blocks snap together. When I press “run” again, the bird will execute the commands stacked from top to bottom in our workspace.
If you ever want to delete a block, just remove it from the stack and drag it to the trash can. After you’ve pressed “run,” you can always hit the “reset” button to return the bird to the start. Now, let’s get those pigs!
—
Let me know if you need any further modifications!
Programming – The process of creating a set of instructions that tell a computer how to perform a task. – Example sentence: In programming class, we learned how to write code to make a game.
Computer – An electronic device that can store, retrieve, and process data according to instructions given to it. – Example sentence: I used my computer to complete my homework and play educational games.
Code – A set of instructions written in a programming language that a computer can understand and execute. – Example sentence: We wrote code in Python to create a simple calculator program.
Blockly – A visual programming language that allows users to create code by stacking blocks together. – Example sentence: Using Blockly, I was able to create a fun animation without typing any code.
Maze – A complex network of paths or passages, often used in coding games to teach problem-solving skills. – Example sentence: In the coding game, I had to write instructions to help the robot navigate through the maze.
Toolbox – A collection of blocks or tools in a visual programming environment that can be used to build programs. – Example sentence: I dragged blocks from the toolbox to the workspace to create my program.
Workspace – The area in a coding environment where you can arrange and connect blocks to build a program. – Example sentence: My workspace was filled with colorful blocks that formed the code for my project.
Run – To execute a program or a set of instructions on a computer. – Example sentence: After finishing my code, I clicked the run button to see if my program worked correctly.
Move – A command in programming that instructs an object or character to change its position. – Example sentence: I used the move block to make the character walk forward in the game.
Bird – A character or object often used in coding exercises to teach movement and logic. – Example sentence: In the coding challenge, I programmed the bird to fly through the obstacles to reach its nest.