1 of 179

Table of Contents

Session 1

Session 3

Session 2

  • Transition to Asynchronous

Session 4

  • Transition to Asynchronous

2 of 179

@TeachCode

Virtual Professional Learning Program Summer 2022

Computer Science Principles

As you enter:

  1. Take attendance: https://code.org/pd/KSSY
  2. Get today’s slides: https://sites.google.com/ucsd.edu/cs-a-create-uc-san-diego/slides
  3. Turn on your webcam and say “Hello”
  4. Add your information to Slides 3, 4, and 5

Module 1

Introduction to CSP

3 of 179

Pin your hometown

4 of 179

Drag a Code.org logo to the chart below to share how long you have been an Educator

1-5 6-10 11-15 16-20 25+

Number of Years

5 of 179

Drag a Code.org logo to the chart below to share how long you have taught Computer Science

1 2 3 4 5 6 7 8+

Number of Years

6 of 179

Have you taught AP CSA previously?

Yes

No

@TeachCode

7 of 179

Session 1

8 of 179

Welcome to

the Workshop!

9 of 179

Who’s in the Room?

10 of 179

Who’s in the room?

@TeachCode

Katie Ingram

Taft Charter High School

AP CSP/AP CSA Facilitator

Insert Pic (optional)

Hope Yamada

Facilitator since 2017 (CS F/D/P/A)

Teaching computer related courses K-14 since 2001

@TeachCode

11 of 179

Get to know the people at your “table”!

12 of 179

Getting to Know One Another

You have six minutes to introduce yourself to the people in your breakout room. Share anything you like about who you are and why you’re here!

@TeachCode

13 of 179

Norms

14 of 179

Norms

To help us create a productive and respectful space that is conducive to learning together, we propose the following norms:

  • Be present.
  • Make space and take space.
  • Seek to understand.
  • Take risks.
  • Expect and accept non-closure.

@TeachCode

15 of 179

Program Overview

Program Overview

16 of 179

Code.org’s “Why”

Code.org’s vision for CS education: “every student in every school has the opportunity to learn computer science as part of the their core K-12 education”

@TeachCode

17 of 179

Code.org’s “Why”

Achieving equity in CS education requires that:

  1. All students have access to high-quality CS education
  2. The diversity of students in a CS classroom is representative of the demographics of the school, and
  3. The CS classroom is inclusive for all students

@TeachCode

18 of 179

Code.org’s “Why”

  • Access: the opportunity to learn and experience computer science
  • Diversity: student enrollment rates in computer science courses reflect the demographics of the overall school or community population, particularly in terms of race, ethnicity, gender, economics, and disability status
  • Inclusion: creating learning environments as well as using curricula and resources that are accessible, welcoming and reflective of all students’ identities, backgrounds, differences, and perspectives

@TeachCode

19 of 179

Code.org’s “Why”

Why does Code.org approach its work through the lens of equity?

  • CS not just coding - it’s critical thinking, problem solving and collaboration
  • Parents & guardians want their children to have access to CS but CS education still isn’t available to all students with discrepancies in access falling along lines of race, gender and income level

@TeachCode

20 of 179

Code.org’s “Why”

The most important part of this work is YOU!

Educators play a vital role in supporting equity in CS education, so we have focused our energies on building equity-focused CS curricula and professional learning experiences to support YOU in all this work!

@TeachCode

21 of 179

Program at a Glance

Summer workshop

Ongoing Support

Summer 2022

September 2022 - May 2023

Summer 2023

5 days in-person

  • 8 virtual academic year supports

  • Online supports (teacher forum, etc)

2-Day Capstone

@TeachCode

22 of 179

Program at a Glance

@TeachCode

Teal

Lesson Exploration

Orange

Presentations

Purple

Discussion

Green

Asynchronous

@TeachCode

23 of 179

Introduction to Model Lessons

Teacher - One of the facilitators will act as the “teacher” of a lesson.

Learner - This group acts in the role of “learners” of the lesson

Observer - The other facilitator “observes” the lesson and leads a discussion after the modeled lesson

Just a note…

If you attended Code.org PD in the past you may have taught a lesson in a group. We are not doing that for this PD.

@TeachCode

24 of 179

Our Equity Framework

UNDERSTANDING SELF

How do my experiences, identity, and beliefs shape how I see the world and my role as a CS teacher?

MAKING AND PURSUING A COMMITMENT

What will I commit to in support of equity? How will I know I’m making progress toward that goal? What support will I need from �my community?

UNDERSTANDING CONTEXT

