Lesson 6: Practice PT - Encode an Experience

Overview

In this 2-day lesson, students will design their own way to encode a personal experience (such as attending a party, playing a game, etc). The project begins with students doing some top-down design to figure out the components and subcomponents of an experience that are encodable as binary information. Students then select a portion of the experience to flesh out into a more detailed design. The project includes a written reflection questions similar to those students will see on the AP Performance Tasks. While students will complete this project individually, they will exchange feedback with a classmate at one point of the project.

Note: This is NOT the official AP® Performance Task that will be submitted as part of the Advanced Placement exam; it is a practice activity intended to prepare students for some portions of their individual performance at a later time.

Purpose

In terms of Big Ideas in AP CSP this lesson is very much about Abstraction. Abstraction is the practice of temporarily ignoring details to focus only on the most significant or relevant portions of a problem. In the instance of binary information, we know that it's just a sequence of bits underlying even seemingly complex data structures, but we don't have to worry about that all the time. The ability to rely on high-level encodings and temporarily ignore lower-level details is the key to building the complex systems that we use and interact with every day.

The main purposes of this lesson are to:

  • Put a bow on thinking about the digital (binary) representation of information.
  • Practice creating an abstraction of their own design
  • Practice writing in response to an open prompt
  • Submit a written project

The course focuses so much on the digital representation of information because it is probably the most fundamental law of computing. So much of computer science is abstract, but it is all grounded in the laws and limitations of having to represent everything in binary. Internalizing this fact, and internalizing the levels of abstraction that result, we believe is central to what makes a person "good with computers" or "natural" with them. Similarly, being able to take a high-level, human idea and break it down into something that could be computed on is the fundamental essence of what it means to do computing work.

Certainly, it helps a person explain and grapple with abstract computing ideas later on this course. For example, when programming you have to manage complexity in code by breaking things down into smaller procedures and routines. You have to make many choices about how to represent and store the information your program needs. The person who implicitly understands the difference between choosing to use the number 5 instead of the character "5" is more likely to make the right choice.

It's useful to practice the mechanics of producing a project like this on a tight timeline, especially one that includes both design and written elements. It's up to you how much you want to mimic the AP Performance Task process, but this relatively small-scoped project would be a very useful barometer for you and your students to see what it takes to take a project from initial understanding to actual submission of an artifact.

Agenda

Getting Started

Activity (2 days)

Wrap-up

Assessment

Extended Learning

View on Code Studio

Objectives

Students will be able to:

  • Break a complex piece of information down into its component parts such that it could be represented on a computer.
  • Choose appropriate binary encodings for specific pieces of information and justify those choices.
  • Complete a project with written response in a format similar to the AP® performance tasks.

Preparation

  • Determine how you want to collect the project - digitally or on paper - and prepare to explain that to students
  • Determine what (if anything) you want to print for distribution to students
  • Review the "birthday party" example from the activity guide

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the Students

Vocabulary

  • Abstraction - a simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.

Teaching Guide

Getting Started

Discussion Goal

Introduce the term “abstraction” (see paragraph below), and frame the coming project as an opportunity for students to develop their own layers of abstraction.

Teaching Tip

You do not have to give all of these examples if you think students get it, or you have already covered these ideas with some detail. The point is to convey the central importance that developing abstractions and understanding the effects and trade-offs that result from having to represent all information in binary has on pretty much anything having to do with computers.

Remarks

Throughout this unit, we have been building layers of encodings on top of the foundation of bits.

First we learned to develop binary numbers, then ASCII text, then formatted text, and finally color images. High-level encodings are actually quite removed from the underlying bits from which they are made.

In the world of computer science, we call this abstraction - a mental tool that allows us to ignore low-level details when they are unnecessary. This ability to ignore small details is what allows us to develop complex encodings and protocols.

For example, the encoding for an image doesn’t need to know that the RGB values in each pixel are actually 8-bit numbers, and an encoding for formatted text does not care how the ASCII symbols that comprise it are actually represented. As long as there is some way to encode numbers and characters, these high-level encodings will function.

We also do this with the layers of Internet Protocols that we designed. The DNS protocol doesn't need to care or know how the bits are physically being transmitted to and from it, or even how the request is routed to it. That all has to happen of course, but DNS only has to focus on the the higher-level task of mapping a domain name to a number.

Activity (2 days)

Introduce the Project: Encode an Experience

Today we are starting a project in which you are going to apply this idea of abstraction as you set out to build your own encoding and layers of abstraction for a complex piece of information.

The Big Question is: How can you take something complex like a human experience, and break it down so that it could be represented in a computer?

For example: how might you digitally encode the experience of attending a birthday party?

Teaching Tip

