1 of 31

Modularity

3-5 Computer Science Modules Series

A subconcept of

Algorithms and Programming

4.AP.M.1: Explore how complex tasks can be decomposed into simple tasks and how simple tasks can be composed into complex tasks.

5.AP.M.1: Demonstrate how to decompose a task of complexity into simple tasks and compose a simple task into tasks of complexity.

5.AP.M.2: Modify, incorporate, and test portions of an existing program into their own work, to develop something new or add more advanced features.

2 of 31

Overview of the Lesson

If you find a dead link or error, please report it by completing this form.

3 of 31

What Real-World Problem Does the Standard Address?

Elementary teachers, and teachers in general, tend to be very good at breaking down, or decomposing, ideas so that students understand them better. For students in the intermediate grades, it is still important to simplify problems into precise sequences of instructions as they transition from concrete to more abstract thinkers at this age. This video is describing a process that may or may not be familiar to you in your teaching of the Nevada Academic Content Standards in math as related to decomposition of numbers in division. In the video, the woman discusses an approach to division by decomposing what can be a rather complex task for elementary students, and she clearly spells out the approach in words written on the board.

  • Can you see how she is decomposing the problem?
  • Is there a precise sequence that would be followed each time a similar problem is encountered?
  • Do both decompositions lead to the same outcome?
  • Can you think about how those simple tasks could be reversed to compose the original, more complex task?
  • And finally, how is she taking existing math skills and incorporating them into a new, more advanced math strategy?

4 of 31

Your Turn

What specific steps does the teacher in the video take to break down the division problem?

In what ways do the different decomposition strategies affect the outcome of the problem, and how are those outcomes similar or different?

How is video connected to this computer science standard?

5 of 31

What Does the Standard Say?

In this section you will examine the standard and think about the learning targets and potential ways of measuring student understanding of the concept by addressing the session question, "What does the standard say?"

6 of 31

Deconstructing the Standard

Examine how a colleague would interpret the parts of the standard for a student or parent. As you read, think about how you would help a parent interpret the standard language, if you would use the same common understandings, and why it would be important to interpret the standard.

Standards: 4.AP.M.1 Explore how complex tasks can be decomposed into simple tasks and how simple tasks can be composed into complex tasks. 5.AP.M.1. Demonstrate how to decompose a task of complexity into simple tasks and compose a simple task into tasks of complexity.

Standard Language

Common Understanding

decompose

To decompose something from a computer science perspective means to break a relatively complex problem into its component parts so that it is easier to conceive and understand, which in turn leads to making it easier to program and maintain. If you were to write a "program" to make a peanut butter and jelly sandwich, for instance, you could break the problem down into the component parts of getting out the supplies, putting the materials together, and cleaning up. Each of those three parts, in turn, could be further broken down. The "getting out the supplies" portion might involve taking two slices of bread from the package, getting the peanut butter out of the refrigerator and opening the lid, taking a plate out of the cupboard, and getting a bread knife from the silverware drawer.

7 of 31

Deconstructing the Standard

Examine how a colleague would interpret the parts of the standard for a student or parent. As you read, think about how you would help a parent interpret the standard language, if you would use the same common understandings, and why it would be important to interpret the standard.

Standards: 4.AP.M.1 Explore how complex tasks can be decomposed into simple tasks and how simple tasks can be composed into complex tasks. 5.AP.M.1. Demonstrate how to decompose a task of complexity into simple tasks and compose a simple task into tasks of complexity.

Standard Language

Common Understanding

compose

Computer scientists compose parts of programs by taking simpler, less complex parts, and combining them into complicated, more complex parts. Dancers, for instance, do this same sort of thing. A choreographer will start by introducing and practicing small movements that are important to master. Those movements will then be combined into various sections of increasing complexity in a performance. Once one section is mastered, another section will be rehearsed in the same way. When all the sections are complete, they will all be combined, or composed, to form an entire, highly complex performance. Dancers, then, follow a process similar to computer scientists as they move from simpler to more complex tasks.

8 of 31

Deconstructing the Standard

Examine how a colleague would interpret the parts of the standard for a student or parent. As you read, think about how you would help a parent interpret the standard language, if you would use the same common understandings, and why it would be important to interpret the standard.

Standards: 5.AP.M.2 Modify, incorporate, and test portions of an existing program into their own work, to develop something new or add more advanced features.

Standard Language

Common Understanding

test