Who has access to CS in my community? What are the demographics of our CS classrooms? Who feels included in those classrooms?

UNDERSTANDING BARRIERS AND OPPORTUNITIES

What challenges stand in my way? And what strategies can I use to overcome those barriers to effect change in support of equity?

UNDERSTANDING RESPONSIBILITY

Given my role and my power, what responsibility do I have to effect change in support of equity?

Cycle of equity-focused development stages

@TeachCode

25 of 179

Question Parking Lot

Be sure to utilize our Question Parking Lot throughout the week!

@TeachCode

26 of 179

High-Level Overview:

Introducing Java Lab

@TeachCode

27 of 179

What Do We Mean By “High Level Overview”?

28 of 179

Introduction to Java Lab

29 of 179

Java Lab: Our Section Code: HCRXMD

Do This:

  • Go to Unit 1, Lesson 2, Level 1 on Code Studio
  • Follow the directions in the level or just play around with the code on the screen

As you explore, consider:

  • What information is included on a screen in Java Lab?
  • How is the code you see here different from other programming languages you might have used in the past? How is it the same?
  • What challenges will students have using Java Lab?

@TeachCode

30 of 179

Java Lab Tour

Tour of Java Lab IDE:

  • Student directions
  • Location of documentation
  • How to run the program
  • Where to write code
  • Where to find errors
  • Location of file name
  • Location of teacher panel
  • Version history

@TeachCode

31 of 179

Java Lab Tour

Other items to remember:

  1. The file name must match the class name.

The fine print: Frequently the main method will be provided to you and you do not need to know the exact syntax for the main method for the AP exam.

  1. The main method is needed to run and test any program you write.

@TeachCode

32 of 179

Unit 1 Lesson 2 - Activity

Java Syntax Rules (a summary)

  • Syntax refers to the rules for writing code.
  • We write statements to tell Java what to do.
  • Java is case-sensitive, which means HELLO and hello refer to different things in a program.
  • We use camel case to capitalize words within names, such as myPainter or MyConsole.
  • Java has keywords, which are words that have a predefined meaning

@TeachCode

@TeachCode

33 of 179

Unit 1 Overview

@TeachCode

34 of 179

Unit 1 Overview

@TeachCode

35 of 179

Up next… a Model Lesson

@TeachCode

36 of 179

Model Lesson Process

37 of 179

What to Expect: Model Lesson details

Model Lesson is an opportunity for you to fully engage as a learner in the lesson

Afterward, an “Observer” facilitates a discussion, or debrief of the lesson that was modeled.

Teacher - This will be one of the facilitators

Learner - This group acts in the role of student

Observer - The facilitator observes the lesson and leads a discussion after the modeled lesson

@TeachCode

38 of 179

Model Lesson #1:

U1L3 - The Neighborhood

@TeachCode

39 of 179

Unit 1 - Lesson 3

The Neighborhood

40 of 179

Warm Up

41 of 179

Do This: On page 4 of your Activity Packet, draw a house.

Unit 1 Lesson 3 - Warm Up

CSA

42 of 179

Hold your drawing up to your camera!

Unit 1 Lesson 3 - Warm Up

CSA

43 of 179

Prompt

What elements does everyone's house have in common?

Unit 1 Lesson 3 - Warm Up

What information might we include if we were to create a blueprint for what all houses should have?

CSA

44 of 179

Activity

45 of 179

Lesson Objectives

  • Explain the relationship between a class and an object
  • Create an object from an existing class
  • Determine the state of an object

Unit 1 Lesson 3 - Activity

CSA

46 of 179

Object-Oriented Programming

As you watch the video, keep an eye out for what object-oriented programming means and what it consists of.

Complete the guided notes on page 4 of the Activity Packet.

Unit 1 Lesson 3 - Activity

CSA

47 of 179

In Java, a class is a programmer-defined blueprint from which objects are created.

A package is a collection of similar classes.

Unit 1 Lesson 3 - Activity

CSA

48 of 179

Welcome to The Neighborhood

As you watch the video, keep an eye out for which classes are in The Neighborhood package and what you can do with them.

Unit 1 Lesson 3 - Activity

CSA

49 of 179

A UML diagram is a standard way to visualize the design of a program.

A UML diagram is helpful for identifying the components of a class.

Unit 1 Lesson 3 - Activity

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

name of the class

CSA

50 of 179

An attribute is a characteristic of an object.

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

Unit 1 Lesson 3 - Activity

attributes

behaviors

A behavior is an action that an object can perform.

We'll be learning what these behaviors do in the upcoming lessons!

CSA