If you are comfortable doing it, you should consider demonstrating the birthday party example from the activity guide for the class BEFORE distributing the activity guide to students.

Understanding the requirements of the project might be much easier to understand once students have seen a more fully worked example.

You could simply display the example from the activity guide, or do a more interactive, inquiry-based approach asking students for examples and drawing the diagram on the board as you go. It doesn't need to end up exactly like the one provided in the activity guide, but you could probably coerce students toward it.

Distribute Activity Guide and Project Templates

  • Distribute the Activity Guide: Encode an Experience - Activity Guide. The activity guide contains:

    • A description of the project
    • An example of encoding a birthday party
    • Submission guidelines and Rubric
  • (Optional) Distribute the Encode and Experience Templates - Project Templates. You can collect student work on paper, or digitally free form, or use these templates. This document contains:

    • A page for drawing a diagram
    • A template for the detailed encoding
    • Space for the written reflection
  • Review the project guidelines

  • Review the "Birthday Party" Example

  • Answer questions. Students will need time to understand the extent of the project and expectations for their final product.

Practice PT: Encode an Experience

A proposed schedule of the steps of this project is provided below, as well as more thorough explanations of how to conduct the various stages.

Tip from the Field

A CSP teacher writes in to suggest the following riff on how to get students thinking in terms of data and top-down design.

Tweak the directions slightly to state that students are going to develop an online form which collects information from the user to help them encode their experience. This gets students thinking about these components as "containers" for storing specific instances of the component, rather than storing simply the name of the component itself. This is also a nice preview to chapter 2 of the unit where students start thinking about data collection and analysis.

Day 1

  • Review Project Guidelines and Rubric.
  • Step 1: Choose the experience to encode: Brainstorm ideas.
  • Step 2: Break down the topic -- Create the top-down diagram of the experience chosen.
  • Consult a peer -- Present ideas and provide feedback to each other on progress thus far.
  • Start Step 3: Detailed encoding

Day 2

  • Finish Step 3: Develop a detailed encoding .
  • Respond to reflection Question: There are trade-offs in the digital representation of information
  • Submit project

Selecting an Experience to Encode

Provide students with time to develop a topic of their encoding. Encourage them to pick something they really like, are interested in, or know a lot about. The most important thing is to pick a category of experience rather than a single instance. For example, “taking a trip to the grand canyon” is better than “that time I went to the grand canyon”. You might need to encourage or remind students that ultimately we’re trying to figure out if there is a way to encode this kind of experience in such a way that it could be represented in a computer.

Making the diagram

If you intend to collect this digitally this is an opportunity to have students use a digital tool to make the diagram. The diagrams in the activity guide itself were made simply with the drawing tool provided in Google Docs (Insert -> Drawing). Students could do this directly in the google doc templates provided. Alternatively you can print out the templates and have students draw it by hand.

Either way, in the interest of time some amount of hand-drawing and sketching is probably a good idea. Draw by hand first, then commit to digital form if you're going that route.

Choosing a Peer Reviewer

While the project will be completed individually, students should consult a peer during the process to receive feedback and brainstorm ideas. Either assign pairs or allow students to pick their own.

Teaching Tip

If students are having difficulty developing their encoding, or with any part of the project, encourage them to talk with their peer reviewer. Develop the expectation that prior to asking you for help, students will have consulted one another.

Peer Consultation After students have outlined their encoding, they should meet with their peer reviewers, present their work so far, and provide feedback regarding their progress. Potential Questions to address:

  • Do you think this experience is a good choice? Why or why not?
  • Have I identified the basic elements correctly? Did I miss any?
  • Do you think I will be able to encode this data? What challenges do you think I will have?
  • Do you have any suggestions for the next steps?

Creating the Detailed Encoding Students incorporate feedback from their peer reviewer to develop their encoding. This project can be completed entirely digitally, using the templates provided, but if students will be visually arranging their tables on a poster or on paper, they should be given access to needed supplies.

Written reflection and submission It is likely students will need a decent amount of time to write a response for the written portion of the project.

Communicate to students how they will be submitting their projects and ensure they have the tools necessary to produce and submit their projects.

Wrap-up

Teaching Tip

Gallery Walk: If students create visual representations of their encodings, then you may want to provide time to present their work to their classmates in a gallery walk. Students should hopefully appreciate the diversity of interests and encodings created.

Feel free to exclude the wrap-up activity in the interest of time. Neither is an essential portion of the Performance Tasks and they are included only to provide a more natural conclusion to the project within your class.

Self-assess: It can be a useful exercise to have students briefly assess themselves using the rubric they were provided at the beginning of the project. Ask them to identify points where they could improve, and remind them that this rubric is very similar in structure to the one that will be used on the actual AP Performance Tasks they will see later in the year.

