Step 4 of 15 · B · Naming the box
Howie sticks a name-tag on it
This box still has no name.
Step 1 / 11idle
A name is a sticker on the box — it is how you find that box again later.
Good names are short and meaningful — like score, price, or userName.
Bad names are vague or random — names like x, thing, or data2 leave the next reader guessing.
A good test: read the name out loud. Does it tell you what is inside without opening the box?
Names usually have to start with a letter — most programs will not accept a name that starts with a digit or a space.
Once a name is on the box, the program can use that name to peek in, put a value in, or swap it out later.
The name and the box are now a team — and that team is what programmers call a variable.
Check yourself
Match the pairs
Match each box to its best name:
Quick check
Which of these is the **worst** name for a box that holds a player score?
