For a teacher with a class? The classroom edition has the full plan, slides and standards.

Homeschooling PDF

Family edition

App Maker: Every Button Goes Somewhere

Ages 11-14 ยท about 45 minutes, in one sitting

Your child opens a quiz app with two broken buttons, finds them by using the app, fixes them, and draws a map of how the app fits together.

What you need

Before you start: try it once yourself

Open mytekdev.com/try/appmaker?lesson=every-button-goes-somewhere&ref=fam-appmaker-1. A short guide opens over the app. The phone shows a quiz called Space Quiz, and four cards sit under it: Space Quiz, Question 1, Right! and Not that one.

  1. Use it. Press Try it. Tap Start, then Mars: the app says Not that one, and Try again goes back to the question. Tap Saturn: Yes! Saturn. Tap Play again: nothing happens. Reload the page to start over.
  2. Find the first one. Press Try it, tap Start, tap Venus. Nothing happens. Press Keep designing: you are still on Question 1.
  3. Fix it. Click Venus on the phone. The panel on the right shows Then go to, with Nowhere chosen. Click Not that one. A small dark tag appears on the button.
  4. The second one. Click the Right! card under the phone, click Play again, and pick Space Quiz under Then go to.
  5. The table. Start goes to Question 1. Mars goes to Not that one. Saturn goes to Right!. Venus goes to Not that one. Play again goes to Space Quiz. Try again goes Back one screen.
The moment that lands is tapping a button that does nothing. Children expect an app to know what a button is for. It only knows what it was told.

The ideas, in plain words

Programs that people use sit and wait. Nothing runs until something happens: a tap, a key, a timer. That something is called an event, and the code that runs when it happens is the event's handler. In App Maker the handler of a button is its panel: the steps under When tapped, first, and the screen under Then go to.

A button with Then go to set to Nowhere is not broken in any way the app can see. It does exactly what it was told, which is nothing. That is what most bugs are: the program doing what was written and not what was meant. The only way to find one is to use the program and compare what happens with what should.

Try again uses Back one screen and names no screen. It goes wherever the person came from. On this quiz that is the same as naming Question 1. In a quiz with two questions sharing one Not that one screen it is not, which is why it is there.

App Maker is not a text programming language. Children build each rule as a sentence and the app writes the code, which they can read and cannot edit. It has no loops and no lists, a button holds one But if, and numbers are the only kind of data an app remembers. What it does have is the real thing in small: events, a sequence of steps, variables and a conditional, in an app that runs.

Do it together

  1. Open mytekdev.com/try/appmaker?lesson=every-button-goes-somewhere&ref=fam-appmaker-1 together. A short guide opens over the app. Press Try it.

    You'll know it worked when: The phone on the page gets a green ring. It is the working app now.

  2. Tap Start, then tap Venus.

    You'll know it worked when: Nothing happens. Mars and Saturn each go to a screen. Venus goes nowhere.

  3. Press Keep designing. Click Venus on the phone, and under Then go to pick Not that one.

    If you get stuck: If the panel on the right does not show Then go to, click the Venus button on the phone once more.

    You'll know it worked when: A small dark tag on the button says Not that one.

  4. Ask: there is one more button that goes nowhere. How could we find it? Then find it and fix it.

    You'll know it worked when: It is Play again, on the Right! screen. It should go to Space Quiz.

  5. Draw the app on paper: a box for each of the four screens, and an arrow for each button.

    You'll know it worked when: Six arrows. Try again points back to the question.

Talk about it

Ask these while you work together. A child who has understood it can answer them without help:

The third question is the real test: a child who says "I used the app and tapped everything" has the idea of testing. One who says "I looked at every button's panel" found it too, and should be asked how that would go in a bigger app.

For younger and older kids

Younger: For a younger child, stop after both buttons are fixed and ask them to show you by playing the quiz.

Older: For a teenager, add a second question with Ready-made and ask which buttons have to change.

Keep going

Bring it into other subjects

For your records

Ready to copy into an hour log, a portfolio or a transcript.

LessonApp Maker: Every Button Goes Somewhere
SubjectsComputer science, Technology
Time45 minutes
What we didTested a small app to find two buttons that did nothing, fixed each by setting the screen it goes to, and drew the app as a map of screens and buttons.
Skills practicedEvents and navigation; Testing and debugging; Diagramming a program

App Maker: Every Button Goes Somewhere

Activity sheet (optional)

Name: ______________________________ Date: ______________

Open the app: scan the QR code, or go to mytekdev.com/try/appmaker?lesson=every-button-goes-somewhere

Essential question: What happens in an app when you tap a button, and who decided that?

Warm-up: When you tap a button in an app, how does the app know what to do? ____________________________

  1. Vocabulary. Screen, event, navigation, bug, test: write each in your own words.
  2. The button table. For each of the six buttons write: the words on it, the screen it is on, and where it goes when tapped. Put a star by the two you fixed.
  3. The map. On the back, draw a box for each screen and an arrow for each button.

1. The Venus button did nothing when it was tapped. Was the app broken, or doing what it was told? Explain.

2. How did you find the second button that went nowhere? Why is using the app a good way to find a bug?

Quick check

Name: ______________________________

1. An event is (A) a screen in an app (B) something that happens that an app can react to, such as a tap (C) a mistake in a program

2. A button does nothing when it is tapped. The most likely reason is (A) the phone is too slow (B) nobody told the button where to go or what to do (C) the button is the wrong color

3. Name one way to find a bug in an app.

Answers

QuestionAnswerWhy
1BA tap is an event. The app does nothing until one happens.
2BAn app does only what it was told. Then go to was set to Nowhere.
3Use the app and tap everythingAccept: test it, try every button, have someone else use it. "Look at the code" is fine with a reason.

If your state or umbrella school asks, this lesson covers CSTA 2017 2-AP-17, CSTA 2017 1B-AP-15, CSTA 2017 1B-AP-10.