Unit 1: Algorithms and Graphics
The goal of Unit 1 is to excite students about programming and to build their algorithmic thinking and ability to use abstraction. Student creativity is emphasized as they work with Scratch, App Inventor, and Python programming languages to tell graphical stories, publish games and Android apps, and explore various development environments and programming techniques. Students will create original code and read and modify code provided from other sources. An Agile software development process is emphasized and personal, professional, and collaborative skills take center stage. Agile software development is a group of software development methods in which requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. Students debate policy questions about the ownership and control of digital data and examine the implications for creative industries and consumers. Students begin their exploration of career paths tied to computing.
1.1 Algorithms and Agile Development
- The goal of this lesson is to introduce students to programming at a level appropriate to novice programmers. With an introduction to pair programming and the Agile software development process, students create original programs in Scratch that incorporate audio and visual elements while tackling algorithmic problems. The lesson opens with an introduction to how computing is affecting our lives. Students explore tools for collaboration over the Internet and select from these tools in order to manage the projects that they create. The foundations for later algorithmic thinking are built by focusing on the most common roles that variables fulfill, with an introduction to the conventions of object-oriented programming.
1.2 Mobile App Design
- The goal of this lesson is for students to build their skills by analyzing existing code, particularly with an emphasis on the roles of variables. Students create an Android app of their own design. The lesson begins with an introduction to binary representations of numbers, letters, colors, images, etc. using a CS unplugged activity in which students create a physical representation of data storage. Students work with and make minor modifications to two App Inventor programs, building their ability to analyze a complex program and incorporate event handlers into programs in meaningful ways. Students conclude by designing and creating their own Android app using pair programming and practicing the Agile software design process.
1.3 Algorithms in Python
- The goal of this lesson is for students to understand all information as bits and to transfer their understanding of algorithms to a new language, Python, which is powerful enough to raise all the opportunities and issues targeted in the course. Students are introduced to functional, imperative, and declarative programming paradigms with Python, again learning to use variables in the most common roles. Before learning about variable types and the fundamental algorithmic structures in Python, students simulate program execution in a model assembly language. After building strength with basic Python algorithms, students create algorithms to compete in a round-robin tournament of the Prisoner’s Dilemma, using the collaborative programming platform GitHub in the process.
1.4 Images and Object-Oriented Libraries
- The goal of this lesson is for students to become independent learners of a programming language, able to refer to documentation to use object- oriented libraries commonly available. The lesson begins with an unplugged activity to teach object-oriented concepts. Students build additional strength with Python algorithms, manipulating image files by modifying pixel data and using code libraries to work at higher levels of abstraction. As part of that work, they learn to use a variety of documentation including application-programming interfaces (APIs). Students read, discuss, and debate intellectual property issues associated with digital data. In the culminating problem of the lesson, they collaborate to create an image processing function that highlights the power of automation.
1.5 GUIs in Python (optional)
- The goal of this lesson is for students to conceive of any class of objects as an abstraction. Students will create a graphical user interface (GUI) with considerations of audience and accessibility. The lesson begins with an unplugged activity that generalizes the user interface topic of this lesson to the field of human-computer interaction. Students practice using an application-programming interface (API) to acquire methods that affect an object’s state. Students work with two APIs: the Tkinter Canvas for drawing and animation, and then the Tkinter toolbox of GUI widgets. Students are provided code for a simple GUI that implements a model-view-controller (MVC) pattern. Students will modify the elements of that pattern to suit their own needs. The lesson concludes with a problem in which students create a model-view-controller GUI using Scratch or Python. Strategies for documentation are reinforced, and Agile development is emphasized in the concluding problem.