51 of 179

Prompt

What attributes does�a Painter have?

Unit 1 Lesson 3 - Activity

What are things a�Painter can do?

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

CSA

52 of 179

Creating Objects

As you watch the video, keep an eye out for the syntax for creating a Painter object.

Complete the guided notes on the page 6 of the Activity Packet.

Unit 1 Lesson 3 - Activity

CSA

53 of 179

Lesson 3: The Neighborhood

Unit 1 Lesson 3 - Activity

Investigate: The Painter

  • Navigate to Lesson 3, Level 1
  • Investigate the code with your partner
  • Make changes as prompted and observe the results

CSA

Do This:

1

54 of 179

Unit 1 Lesson 3 - Activity

MyNeighborhood.java

1

import org.code.neighborhood.Painter;

2

3

public class MyNeighborhood {

4

public static void main(String[] args) {

5

6

Painter myPainter = new Painter();

7

8

9

}

10

}

To instantiate an object is to call the constructor to create the object.

imports The Neighborhood package so its code is available in our program

gives the name myPainter for a Painter object

calls the Painter class constructor to instantiate the Painter object

CSA

55 of 179

The state of an object is the attributes of an object that are represented by its instance variables.

The attributes of a Painter object are xLocation, yLocation, direction, and remainingPaint.

The default state of a Painter object is (0, 0) facing East with 0 units of paint.

Unit 1 Lesson 3 - Activity

0

1

2

3

4

5

6

7

0

1

2

3

4

5

6

7

CSA

56 of 179

Assume this Painter object has 0 units of paint.

What is the state of this Painter object?

Unit 1 Lesson 3 - Activity

0

1

2

3

4

5

6

7

xLocation = 2

yLocation = 1

0

1

2

3

4

5

6

7

direction = "south"

CSA

57 of 179

A bug is an error�in the code.

Debugging is the process of finding and fixing problems in an algorithm or program.

Unit 1 Lesson 3 - Activity

MyNeighborhood.java

1

import org.code.neighborhood.Painter;

2

3

public class MyNeighborhood {

4

public static void main(String[] args) {

5

6

Painter myPainter = new Painter;

7

8

9

}

10

}

Console

/MyNeighborhood.java:6: error: '(' or '[' expected

Painter myPainter = new Painter;

^

tells us which line caused the error

tells us what Java thinks is missing

shows us the code with a pointer to where the problem occurred

CSA

58 of 179

Create the Painter Object

Lesson 3: The Neighborhood

Unit 1 Lesson 3 - Activity

  • Navigate to Lesson 3, Level 2
  • Run the program to see the error
  • Instantiate the missing Painter object

2

CSA

Do This:

59 of 179

Wrap Up

60 of 179

Unit 1 Lesson 3 - Wrap Up

What is the difference between a class and an object?

Closing

Loop

the

What parts of this lesson were similar to things you have encountered in your life?

What were you confident about? What would you like to practice?

CSA

61 of 179

Today you learned about . . .

  • The relationship between a class and an object
  • How to create an object from an existing class
  • How to determine the state of an object

Unit 1 Lesson 3 - Wrap Up

CSA

62 of 179

Key Vocabulary

object-oriented programming: an approach to creating and using models of physical or imagined objects

package: a collection of similar classes

object: an instance of a class

class: a programmer-defined blueprint from which objects are created

attribute: a characteristic of an object

state: the attributes of an object that are represented by its instance variables

Unit 1 Lesson 3 - Wrap Up

CSA

63 of 179

Key Vocabulary

behavior: an action that an object can perform

constructor: a block of code that has the same name as the class and tells the computer how to create a new object

instantiate: to call the constructor to create an object

bug: an error in the code

debugging: finding and fixing problems in an algorithm or program

Unit 1 Lesson 3 - Wrap Up

CSA

64 of 179

Debrief

65 of 179

Debrief

  1. Learner Reflection (Personal and Table)
  2. Teacher Reflection
  3. Group Discussion

@TeachCode

66 of 179

Debrief

Learner Reflection:

As a learner, what literacy skills did you use during this lesson?

Literacy

Definition: being able to make sense of and engage in advanced reading, writing, listening, and speaking

@TeachCode

67 of 179

Debrief

Teacher Reflection

@TeachCode

68 of 179

Debrief

Whole Group Discussion:

  • Based on what you have seen so far, what literacy skills will students need additional support with?
    • What tools and strategies do you have to support literacy skills in Computer Science?
    • How will using precise language benefit students in the future?

@TeachCode

69 of 179

@TeachCode