Assessment

  • Rubric: Use the provided rubric in the activity guide, or one of your own creation, to assess students’ submissions.

Extended Learning

  • Ask students to each examine a classmate’s submission and identify potential additions or improvements to the encoding.
  • Locate the most recent Performance Task Descriptions: http://media.collegeboard.com/digitalServices/pdf/ap/ap-computer-science-principles-performance-assessment.pdf
  • Locate the most recent Performance Task Rubrics: http://www.csprinciples.org/home/about-the-project
  • Lesson Vocabulary & Resources
  • 1
  • (click tabs to see student view)
View on Code Studio

Student Instructions

Unit 2: Lesson 6 - Encode an Experience

Background

Throughout this unit you have learned a sequence of increasingly complex encodings of information, with higher level encodings like images and formatted text making use of lower level encodings like binary numbers, ASCII characters, and even lower still the bits themselves. When creating a binary encoding scheme, we do not always have to consider the actual bits. When we say a pixel is composed of three numbers, it is not actually important that those numbers are encoded in bits, just that there exists some way to represent numbers. This practice of temporarily ignoring details which are unnecessary for the problem at hand is referred to as abstraction, and is the source of the complex computational systems we use everyday. Making use of this tool it is possible to encode practically any object, system, event, or idea. For this project you will be designing your own encoding and responding to associated reflection questions. This project serves both as a review of the material covered in the first unit, and as a practice AP Performance Task in anticipation of the two you will complete later this year.

Vocabulary

  • Abstraction: Removing unnecessary details to focus on the essential characteristics. To break problems up into separate parts which can then be solved separately and recombined to form a complete solution. To focus on and use something based only on what it does and without concern for how that functionality is accomplished.

Lesson

  • Select a personally meaningful experience to encode.
  • Design a way to encode it into bits.
  • Consult with a peer to check your thinking.
  • Create a visual representation of your idea.
  • Complete a project description and respond to reflection questions.

Resources

  • Encode an Experience - Activity Guide (PDF | DOCX)
  • Encode and Experience Templates - Project Templates (PDF | DOCX)

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2011)

CL - Collaboration
  • CL.L2:3 - Collaborate with peers, experts and others using collaborative practices such as pair programming, working in project teams and participating in-group active learning activities.
CT - Computational Thinking
  • CT.L2:13 - Understand the notion of hierarchy and abstraction in computing including high level languages, translation, instruction set and logic circuits.
  • CT.L2:14 - Examine connections between elements of mathematics and computer science including binary numbers, logic, sets and functions.
  • CT.L2:7 - Represent data in a variety of ways including text, sounds, pictures and numbers.
  • CT.L2:8 - Use visual representations of problem states, structures and data (e.g., graphs, charts, network diagrams, flowcharts).
  • CT.L2:9 - Interact with content-specific models and simulations (e.g., ecosystems, epidemics, molecular dynamics) to support learning and research.
  • CT.L3A:6 - Analyze the representation and trade-offs among various forms of digital information.
  • CT.L3B:8 - Use models and simulations to help formulate, refine, and test scientific hypotheses.
  • CT.L3B:9 - Analyze data and identify patterns through modeling and simulation.

Computer Science Principles

2.1 - A variety of abstractions built upon binary sequences can be used to represent all digital data.
2.1.1 - Describe the variety of abstractions used to represent data. [P3]
  • 2.1.1A - Digital data is represented by abstractions at different levels.
  • 2.1.1B - At the lowest level, all digital data are represented by bits.
  • 2.1.1C - At a higher level, bits are grouped to represent abstractions, including but not limited to numbers, characters, and color.
  • 2.1.1D - Number bases, including binary, decimal, and hexadecimal, are used to represent and investigate digital data.
  • 2.1.1E - At one of the lowest levels of abstraction, digital data is represented in binary (base 2) using only combinations of the digits zero and one.
2.1.2 - Explain how binary sequences are used to represent digital data. [P5]
  • 2.1.2A - A finite representation is used to model the infinite mathematical concept of a number.
  • 2.1.2B - In many programming languages, the fixed number of bits used to represent characters or integers limits the range of integer values and mathematical operations; this limitation can result in overflow or other errors.
  • 2.1.2D - The interpretation of a binary sequence depends on how it is used.
  • 2.1.2F - A sequence of bits may represent different types of data in different contexts.
2.2 - Multiple levels of abstraction are used to write programs or create other computational artifacts
2.2.1 - Develop an abstraction when writing a program or creating other computational artifacts. [P2]
  • 2.2.1A - The process of developing an abstraction involves removing detail and generalizing functionality.
  • 2.2.1B - An abstraction extracts common features from specific examples in order to generalize concepts.