Testing of computer programs is running them to make sure that they work as intended. The intention of testing is to find and fix any bugs in the program and to make sure that it meets the requirements for which it was designed, responds correctly to what is input, and executes in an acceptable amount of time. When an automobile manufacturer puts out a new model of a car, they drive it for many miles with many different drivers and under varying road, weather, and other conditions. The intent is to make sure it does not have any fatal flaws, responds as it should to the driver's commands, and generally performs the functions we expect of a car. All these mechanical tests are similar to what would be performed for a computer program.

program

This is a set of instructions through which a computer works. When it is run, a program performs the specific task that the programmer has set for it. As humans, we essentially program everything we do by running a set of instructions through our internal computers--our brains. These sets of instructions can take the form of sequences, events, loops, and conditionals.

9 of 31

The Embedded Content of the Standard

4.AP.M.1 Explore how complex tasks can be decomposed into simple tasks and how simple tasks can be composed into complex tasks.

5.AP.M.1 Demonstrate how to decompose a task of complexity into simple tasks and compose a simple task into tasks of complexity.

Earlier you watched a video with a method for decomposing a division problem. Take a couple minutes now to list 3 to 5 other parts of your math, reading, writing, science, or social studies curriculum that you already decompose. Consider to what level you break down each of those pieces and why you do it.

Another task teachers decompose with students is their writing. They often use a writing process like the one seen in the following video.

As it mentions, this process does need to be explicitly taught. If a student were to take on the complex task of writing without breaking it into these component parts, the end result and the learning would not be the same. Students would be confused about what to do and how to write at the level expected. Therefore, decomposing the complex task of writing into simpler tasks is essential.

10 of 31

The Embedded Content of the Standard

Let's step away from the teacher role for a moment now and consider the decomposition part of this standard from a real-world context. You have probably encountered a leaky faucet at one point or another. As you watch this video, think about how the man had to break this problem down into many component steps and how he had to arrange the video in a very precise sequence so that you could watch and understand how to complete the task.

If he had broken it down to tasks that weren't as simple or had shown the steps out of sequence, you would not be successful in following along. Let's now consider the other part of this, which is just the opposite--taking simple tasks and composing them into complex tasks. Stop for a couple minutes to see if you can think of examples of this in the real world.

How about these?

  • Doing the "simple" tasks of pouring the foundation, framing, roofing, drywalling, and finishing work to build a house.
  • Taking out trash, vacuuming, and cleaning bathrooms to clean a school.
  • Digging the hole, filling it with soil, and stabilizing it with poles to transplant a tree.

11 of 31

The Embedded Content of the Standard

As you've maybe already discovered, someone had to think about these tasks as ones of greater complexity and break them down to these simpler tasks, so the parts of this standard are tightly interconnected.

Speaking of interconnected, here's a perfect example of how you might look at the composing piece of this standard by bringing some art into the picture. After students build many simple pieces, eventually they all come together as one work of art.

Teaching Math with Modular Origami

Site from: (LINK)

12 of 31

The Embedded Content of the Standard

There are examples everywhere in your curriculum to make this standard relevant for your students. Now that you are aware of it, you can begin to use the language of this standard.

  • In math, you can break down and sequence steps in problems.
  • In reading, you can decompose the parts of a story and talk about their sequence.
  • In writing, you could have your students choose real-world ideas to write about. Some ideas include how to make a peanut butter and jelly sandwich, brush their teeth, draw a shape, or move a character across the screen.
  • In math, you can combine the simpler steps of addition, subtraction, multiplication, and division to help students see how they are composed into a method for solving long division problems.
  • In reading, you might give students several prefixes, suffixes, and roots that work together to compose many different words.
  • In writing, you can have students prepare the beginning, middle, and end of a story to see how the pieces composed together make up a complete story.

13 of 31

The Embedded Content of the Standard

These same concepts all apply to computer science as well. When students are coding, they often need to break down a problem into smaller steps. When they look at the problem as a whole, it can seem overwhelming. Try solving this relatively complex second-grade puzzle, and as you do so, think about the components of this standard. Are you breaking it down into smaller chunks to solve it? Do you need to have a precise sequence of steps to solve it? Note that you should optimally be able to use just six programming blocks as noted in the "Workspace" area in the purple bar. If you get stuck, click the light bulb up to three times for hints. And when you're done, you'll notice that you've composed all those simple tasks to make a more complex task. Persist. You can do this!

The first hint begins to help you decompose the problem when it says, "This pattern looks harder than it is! Start with a simple stair step. Does that cover all of the scrap metal?" If you can program one "stair," that's a good start. Then, you need to decide precisely how many times to loop, or repeat, that sequence. As students do coding, you'll find that they are constantly decomposing, especially as the tasks become more and more difficult. You're eventually composing those simple tasks to provide the full solution to a more complex problem