8 minute break

Return at XX:XX

  1. Join our classroom section: HCRXMD

70 of 179

Access to and Diversity in CSA

@TeachCode

71 of 179

What is CSA?

72 of 179

Meet the CSA Resources!

The What

The How

@TeachCode

73 of 179

Meet the CSA Resources!

  • Equivalent to a first-semester, college-level course in computer science
  • Introduces students to computer science through programming in the Java programming language
  • The College Board recommends this course for any willing and academically prepared students.
    • Code.org curriculum is intended for students who have prior experience with CS, such as CSP or CSD

@TeachCode

74 of 179

The AP Assessment

75 of 179

Assessment Breakdown + Overview

AP CSA has two assessment parts:

40 Multiple-choice questions

50% of total AP score

90 minutes

4 Free-response questions

50% of total AP score

90 minutes

@TeachCode

76 of 179

AP CSA Endorsed Providers

Code.org is an endorsed provider for AP CSA

What does this mean?

  • The College Board has reviewed our curriculum and Professional Development materials and agreed that it meets their standards!

AP CSA is one of the few courses �where the College Board has endorsed �providers for curriculum and professional �development materials.

@TeachCode

77 of 179

AP CSA Endorsed Providers

Code.org is one of several other endorsed providers

Endorsed providers all provide professional development that cover their curriculum and information about the AP course and exam more broadly.

@TeachCode

78 of 179

Getting Familiar with the CED

79 of 179

Getting Familiar with the Course and Exam Description

CSA Course and Exam Description [link]

Table of Contents�Section 1: About AP (pg. 1 - pg. 10)

Section 2: Course Framework (pg. 11 - pg. 160)

Section 3: Instructional Approaches (pg. 161 - pg. 186)

Section 4: Exam Information (pg. 187 - pg. 206)

Section 5: Scoring Guidelines (pg. 207 - pg. 218).

Section 6: Appendix (Java Quick Reference)

You can find a digital copy at AP Central [link] under the “Course Overview”. [direct link to the CED]

@TeachCode

80 of 179

Computational Thinking Skills

Computational Thinking Practices: Skills (pg. 16)

Practice 1: Program Design & Algorithm Development

Practice 2: Code Logic

Practice 3: Code Implementation

Practice 4: Code Testing

Practice 5: Documentation

@TeachCode

81 of 179

Big Ideas

Big Ideas (pg. 17-18)

@TeachCode

82 of 179

CSA Course Structure

Units and Topics

  • The course content is organized into commonly taught units*
  • Each unit is broken down into teachable segments called topics
    • Topic pages (starting on pg. 36) contain all required content for each topic

*CED Units vary from the units in Code.org curriculum

@TeachCode

83 of 179

CSA Course Structure

CED pg. 22

@TeachCode

84 of 179

CSA Course Structure

How the framework...works

@TeachCode

85 of 179

Course and Exam Description: Our Interpretation

Code.org takes a layered approach.

This structure allows students to develop understanding of the content while simultaneously developing computational thinking skills. Students learn the fundamentals of object-oriented programming (OOP) first, giving them a foundation for the rest of the course while encouraging them to consider the overall design of their programs.

@TeachCode

86 of 179

Course and Exam Description: Our Interpretation

Lessons connected to Essential Knowledge Statements.

Every lesson plan includes the Essential Knowledge Statements from the CED which are connected to the lesson.

@TeachCode

87 of 179

CSA Course Structure

Code.org Units of Instruction

Unit 1: Object-Oriented Programming

Unit 6: Array Lists and String Methods

Unit 2: Class Structure & Design

Unit 7: Method Decomposition and Recursion

Unit 3: Arrays & Algorithms

Unit 8: Searching and Sorting

Unit 4: Conditions and Logic

Unit 9: AP Exam Review & Practice

Unit 5: Two-Dimensional Arrays

CED Units of Instruction

Unit 1: Primitive Types

Unit 6: Array

Unit 2: Using Objects

Unit 7: ArrayList

Unit 3: Boolean Expressions & If Statements

Unit 8: 2D Array

Unit 4: Iteration

Unit 9: Inheritance

Unit 5: Writing Classes

Unit 10: Recursion

vs

@TeachCode

88 of 179

Course and Exam Description: Our Interpretation

Computational Thinking Practices layered throughout the curriculum.

@TeachCode

89 of 179

Understanding Context - CSA Data

90 of 179

Course and Exam Description: Our Interpretation

Consider the following data from AP CSA exams in the past.

  • What do you notice?
  • What do you wonder?

