Download presentation
Presentation is loading. Please wait.
1
Lesson 2: Multi-Screen Apps
UNIT 4 – 12/19/17
2
VOCABULARY ALERT: Debugging - Finding and fixing problems in an algorithm or program. Event-driven program - a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click) Event handling - an overarching term for the coding tasks involved in making a program respond to events by triggering functions.
3
Use the setScreen command to change screens with code The Debug Console area is an important tool for programmers. You've seen it display error messages, but you can also have your program display messages there.
4
Debugging is a vital skill for a programmer
Debugging is a vital skill for a programmer. If you cannot debug your own code, you are limited in what you can accomplish. Fortunately, you can learn this skill – keep practicing!
5
This lesson is one of the first times you will likely have consistently generated and responded to error messages. You may (incorrectly) view error messages as “bad,” when in reality they are an entirely normal part of programming and extremely useful when debugging code. In fact, logical error messages, which can be “silent" and don’t generate error messages are much worse, since they are much harder to catch. Use this early moment to normalize getting error messages and needing to debug code.
6
Programming and debugging is like getting dressed up to go out
Programming and debugging is like getting dressed up to go out. You put on some clothes that you think will look good but then you have to look in the mirror, make some adjustments and decisions, maybe even realize you need to go a different direction entirely, and so on – you are debugging your outfit. Writing a program is initially is like throwing on some clothes, and running the program is like looking in the mirror for the first time. You do it to see what it looks like, knowing that you’re going to have to make some adjustments. But looking in the mirror frequently to see what everything looks like together actually speeds up the process. Getting ready to go out, putting on makeup or combing your hair without looking in the mirror would not only slow things down, it’s foolish. The Run. Test. Debug. pattern of behavior is part of the programming process, just like using a mirror is part of making yourself presentable.
7
Are you comfortable adding buttons, images and text to an app
Are you comfortable adding buttons, images and text to an app? Are you comfortable adding a simple onEvent handler for a button or image? Review Lesson 1 if you are not.
8
In the last lesson you ended up making a simple "chaser game" that wasn't much of a game. In this lesson you'll learn improve that app by: adding more screens and adding a way for the game to end.
9
It is recommended that each of you have at least one coding buddy or thought partner to work through these stages with. You can read instructions together, and ask questions of each other. In particular, it's effective to have you do prediction tasks with a partner. You do have to do your own Code Studio work.
10
Work through the Levels in Code Studio
Work through the Levels in Code Studio. Show me the finished game for credit! You also have homework.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.