That process is exactly what computer programmers do in their jobs all the time. Imagine taking on the task of programming an accounting software package. Instead of tackling the entire thing as a whole, it would almost certainly be broken down using a modularity approach whereby one team might code the accounts payable module, another might work on the accounts receivable module, and yet another team could be tasked with the payroll module. The teams would need to coordinate and work together, of course, to ensure a seamless end product by joining all their modules together to compose a complex piece of commercial software. What students learn early on about decomposing and composing tasks in regard to this standard for grades 3 to 5 relates to the larger theme of modularity as they progressively learn more and more computer science skills.

14 of 31

The Embedded Content of the Standard

5.AP.M.2 Modify, incorporate, and test portions of an existing program into their own work, to develop something new or add more advanced features.

Let's think about where bits of this standard are happening around us. What about car manufacturers? Do you notice how the body style of cars has evolved over time and how most cars start to take on a similar look as designs are modified by incorporating new ideas of others? And what about those designs? Some might be new just to be fun, but others have evolved as a more advanced feature of a car by making it more aerodynamic and, thus, more fuel efficient.

Cell phones are another excellent example. Think about how new or more advanced features have made their way into the devices we use daily. After the first touch-screen phones came into existence, other manufacturers began to see how this was an important and useful feature, so they began to modify their phone designs to include this more advanced way of interacting with our phones.

Now it's time to get personal. How does this standard relate to your job as a teacher? As you watch this video, think about how it touches on the pieces of this standard.

15 of 31

The Embedded Content of the Standard

Teaching in the 21st century has certainly been modified by incorporating technology. The technology is tested to see how it works in practice in education. If it can provide for more student-centered learning, it could be seen an advancement. Don't be fooled by the fact that this video was about how technology changes the way we teach, though, because you could probably apply this to almost every change, even low-tech changes, that come along in education.

This standard is perhaps one of the most advanced computer science standards for elementary students. It forces them to think at much higher levels. First, they must analyze their work and decide what could be made new or better. Then, they are tasked with finding existing programs that they can use to modify their own programs. Finally, they have to figure out how to actually incorporate that work.

Once students understand that programs can be broken down into smaller parts, they come to realize that those pieces can be incorporated into new or existing programs. For example, a student could modify existing code from a single-player game to create a two-player game that has slightly different rules. Another option could be to remix and add another scene to an animated story. A student might also find code that makes a ball bounce in another student's program and incorporate that into their own new basketball game.

Nearly any programming language students use lends itself to this standard. For instance, Scratch has a built in "remix" feature that allows students to take others' code and change it to make something different. Of course, they need to be sure to give the original author credit.

16 of 31

The Embedded Content of the Standard

Code.org activities lend themselves to this as well. In the CS Fundamentals series, students in grades four and five, as they work through courses E and F, encounter capstone projects at the end of the courses. There are opportunities for them to write code, review work others have done, and revise their own code. In effect, they are considering which smaller pieces of their programs could be modified. Then, they incorporate changes and do tests to make sure that it does what they expected that is new or more advanced.

In fact, let's take a look right now at the following piece from the Code.org capstone project in Course E. Where do you notice this standard in the document?

The Design Process - Rubric

Yes, much of this rubric is what this standard is all about. This is the crux of what computer science in elementary is--planning, creativity, logic, and problem solving. It's what makes computer science a foundational piece of the curriculum.

17 of 31

Achieving the Standard

Learning Targets

(Student Friendly Language)

Assessment Targets

(Student Evidence)

Standard: 4.AP.M.1 Explore how complex tasks can be decomposed into simple tasks and how simple tasks can be composed into complex tasks.

  • I can find ways that others break down more difficult tasks into easier tasks.

  • I can find ways that other combine easier tasks into more difficult tasks.
  • Students take a given complex task and find ways that others have decomposed it into simple tasks.
  • Students take a given set of simple tasks and find ways that others have composed them into more complex tasks.

18 of 31

Achieving the Standard

Learning Targets

(Student Friendly Language)

Assessment Targets

(Student Evidence)

Standard: 5.AP.M.1 Demonstrate how to decompose a task of complexity into simple tasks and compose a simple task into tasks of complexity.

  • I can create and show ways to break down more difficult tasks into easier tasks.

  • I can create and show ways to combine easier tasks into a more difficult task.
  • Students take a given complex task, and they create and show ways that they could decompose it into simple tasks.
  • Students take a given set of simple tasks, and they create and show ways that they could compose them into a more complex task.

19 of 31

Achieving the Standard

Learning Targets

(Student Friendly Language)