Source: https://code.org/promote/ap

@TeachCode

91 of 179

Code.org Design Choices

92 of 179

Course and Exam Description: Our Interpretation

Code.org’s CSA curriculum implements culturally responsive pedagogy and addressing equity with four main threads:

  • Identity and culture
  • Personally relevant practice
  • Processing and meaning making
  • Software engineering for all

@TeachCode

93 of 179

Course and Exam Description: Our Interpretation

Task:

  • Choose ONE of the 4 “pedagogical threads” to read further about on pages 15 - 18 of the Curriculum Guide
  • After ~4 minutes you will go to the corresponding poster in the room
  • With the other people in your group, write a 3-bullet summary of your thread.

Identity and culture

Personally relevant practice

Processing and meaning making

Software Engineering for all

@TeachCode

94 of 179

High-Level Overview:

Methods and Conditionals in Java

@TeachCode

95 of 179

Introduction to Calling Methods

96 of 179

Calling Methods

@TeachCode

97 of 179

UML Diagram

  • What information does this UML (Unified Modeling Language) diagram give you?
  • What looks familiar?
  • What is new?

For a closer look, the UML diagram can be found in your Activity Packet on page 5.

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

@TeachCode

98 of 179

UML Diagram

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

Class Name

Attribute(s)

Method(s)

@TeachCode

99 of 179

UML Diagram

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

Each method includes:

  • A return type
  • A parameter if needed

@TeachCode

100 of 179

UML Diagram

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

We can call each of these methods on a Painter object.

1. Instantiate a Painter object

Painter mindy = new Painter();

2. Call the method you want to use.

mindy.move();

Name of the Painter object

The dot operator

The name of the method

@TeachCode

101 of 179

Practice Using Methods

Do This:

  • Go to Unit 1, Lesson 4, Level 3 on Code Studio
  • Follow the directions in the level to practice using methods in Java Lab.
    • Reminder: Use the Documentation Tab to find the documentation for methods in the Painter class.

@TeachCode

102 of 179

Introduction to the PLACE

103 of 179

PLACE

Let’s head to the PLACE!https://place.fi.ncsu.edu/course/view.php?id=456

Participant Code:

g06ns7aw

@TeachCode

104 of 179

Transition to

Asynchronous Session 2

105 of 179

Your Assignment: The PLACE

106 of 179

Managing the Asynchronous Session

Support:

  • Zoom Call Open during this Session

Planning your Time:

  • Return to asynchronous discussions throughout the asynchronous session to respond.
  • Decide when you will work, for how long, and when you will take a lunch break.

Be back at

1:20pm

@TeachCode

107 of 179

Identity and Culture

Have students form groups with their peers, encourage pair share, group work, and sharing work (crossover evaluation).

Allow students to safely be themselves, recognize the brilliance of all students, encourage asking questions, making mistakes, supporting each other.

Help teachers build strong relationships with students and students build strong working relationships with each other. Show students representations of themselves. Encourage a growth mindset

Encourage persistence, effort and engagement.

Acknowledging other approaches so that students can build confidence in their coding abilities.

Allow students to “take the lead” by demonstrating to the rest of the class how they solved a problem.

Creating a classroom environment that celebrates the uniqueness of each student so they are comfortable seek and giving assistance to their peers.

@TeachCode

108 of 179

Personally Relevant Practice

A Project Based Learning approach always allows students to work on something of their own selection.

Providing choice in practice and projects makes the content more interesting and valuable to students.

Differentiated practice, connect CS to personal interests, providing choices

Give students opportunities to discover how computer science intersects with their personal interests.

Open ended projects will allow students to bring their creativities, which will help reinforce what they’ve learned

Develop programs/progrjects using industry standard tools like VSCode and Git.

One of my favorite things about the CSP curriculum is the way it allows students to drive their projects in any direction they want, looking forward to similar in CSA.

@TeachCode

109 of 179

Processing And Meaning Making

In my class, I almost require everyone to use their own devices. We have affluent population.

Lots of practice, accessing prior knowledge, opportunities for peer help and reflection, “Show Me How”

Provide multiple representations of information, opportunities for synthesis in many ways

Encourage productive struggle.

Create mini coding exercises that focuses on specific contents but have multiple entry points

Using individual reflections time and sharing solutions to discover alternate ways of solving problems.

Reviewing and spiraling through previous concepts to scaffold up to new content.

@TeachCode

110 of 179

Software Engineering For All

Last year we had speaker come to classroom NailBot, Cosmos Blockchain Network, and UCSD robotic plane club.

