Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Session 1: Welcome & the peanut butter problem

Phase 1 — Scratch · Session 1 of 9

What we’re learning today

Today is your first day of programming class. We’re going to talk about what programming actually is, play a game that will probably make Mr. Eric look ridiculous, and open up the program we’ll use for the next couple of months. By the end, you’ll know why being precise matters more than being fast, and you’ll have clicked around inside Scratch enough to feel like it’s not a stranger.

You’ll need to remember from last time

Nothing! This is your first session. Welcome.


Part A: What is programming, really?

Let’s start with a question: what is a computer?

You probably said something like “a machine that does stuff,” or “a thing with a screen.” Those are true. But here’s a harder question: how does a computer do stuff? Who tells it what to do?

Here’s the answer we’re going to spend a whole year unpacking:

A computer does exactly what someone tells it to do. Nothing more, nothing less. It can’t guess what you mean. It only knows what you say.

That sounds simple. It isn’t. We’re going to prove it right now.

The peanut butter and jelly problem

Mr. Eric is going to pretend to be a computer. You are going to be the programmers. Your job: tell the computer (Mr. Eric) how to make a peanut butter and jelly sandwich. The computer will do exactly what you say.

You’ll go around the room, each person giving one instruction at a time. Mr. Eric will follow each instruction as literally as possible. If you say “put the peanut butter on the bread,” he might just set the unopened jar on the unopened bag of bread. Because that’s what you said.

Here’s what you’ll discover:

  • The computer doesn’t know what “open” means unless you say how.
  • The computer doesn’t know what to spread peanut butter with unless you say what.
  • The computer doesn’t know that bread comes in slices, or that the slices need to be next to each other, or that the jelly goes on the bread and not on the table.

You will probably end up laughing a lot. That’s fine. The laughing is the lesson.

What this means

A computer is like Mr. Eric-as-computer, but worse. At least Mr. Eric knows what bread is. A real computer doesn’t. It doesn’t know what anything is until you tell it.

Here’s the cool part:

When you learn to give instructions that precise, you can make the computer do anything.

Games. Apps. Websites. Tools that make your life easier. Things nobody has ever made before. That’s what we’re learning to do this year.

Talk about it

Before we move on, talk through these questions as a group:

  • What were some things we forgot to tell the computer that turned out to matter?
  • What kinds of things did the computer assume? Was it ever right?
  • If you had to write down all the steps to make a sandwich so a real computer could do it, how many steps do you think it would take?

(The real answer to that last one: way more than you’d guess. Hundreds. Maybe more.)


Part B: Meet Scratch

Now let’s meet the tool we’ll use for the next couple of months. It’s called Scratch, and it’s a programming language designed for people who are just starting out. You build programs by snapping blocks together — like LEGO, but the blocks make things happen on your screen.

Open Scratch on your computer. Look for the orange cat icon on your desktop, or find it in the Applications menu.

A tour of the screen

Scratch divides the screen into a few areas. Don’t worry about memorizing this — you’ll get used to it fast.

  • The stage (top right). This is where things happen. The orange-and-white cat you see is called a sprite — a character on the stage.
  • The blocks panel (left side). These are instructions you can give to sprites. They’re grouped by color. Blue blocks make things move. Purple blocks change how things look. There are lots of others. We’ll learn them as we go.
  • The script area (middle). This is where you build your program by snapping blocks together.
  • The sprite list (bottom right). All the sprites in your project. Right now, just the cat.
  • The green flag and red stop sign (top of the stage). Green flag runs your program. Red stop sign halts it.

Try this together

Let’s get the cat to do something on purpose.

  1. Drag a move 10 steps block (it’s blue, near the top of the blocks panel) into the script area in the middle.
  2. Click on the block. The cat moves a little.
  3. Click on it again. It moves more.
  4. Drag a turn 15 degrees block onto the bottom of the first one. They should snap together.
  5. Click on the stack. The cat moves and turns.
  6. Click on it twenty more times.

Your cat should now be in a weird place doing weird things. That’s correct.

Now go explore

For the rest of class, just play. Try any blocks you want. Make the cat do silly things. Try to make it walk off the screen. Try to make it spin in circles. Try to make it say something (hint: look at the purple blocks).

There are no wrong answers right now. You’re getting comfortable. That’s the whole goal.

If you find a block that looks interesting and you don’t know what it does — try it. That’s how you’ll learn most of what you learn this year.


Wrap-up

Before we leave, we’ll go around and share:

  • What was the silliest thing you got the cat to do?
  • Did anything happen that you didn’t expect?
  • Did you find any blocks that looked interesting but you didn’t try?

You did great today. Next week, we’ll start telling the cat what to do on purpose.


If you missed this session

You missed Mr. Eric trying to spread peanut butter with a comb. There’s no replacement for that, sorry. But here’s what you need to know:

  1. Programming is telling a computer exactly what to do. Computers can’t guess. They do what you say, even when what you say is wrong.
  2. Open Scratch on your computer. It’s already installed — look for the orange cat icon on your desktop or in the Applications menu.
  3. Drag a few blocks from the left panel into the middle area, snap them together, and click them. Try the blue ones first (they make things move). Mess around for fifteen or twenty minutes.

When you come next week, you’ll be ready to keep up. If anything’s confusing, ask your buddy at the start of class.

Stretch and extension ideas

If you finished early or want to keep going at home:

  • Find a say block (purple) and make the cat say something.
  • Add a second sprite from the sprite library (look for the cat-with-plus icon at the bottom right).
  • Try to make the cat walk in a square shape. Hint: how many turns? How many degrees each turn?

What’s next

Next week we’ll learn how to make sprites do things in order — and what happens when the order is wrong.