Assessment Targets

(Student Evidence)

Standard: 5.AP.M.2 Modify, incorporate, and test portions of an existing program into their own work, to develop something new or add more advanced features.

  • I can make changes to my program by looking at what others have done so that it does something new or better.
  • I can use parts of others' programs, with their permission, to make my program do something new or better.

  • I can run tests of my programs that have been changed to be sure they work correctly.
  • Students study programs others have written to get ideas for how to make their own work new or more advanced.
  • Students take parts of programs others have written and, with the original creator's permission, incorporate that work into their own programs with the intent of making them new or more advanced.
  • Students test programs they have modified or incorporated new parts into in order to verify that they work correctly.

20 of 31

Your Turn

With respect to the standard, tell about three things you learned?

What are a couple other real-world connections you can make to this standard?

21 of 31

What Could This Look Like for My Students?

Think about what activities you would want your students to do in your classroom to develop their understanding.

1. Generate 3 lesson activities or ideas that would help students reach mastery of the standard.

2. Use the learning targets from the previous section as a guide of what students need to know.

3. Focus on the standard as an end goal.

22 of 31

Your Turn

1

2

3

Describe in at 3-5 sentences each of the 3 lesson activities or ideas you came up with according to the instructions on the previous slide.

23 of 31

What Resources Could Support Further Implementation?

In this final section, you will use your knowledge of the standard to examine some potential resources. When you look through the resources, it is important to recognize that students need to actively participate in developing their understanding.

24 of 31

Resources About the Content

Code Reuse and Modularity in Python

What is here: Read just the "Modularity" section to get the main idea of why students work on this standard at this basic level so that they are able to tackle the greater concept of modularity at later stages.

Resource Link: https://programminghistorian.org/lessons/code-reuse-and-modularity#modularity

25 of 31

Resources for Lesson Ideas

Teaching Math with Modular Origami

What is here: This was referred to in session 2, task 2, as a way to help students understand how simple tasks can be composed into a complex task through art.

Resource Link: https://archive.bridgesmathart.org/2004/bridges2004-293.pdf

Nested Loops with Frozen for 3rd Grade (4.AP.M.1, 5.AP.M.1)

What is here: Students go through a series of 9 exercises to help them create images using ice-skating skills. As they do, they learn to decompose complex puzzles and compose their pieces into final solutions.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursed/6/

26 of 31

Resources for Lesson Ideas

While Loops in Farmer for 3rd Grade (4.AP.M.1, 5.AP.M.1)

What is here: As they continue work on decomposing and composing, students persist through 13 puzzles to fill holes and dig dirt without knowing the size of the holes or the height of the mountains of dirt.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursed/9/

Conditionals in Farmer for 4th Grade (4.AP.M.1, 5.AP.M.1)

What is here: Students decompose and compose their way to 12 puzzle solutions in an introduction to while loops and if/else statements.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursee/12/

27 of 31

Resources for Lesson Ideas

Functions in Bee for 4th Grade (4.AP.M.1, 5.AP.M.1)

What is here: More practice in decomposition and composition with online functions as students navigate complex paths, collect nectar, and make honey in these 13 puzzles.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursee/17/

Events in Ice Age for 5th Grade (4.AP.M.1, 5.AP.M.1)

What is here: Students work through 11 puzzles with events and loops to make characters move on the screen, and they work on decomposing and composing skills as they do this.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursef/13/

28 of 31

Resources for Lesson Ideas

For Loops in Bee for 5th Grade (4.AP.M.1, 5.AP.M.1)

What is here: In these 12 puzzles, students focus on for loops and using an incrementing variable to solve more complicated problems, which forces their brains to decompose and compose as they work.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursef/19/

Explore Project Ideas in Course E for 4th Grade (5.AP.M.2)

What is here: Students will learn about the design process and how to implement it in their own projects. Part of that process includes the elements of standard 5.AP.M.2.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursee/21/

29 of 31

Resources for Lesson Ideas

Explore Project Ideas in Course F for 5th Grade (5.AP.M.2)

What is here: Students will learn about the design process and how to implement it in their own projects. Part of that process includes the elements of standard 5.AP.M.2.

Lesson Plan Link: https://curriculum.code.org/csf-1718/coursef/25/

30 of 31

Resources for Simulations

Remix Scratch Projects (5.AP.PD.3)

What is here: Process of remixing. No sound so that you can focus on the process.

Resource Link: https://www.youtube.com/watch?v=BQlB1AjBATE

31 of 31

Your Turn

What resources looked most useful to you and why?

What resources or information do you still need to seek out and why?