Photo Editor
Experience: 1st year, 2nd quarter
Practice: Creating computational artifacts, Fostering an Inclusive Computing Culture, Developing and using abstractions, Testing and refining computational artifacts, and Communicating about computing
Concept: Algorithms and Control
Length: 50+
Overview and Purpose
Coders create a photo editor app that alters the appearance of a photo when various buttons are clicked. The purpose of this project is to introduce how to broadcast and receive messages.
Preparation (20+ minutes)
Suggested preparation
Customizing this project for your class (10+ minutes): Remix the project example to include your own photo (perhaps a class photo), buttons, and sequences of code.
(10+ minutes) Read through each part of this lesson plan and decide which sections the coders you work with might be interested in and capable of engaging with in the amount of time you have with them. If using projects with sound, individual headphones are very helpful.
Download the offline version of Scratch: Although hopefully infrequent, your class might not be able to access Scratch due to Scratch’s servers going down or your school losing internet access. Events like these could completely derail your lesson plans for the day; however, there is an offline version of Scratch that coders could use when Scratch is inaccessible. Click here to download the offline version of Scratch on to each computer a coder uses and click here to learn more by watching a short video.
Resources for learning more
- BootUp Scratch Tips
- Videos and tips on Scratch from our YouTube channel
- BootUp Facilitation Tips
- Videos and tips on facilitating coding classes from our YouTube channel
- Scratch Starter Cards
- Printable cards with some sample starter code designed for beginners
- ScratchEd
- A Scratch community designed specifically for educators interested in sharing resources and discussing Scratch in education
- Scratch Help
- This includes examples of basic projects and resources to get started
- Scratch Videos
- Introductory videos and tips designed by the makers of Scratch
- Scratch Wiki
- This wiki includes a variety of explanations and tutorials
Getting Started (6-15+ minutes)
Suggested sequence
1. Review and demonstration (2+ minutes):
Begin by asking coders to talk with a neighbor for 30 seconds about something they learned last time; assess for general understanding of the practices and concepts from the previous project.
Explain that today we are going to create a photo editor that allows you to change the appearance of a photo by pressing different buttons. Display and demonstrate the sample project (or your own remixed version).
Resources, suggestions, and connections
Practices reinforced:
- Communicating about computing
Video: Project Preview (0:54)
Video: Lesson pacing (1:48)
This can include a full class demonstration or guided exploration in small groups or individually. For small group and individual explorations, you can use the videos and quick reference guides embedded within this lesson, and focus on facilitating 1-on-1 throughout the process.
Example review discussion questions:
- What’s something new you learned last time you coded?
- Is there a new block or word you learned?
- What’s something you want to know more about?
- What’s something you could add or change to your previous project?
- What’s something that was easy/difficult about your previous project?
2. Discuss (3+ minutes):
Have coders talk with each other about how they might create a project like the one demonstrated. If coders are unsure, and the discussion questions aren’t helping, you can model thought processes: “I noticed the sprite change appearance when a button was pressed, so I think they used looks blocks. What looks block(s) might be in the code? What else did you notice?” Another approach might be to wonder out loud by thinking aloud different algorithms and testing them out, next asking coders “what do you wonder about or want to try?”
After the discussion, coders will begin working on their project as a class, in small groups, or at their own pace.
Practices reinforced:
- Communicating about computing
Note: Discussions might include full class or small groups, or individual responses to discussion prompts. These discussions which ask coders to predict how a project might work, or think through how to create a project, are important aspects of learning to code. Not only does this process help coders think logically and creatively, but it does so without giving away the answer.
Example discussion questions:
- What would we need to know to make something like this in Scratch?
- What kind of blocks might we use?
- What else could you add or change in a project like this?
- What code from our previous projects might we use in a project like this?
- What kind of buttons could we create for our features?
- What kind of code might they have?
3. Log in (1-10+ minutes):
If not yet comfortable with logging in, review how to log into Scratch and create a new project.
If coders continue to have difficulty with logging in, you can create cards with a coder’s login information and store it in your desk. This will allow coders to access their account without displaying their login information to others.
Alternative login suggestion: Instead of logging in at the start of class, another approach is to wait until the end of class to log in so coders can immediately begin working on coding; however, coders may need a reminder to save before leaving or they will lose their work.
Why the variable length of time? It depends on comfort with login usernames/passwords and how often coders have signed into Scratch before. Although this process may take longer than desired at the beginning, coders will eventually be able to login within seconds rather than minutes.
What if some coders log in much faster than others? Set a timer for how long everyone has to log in to their account (e.g., 5 minutes). If anyone logs in faster than the time limit, they can open up previous projects and add to them. Your role during this time is to help out those who are having difficulty logging in. Once the timer goes off, everyone stops their process and prepares for the following chunk.
Project Work (45+ minutes; 1+ classes)
Suggested sequence
4. Add a photo to your project (10+ minutes):
5 minute review and demonstration
Explain we can add a picture into our project that we find online.
Demonstrate how to save an image from a website or image search, then use the folder to add a sprite from your device. Demonstrate how to give credit on the project page by indicating where sprites were obtained from and copy and paste the original link.
5+ minutes to add images and 1-on-1 facilitating
Give coders time to add an image to their project. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
Resources, suggestions, and connections
Standards reinforced:
- 1B-AP-14 Observe intellectual property rights and give appropriate attribution when creating or remixing programs
Practices reinforced:
- Creating computational artifacts
Video: Add a photo to your project (2:13)
Quick reference guide: Click here
Note: This can lead to a discussion on intellectual property rights and when you can and cannot use images created by other people. Click here for a blog post with resources on the topic, and click here for videos on the topic.
Alternative suggestions: Instead of finding pictures online, coders could select a sprite from the sprite library in Scratch, select from a group of pictures on your class website, or turn a backdrop photo into a sprite by dragging the image on a blank sprite.
A note on using the “Coder Resources” with your class: Young coders may need a demonstration (and semi-frequent friendly reminders) for how to navigate a browser with multiple tabs. The reason why is because kids will have at least three tabs open while working on a project: 1) a tab for Scratch, 2) a tab for the Coder Resources walkthrough, and 3) a tab for the video/visual walkthrough for each step in the Coder Resources document. Demonstrate how to navigate between these three tabs and point out that coders will close the video/visual walkthrough once they complete that particular step of a project and open a new tab for the next step or extension. Although this may seem obvious for many adults, we recommend doing this demonstration the first time kids use the Coder Resources and as friendly reminders when needed.
5. Create custom buttons (10+ minutes):
5 minute demonstration
Explain we want to use buttons to allow the user to change our photo when they press a button. Ask what kinds of blocks might be used to change the appearance of the photo; guide them toward thinking through various looks blocks and motion blocks.
Demonstrate how to make customized buttons in Scratch and briefly talk about how we want to label them so a user can figure out what they will do before they press them.
5+ minutes to create custom buttons and 1-on-1 facilitating
Give coders time to add several custom buttons to their project. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
Practices reinforced:
- Creating computational artifacts
Video: Create custom buttons (2:03)
Quick reference guide: Click here
Suggested questions:
- Will each effect have its own button or can you combine effects?
- Will you create presets (always looks the same way) or make it so clicking the button more than once will continue to change the picture?
- How might we randomize or reset effects?
- Can we undo effects or will they always add more effects to our picture?
6. Code your buttons (15+ minutes)
5 minute demonstration
Demonstrate what happens when the button is pressed and we use the code “when this sprite clicked, change color effect by 25.” Ask the class why our button changed colors and not our picture.
Explain how we want to make it so we can press the button sprite, but have the Picture sprite change appearances instead of the Button sprite. Talk about how we can use the broadcast and receive message blocks to send messages to other sprites; for example, when we press a button sprite, another sprite responds to the button press. In coding terms, this can also be called a “function.” Demonstrate creating a new message and adding the code to your Button and Picture sprites.
When finished demonstrating, ask the class if we can use the same message for each button in our project or if we need different messages for different buttons (we need different messages, or every button will do the same thing).
10+ minutes to code their buttons and 1-on-1 facilitating
Give coders time to code each of the buttons in their project. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
Standards reinforced:
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
Practices reinforced:
- Communicating about computing
- Testing and refining computational artifacts
- Creating computational artifacts
Concepts reinforced:
- Algorithms
- Control
Video: Code your buttons (2:41)
Quick reference guide: Click here
Facilitation Suggestion: Some coders may not thrive in inquiry based approaches to learning, so we can encourage them to use the Tutorials to get more ideas for their projects; however, we may need to remind coders the suggestions provided by Scratch are not specific to our projects, so it may create some unwanted results unless the code is modified to match our own intentions.
Suggested questions:
- Will each effect have its own button or can you combine effects?
- Will you create presets (always looks the same way) or make it so clicking the button more than once will continue to change the picture?
- How might we randomize or reset effects?
- Can we undo effects or will they always add more effects to our picture?
7. Reset a sprite’s appearance (10+ minutes)
5 minute demonstration
Demonstrate several buttons in your project so the Picture sprite looks very different from its original state. Ask the class how we might reset our image so it goes back to its original state.
Discuss how there are multiple events blocks we can use to trigger our reset (e.g., green flag, pressing a certain key on the keyboard, or pressing a button). Ask the class to list off what kinds of blocks they are using to change the way their Pictures look (most likely looks and motion blocks), and to discuss with a neighbor what block would reset it back to its original state. See the quick reference guide or video for examples.
Demonstrate how to add a reset option in your own project and encourage coders to figure out how to use messages to give the user multiple reset options.
5+ minutes to add a reset option and 1-on-1 facilitating
Leave your code on the screen and give coders time to create a reset option in their project. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
Standards reinforced:
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
Practices reinforced:
- Communicating about computing
- Testing and refining computational artifacts
- Creating computational artifacts
Concepts reinforced:
- Algorithms
- Control
Video: Reset a sprite’s appearance (3:41)
Quick reference guide: Click here
Note: There are multiple ways to reset an image using different events and block combinations, so encourage coders to pick a method that matches their project.
Facilitation suggestion: When walking around and asking questions, encourage coders to explain why they need to match blocks within their reset option with the algorithms triggered by the user. Sometimes coders might copy displayed code without questioning if they even need all of the blocks. For example, they might use the “go to” and “point in direction” blocks in their reset algorithm; however, these blocks would be unnecessary if the user cannot change the position or angle of their picture.
8. Add in comments (the amount of time depends on typing speed and amount of code):
1 minute demonstration
When the project is nearing completion, bring up some code for the project and ask coders to explain to a neighbor how the code is going to work. Review how we can use comments in our program to add in explanations for code, so others can understand how our programs work.
Quickly review how to add in comments.
Commenting time
Ask coders to add in comments explaining the code throughout their project. Encourage coders to write clear and concise comments, and ask for clarification or elaboration when needed.
Standards reinforced:
- 1B-AP-17 Describe choices made during program development using code comments, presentations, and demonstrations
Practices reinforced:
- Communicating about computing
Concepts reinforced:
- Algorithms
Video: Add in comments (1:45)
Quick reference guide: Click here
Facilitation suggestion: One way to check for clarity of comments is to have a coder read out loud their comment and ask another coder to recreate their comment using code blocks. This may be a fun challenge for those who type fast while others are completing their comments.
Assessment
Standards reinforced:
- 1B-AP-17 Describe choices made during program development using code comments, presentations, and demonstrations
Practices reinforced:
- Communicating about computing
Although opportunities for assessment in three different forms are embedded throughout each lesson, this page provides resources for assessing both processes and products. If you would like some example questions for assessing this project, see below:
Summative (Assessment of Learning)
The debugging exercises, commenting on code, and projects themselves can all be forms of summative assessment if a criteria is developed for each project or there are “correct” ways of solving, describing, or creating.
For example, ask the following after a project:
- Can coders debug the debugging exercises?
- Did coders create a project similar to the project preview?
- Note: The project preview and sample projects are not representative of what all grade levels should seek to emulate. They are meant to generate ideas, but expectations should be scaled to match the experience levels of the coders you are working with.
- Did coders use a variety of block types in their algorithms and can they explain how they work together for specific purposes?
- Did coders include descriptive comments for each event in all of their sprites?
- Can coders explain how we need to have at least a pair of broadcast and receive messages blocks in order to send messages from one sprite to another?
- Did coders create a project where a photo changes when at least ## different buttons are pressed?
- Choose a number appropriate for the coders you work with and the amount of time available.
Formative (Assessment for Learning)
The 1-on-1 facilitating during each project is a form of formative assessment because the primary role of the facilitator is to ask questions to guide understanding; storyboarding can be another form of formative assessment.
For example, ask the following while coders are working on a project:
- What are three different ways you could change that sprite’s algorithm?
- What happens if we change the order of these blocks?
- What could you add or change to this code and what do you think would happen?
- How might you use code like this in everyday life?
- See the suggested questions throughout the lesson and the assessment examples for more questions.
Ipsative (Assessment as Learning)
The reflection and sharing section at the end of each lesson can be a form of ipsative assessment when coders are encouraged to reflect on both current and prior understandings of concepts and practices.
For example, ask the following after a project:
- How is this project similar or different from previous projects?
- What new code or tools were you able to add to this project that you haven’t used before?
- How can you use what you learned today in future projects?
- What questions do you have about coding that you could explore next time?
- See the reflection questions at the end for more suggestions.