Code allows students to see themselves as programmers and engineers by using diverse people working in many fields in their videos.

Also, we practice Agile Software Methodology through the year.

Have guest speakers with whom students can identify and be inspired.

The videos show a variety of careers that require a foundation of computer science

Show how their solutions also solved historical real world problems.

Constantly reinforce how the four (Problem Solver, Creative, Collaborator, and Learner) are used in each lesson. Making students realize that these are done subconsciously.

I have speakers come into my engineering classroom to talk about their work, will likely have CS professionals do the same.

@TeachCode

111 of 179

Async Session #2 and Lunch Break in progress

Return time for Afternoon Session: 1:20pm

112 of 179

Asynchronous

Debrief

113 of 179

Model Lesson #2:

U1L7 Writing Methods

@TeachCode

114 of 179

Previously On … Writing Constructors

Previously On … Writing Constructors

115 of 179

Previously On

How can we add behaviors to what is already possible with the Painter class?

@TeachCode

Create a subclass!

@TeachCode

116 of 179

Previously On

Subclass: a class that extends a superclass and inherits its attributes and behaviors

@TeachCode

117 of 179

Inheritance

As you watch the video, keep an eye out for keywords you need to use for superclasses and subclasses.

@TeachCode

118 of 179

Creating the PainterPlus class

Let’s make the PainterPlus class!

Do This:

  • Go to Unit 1, Lesson 6, Level 2

@TeachCode

119 of 179

Creating the PainterPlus class

Do This:

Commit Your Code!

Commit Code

Save your new subclass to the Backpack.

Here are some questions you might ask during this portion:

  • We are going to make the PainterPlus subclass. What will the name of our file be for this class? (Answer: PainterPlus.java)
  • What is the name of our super class? (Answer: Painter)
  • We need to create our constructor. What will the name of our constructor be? (Answer: PainterPlus. A constructor is a method with the same name as the name of the class.)

@TeachCode

120 of 179

Creating the PainterPlus class

super keyword: a keyword used to refer to the superclass

constructor signature: the first line of the constructor which includes the public keyword, the constructor name, and the values to specify when an object is created

class header: consists of the class keyword and the name of the class

inheritance: an object-oriented programming principle where a subclass inherits the attributes and behaviors of a superclass

Key Vocabulary

@TeachCode

121 of 179

Creating the PainterPlus class

subclass: a class that extends a superclass and inherits its attributes and behaviors

superclass: a class that can be extended to create subclasses

Key Vocabulary

@TeachCode

122 of 179

Creating the PainterPlus class

How might we use the vocabulary to describe the code we just wrote?

Examples:

PainterPlus is a subclass of the Painter class.

PainterPlus inherits from the Painter class.

Key Vocabulary

Vocabulary

super keyword

constructor signature

class header

inheritance

subclass

superclass

@TeachCode

123 of 179

Creating the PainterPlus class

So far our PainterPlus objects won’t have any new behaviors… we just wrote the constructor.

Remember…

@TeachCode

124 of 179

Hats on!

Teacher - This will be one of the facilitators

Learner - This group acts in the role of student

Observer - The facilitator observes the lesson and leads a discussion after the modeled lesson

@TeachCode

125 of 179

Lesson

126 of 179

Unit 1 - Lesson 7

Writing Methods

127 of 179

Warm Up

128 of 179

Prompt

Do all birds have the same attributes and behaviors as a Bird?

Unit 1 Lesson 7 - Warm Up

Do these birds have additional attributes and behaviors?

Should these additional attributes and behaviors be accessible by the Bird class?

Bird

Penguin

Hawk

HOLD thatTHOUGHT

CSA

129 of 179

Activity

130 of 179

Lesson Objectives

  • Write a void method in a subclass
  • Differentiate between calling and writing a method
  • Identify when to write a method in a superclass or a subclass

Unit 1 Lesson 7 - Activity

CSA

131 of 179

Writing a Method

As you watch the video, keep an eye out for the syntax for writing a method.

Complete the guided notes on page 8 of your Activity Packet

Unit 1 Lesson 7 - Activity

CSA

132 of 179

Prompt

What does it mean for a method to be a void method?

Unit 1 Lesson 7 - Activity

public void move() {

// code to make a Painter object move

}

HOLD thatTHOUGHT

CSA

133 of 179

A void method is a method that performs an action�but does not return a value.

Unit 1 Lesson 7 - Activity

public void move() {

// code to make a Painter object move

}

CSA

134 of 179

Prompt

What are the similarities and differences between calling methods and writing methods?

Unit 1 Lesson 7 - Activity

