Part of Unit: AP Concepts Using BYOB/SCRATCH
Lesson Plan Overview / Details
CREATE VISUAL DESIGNS USING CUSTOM SCRATCH BLOCKS
BYOB is an extension of Scratch which was created at MIT to teach programming using a visual drag and drop environment. Scratch comes with a number of built-in blocks which allow users to create sprites (basically objects) which have variables, operators, and control structures, as well blocks which are used to animate them, such as motion blocks.
BYOB is UC Berkeley's version of Scratch. It is currently (2011) being piloted as a platform for a revised Advanced Placement Computer Science course.
As APCS currently stands, BYOB is a perfect platform for scaffolding important concepts such as Java methods. This unit is primarily designed for Advanced Placement Computer Science teachers who would like a scaffolding tool, but can also be used by Scratch teachers who would like to teach advanced programming concepts.
BYOB stands for Build Your Own Blocks. In this lesson, students will become familiar with the BYOB environment and learn how to create their own blocks. The first lesson will focus on pattern building with motion blocks.
IMPORTANT NOTE: All source files can be download from within each lesson. The source files end with a ypr extension. They can only be opened using the BYOB version of Scratch.
- 2 Class Periods
California Career and Technical Education Standards
- IT.D.D2.1 Know the fundamentals of programming languages and concepts.
- IT.D.D2.2 Compare programs by using control structures, procedures, functions, parameters,...
California Academic Content Standards (Reinforced)
- ELA.9-10.R.CAGT.2.6 Demonstrate use of sophisticated learning tools by following technical direction...2
Objectives and Goals
- Learn how to use the block editor in BYOB/Scratch
- Learn how to create a command block
- Learn how to create a command block which creates motion
- Use a custom-built block in a repeat loop on the main stage
- Learn how to create a block which takes a parameter
- Experiment with creating custom motion blocks with various attributes such as color, size, rotation
Activities in this Lesson
- Hook - Hooks / Set
Here is a link to a youtube video of the completed project.:
Display on overhead projector.
Students see this as they walk into class.
Ask students if they've seen spirographs before. Ask them how they might construct such a pattern.
- Introductory Activity - Demo / Modeling
Create your own BYOB/Scratch blocks to generate patterns!
At this point, students should have some passing familiarity with the basic BYOB/Scratch interface. Remember that Scratch is a subset of BYOB. It includes all of the tools except the ability to create custom-built blocks. Students should already be familiar with motion blocks and repetition. This is the initial transition into BYOB. The teacher will first model how to draw a square using the built-in blocks and then create a custom block which will draw a square.
Now we will create a custom reusable block which draws a square.
First, click variables. At the bottom of the variable block area, click "Make a block." Make sure motion is selected.
Now you will implement the blocks which will create a custom-built square block.
Now your are ready to create a sprite which will make use of your new "square" block.
You must first create a sprite in BYOB/Scratch. In the sprite editor, create a sprite which is simply a dot or small circle or square.
Notice that the square block appears within the repeat block. Since there is a rotation within the repeat block, a circular pattern is drawn which makes use of a square shape within it. You can set the number of repeated shapes by dividing 360 (the number of degrees in a circle) by a number such as 15 or 45 or 90 to draw the shape a specified number of times.
- Guided Practice - Check Understanding
After students have created the custom "square" block in the previous activity, they will create a new BYOB/Scratch file in which they create a custom motion block that draws a shape of their choice. The shape make be a multisided polygon, an elliptical shape, or an abstract shape.
The students extend the activity by including the shapes in a repeat block and by having multiple sprites. Include other visual aspects and concepts such as random numbers and color changes.
- Passing Information to Blocks - Demo / Modeling
A Scratch block is very similar to a method in Java.
A Scratch block can act on its own or it can have information passed in to it.
In Java, this is called a parameter.
To illustrate this concept, a second version of the square block is created in which you can pass in the length of the side.
Here is the revised version of the custom square block:
- Experimenting with Custom Motion Blocks - Independent Practice
As a culminating activity, students should create a number of custom motion blocks in which various kinds of information are passed in to the blocks.
color, size, number of rotations, radius...
The blocks will be used in the main stage along with additional scripting to create a visual design.
- Assessment Types:
- Rubrics, Projects, Demonstrations,
Students will turn in BYOB/Scratch files electronically OR
Students will demonstrate a single project which incorporates all four main ideas listed below.
20 points - Create a square block
20 points - Create a square block which takes a parameter
30 points - Create a square block which sets attributes such as pen color, size,etc.
30 points - Create a number of custom motion blocks