Writing a Method

public void move() {

// code to move

}

Calling a Method

myPainter.move();

HOLD thatTHOUGHT

CSA

135 of 179

When we call a method, we specify the object followed by the dot operator then the name of the method we want to use.

Writing a method is giving the instructions that should occur when the method is called.

Unit 1 Lesson 7 - Activity

Writing a Method

public void move() {

// code to move

}

Calling a Method

myPainter.move();

CSA

136 of 179

Unit 1 Lesson 7 - Activity

PainterPlus.java

1

import org.code.neighborhood.Painter;

2

3

public class PainterPlus extends Painter {

4

5

public PainterPlus() {

6

super();

7

}

8

9

public void myNewMethod() {

10

// code for new method

11

}

12

}

To write a method, we write the keyword public.

Then we specify�the return type.

Then we write the name�of the method.

This line makes up the method signature.

Inside the method body, we write the code for what the method should do when it is called.

CSA

137 of 179

Prompt

What does a PainterPlus object need to do to turn right?

What would we write in the body of the turnRight() method?

Unit 1 Lesson 7 - Activity

HOLD thatTHOUGHT

CSA

138 of 179

Do This: Add the turnRight() method to the PainterPlus UML diagram (Page 7 of your Activity Guide)

Unit 1 Lesson 7 - Activity

PainterPlus

turnRight()

Painter

xLocation

yLocation

direction

remainingPaint

void turnLeft()

void move()

void paint(String color)

void scrapePaint()

int getMyPaint()

void takePaint()

boolean isOnPaint()

boolean isOnBucket()

boolean hasPaint()

boolean isFacingNorth()

boolean isFacingEast()

boolean isFacingSouth()

boolean isFacingWest()

String getColor()

int getX()

int getY()

String getDirection()

void setPaint(int paint)

boolean canMove()

boolean canMove(String direction)

CSA

139 of 179

Writing and Using a New Method

Lesson 7: Writing Methods

Unit 1 Lesson 7 - Activity

  • Navigate to Lesson 7, Level 1
  • Write the turnRight() method in your PainterPlus class on Level 1
  • Use your new turnRight() method on Level 2
  • Debug the program on Level 3

BREAK OUT GROUPS (3 people: 15 Minutes)

CSA

Do This:

1

140 of 179

Prompt

Why would we write a new method in the subclass instead of in the superclass?

Unit 1 Lesson 7 - Activity

xLocation

yLocation

direction

remainingPaint

. . .

Painter

PainterPlus

xLocation

yLocation

direction

remainingPaint

. . .

HOLD thatTHOUGHT

CSA

141 of 179

Unit 1 Lesson 7 - Activity

MyNeighborhood.java

1

import org.code.neighborhood.Painter;

2

3

public class MyNeighborhood {

4

public static void main(String[] args) {

5

6

Painter myPainter = new Painter();

7

myPainter.turnRight();

8

9

}

10

}

Console

/MyNeighborhood.java:7: error: cannot find symbol

myPainter.turnRight();

^

symbol: method turnRight()

location: variable myPainter of type org.code.neighborhood.Painter

A superclass can't access the methods in a subclass!

CSA

142 of 179

Warm Up

143 of 179

Prompt

What errors did you encounter�while writing your code?

Unit 1 Lesson 7 - Wrap Up

How did you find and fix the error?

HOLD thatTHOUGHT

CSA

144 of 179

Debugging Wall

Do This: Choose a strategy to add to the Debugging Wall.

Error Messages

Unexpected Results

Unit 1 Lesson 7 - Activity

strategy

strategy

CSA

145 of 179

Today you learned about . . .

  • Writing a void method in a subclass
  • The difference between calling and writing a method
  • When to write a method in a superclass or a subclass

Unit 1 Lesson 7 - Wrap Up

CSA

146 of 179

Key Vocabulary

method signature: consists of a name and parameter list

Unit 1 Lesson 7 - Wrap Up

CSA

147 of 179

Debrief

148 of 179

Debrief

Learner Reflection:

In the CSA curriculum, we have created a number of videos to support content instruction.

  • As a learner, how did the video itself help you understand the content?

@TeachCode

149 of 179

Debrief

Teacher Reflection

@TeachCode

150 of 179

Debrief

Whole Group Discussion:

When watching a video in the classroom, Common Sense Media has the following three tips for making sure students aren’t just passively watching the video but actually comprehending the content [link]:

  • Have students take notes as they watch.
  • Pause to ask questions as you watch.
  • Offer multiple viewings of the video

@TeachCode

151 of 179

Debrief

Whole Group Discussion:

  • As a teacher, what strategies have you found helpful when showing videos in your classrooms?
  • As a teacher, what do you need to do before, during, and after a video to help students comprehend the material?

@TeachCode

152 of 179

@TeachCode

8 min Break

153 of 179

High Level Overview:

Syntax in Java

154 of 179

Reflect on Where We Are in the Unit

Reflect on Where We Are in the Unit

155 of 179

Unit 1 Overview

Open up to page 33 of your Curriculum Guide and look at the Unit 1 overview

@TeachCode

156 of 179

Unit 1 Overview

Model Lessons

High-level Overviews

This is the Model Lesson we just did!

Asynchronous Time

@TeachCode

157 of 179

While Loops

158 of 179

While Loops

Do This:

  • Go to Unit 1, Lesson 9, Level 1

Prompt:

  • What parts of this code is new? What haven’t students seen yet?

@TeachCode

159 of 179

While Loops

As you watch the video, keep an eye out for the syntax for writing a while loop.

@TeachCode

160 of 179

While Loops

Prompt:

  • In what ways might students use while loops in The Neighborhood?

@TeachCode

161 of 179

While Loops

Lesson 9 - Loops, an Overview:

  • Students create a plan for implementing the takeAllPaint() method and the paintLine() method on paper
  • Students then implement their pseudocode in JavaLab
  • Students talk about what makes code efficient
  • Students do a Code Review.

@TeachCode

162 of 179

Two-Way Selection Statements

163 of 179

Two-Way Selection

Do This:

  • Go to Unit 1, Lesson 10, Level 1
  • Share your predictions!

Prompt:

  • What parts of this code will be new to students?

@TeachCode

164 of 179

Two-Way Selection

As you watch the video, keep an eye out for the syntax of an if-else statement and the purpose of the NOT ( ! ) logical operator.

@TeachCode

165 of 179

Two-Way Selection

Pseudocode is a plain language description of the steps in an algorithm.

while the Painter is on a paint bucket

take paint

while the Painter has paint

paint yellow

if the Painter can move forward

move forward

@TeachCode

166 of 179

Two-Way Selection

Do This:

With a partner, write pseudocode for the moveSouth() algorithm.

The moveSouth() method should move the painter south while it is able to to move south. At the end, the painter should be facing south.

Start �state

End �state

@TeachCode

167 of 179

Two-Way Selection - live coding

Do This:

Add the moveSouth() algorithm to your PainterPlus class.

Go to U1L10 - Level 3.

@TeachCode

168 of 179

Transition to Asynchronous

Session 4

169 of 179

Reflecting on the Day

170 of 179

Wrap up

Journal Prompts:

  1. What did you learn today that surprised you?
  2. What questions or concerns do you have after today?
  3. What do you want to learn or know more about and why?

@TeachCode

171 of 179

Wrap up

Add Gots and Needs!

GOT

NEED

The CED

More Bacon!

@TeachCode

172 of 179

GOTS

How to navigate the resources that are available

How to commit code and use the backpack from lesson to lesson.

Familiarity with Painter class teaching tool

How to use the code.org tools and platform and the resources included

Using JavaLab and its console

@TeachCode

173 of 179

NEEDS

How to keep classes moving with a variety of skill/ability levels.

More pointers/questions for students on how to elicit student comments for discussion goals.

How to make sure students are not scared and frustrated early on.

A discussion of all things assessment: the AP Exam, the Unit Exams, FRQs…

@TeachCode

174 of 179

Parking Lot Wrap

Clear out the Parking lot!

@TeachCode

175 of 179

Your Assignment: The PLACE

176 of 179

Managing the Asynchronous Session

Support:

  • Zoom Call Open during this Session

Planning your Time:

  • Return to asynchronous discussions throughout the asynchronous session to respond.
  • Decide when you will work, for how long, and when you will take a break.

Facilitators available until XX:XXpm

@TeachCode

177 of 179

Take the daily survey!

Please fill out the end of day survey!

studio.code.org/pd/workshop_survey/day/1

Background on this survey:

  • Code.org sees responses and makes changes to the workshop based on your feedback.
  • Facilitators see de-identified responses and use the feedback to inform the next day’s workshop.
  • Regional partners may also use this data to make adjustments.

@TeachCode

178 of 179

Async Session #4 in progress

179 of 179

Parking Lot

Enter questions here

Is code.org making Unit Guides for AP CSP as well? - It has been asked for… but it isn’t in the immediate plans - :(

@TeachCode