CS263 Outline

Fall 2023 (Development)

1 Course Overview (3 days)

Overview

This module introduces you to the course organization, policies, and mechanics. We will discuss the structure of the course.

Objectives

At the conclusion of this Orientation Module students will be able to:

  1. Explain the Syllabus.
  2. Explain the importance of Office Hours.
  3. Explain the importance of questions.
  4. Summarize the structure of this course.
  5. Summarize the structure of an assignment prompt.
  6. Summarize the content to be covered.

  1. Module 1 Objective Mapping
  2. CS 263: Syllabus (Fall 2023 (Development))
  3. Communications - General Guidance
  4. Review Course Structure, Objectives, and Requirements
  5. Canvas Overview & Navigation
  6. Support
  7. Meet the Instructor
  8. Complete the Personal Introduction Post
  9. The Beginning
  10. Office Hours
  11. Complete the Office Hours Survey
  12. Assignment Prompt Structure
  13. Module 1 Summary

2 Getting Set Up with Python (5 days)

Overview

This module starts with setting up a Python development environment, specifically Python 3.11 and VSCode. The remainder of this module covers:

  1. downloading a full set of all example code (in the form of a GitHub repository)
  2. running a basic Python program
  3. running a given set of tests using pytest

Objectives

At the conclusion of this Module students will be able to:

  1. Checkout the course example set GitHub Repository.
  2. Create a project in their preferred IDE: VSCode or Vim (with appropriate plugins).
  3. Run a provided Python program.
  4. Run a set of provided tests for a Python program.
  5. Describe the basic structure of a Python program.
  6. Discuss PEP 8.
  7. Discuss PEP 20.
  8. Discuss how to approach an somewhat unfamiliar language (e.g., Python or Rust).

Relevance

The first steps in learning any program language are to:

  1. Set up your compiler or interpreter
  2. Set up your IDE
  3. Run a simple “Hello World” program
  4. Familiarize yourself with the style of the language

  1. Module 2 Objective Mapping
  2. Why Learn Python?
  3. Bookmark the CS 263 GitHub Repo
  4. A First Look at PEP 20 (The Zen of Python)
  5. Structure of a Basic Python Program
  6. Structure of a Python Program with Tests
  7. Python Style & PEP 8
  8. Procedural, Object-Oriented, and Functional
  9. Pythonic Code & “Good” Code
  10. Install Python 3.11 and VSCode
  11. Explore Some Example Code
  12. Module 2 Summary

3 Python Basics I - Variables & Functions (1 week)

Overview

This module will cover the use of variables and functions.

Objectives

At the conclusion of this Module students will be able to:

  1. Make use of variables to represent simple types (i.e., int, float, char, and bool).
  2. Make use of variables to store strings.
  3. Write functions that accept zero or more arguments.
  4. Write functions that return zero values.
  5. Write functions that return one value.
  6. Write functions that return multiple values.
  7. Make use of modules to organize functions.
  8. Document functions with Type Hints & pydoc.

Relevance

Variables and functions are required to write code in any language. This allows for data to be stored, computations to be performed, and (after the next module) resulted to be output.


  1. Module 3 Objective Mapping
  2. Basic Data Types & Variables
  3. Basics of Functions
  4. Functions & Modules
  5. Exploring Functions
  6. Code Documentation & Type Hints
  7. Module 3 Summary

4 Python Basics II - Basic IO & F-Strings (1 week)

Overview

This module will cover the use of print and input to output to the command line and read from the command line, respectively. Basic formatting will be discussed with an emphasis on f-string syntax.

Objectives

At the conclusion of this Module students will be able to:

  1. Perform basic string manipulations (e.g., extract a substring).
  2. Perform basic string comparison using built-in functions (e.g., startswith).
  3. Extract data from user input (through input).
  4. Write code that outputs to the command line.
  5. Make use of f-string syntax to format output (e.g., alignment, decimal precision, number of digits).
  6. Discuss the benefits of f-string syntax over the use of .format and % for formatting.

Relevance

For a program to be usable (i.e., have value) data must be output in a readable form. This output requires an understanding of the formatting mechanics of the selected language (in our case Python)


  1. Module 4 Objective Mapping
  2. String Manipulation & Comparison
  3. User Input & Standard Input
  4. Basic F-Strings
  5. Playing With Strings
  6. Module 4 Summary

5 Python Basics III - Conditional Blocks & Loops (1 week)

Overview

This Module will cover the basics of loops, conditional blocks, and command line arguments.

Objectives

At the conclusion of this Module students will be able to:

  1. Extract data from command line arguments (through sys.argv).
  2. Utilize while loops.
  3. Utilize for loops.
  4. Utilize conditional blocks that make use of if, elif, and else.

Relevance

An understanding of loops and conditional blocks is necessary to write any code that deals with large sets of data (e.g., assignment and grade data within Canvas).


  1. Module 5 Objective Mapping
  2. Command Line Arguments
  3. Conditional Blocks & "while" Loops
  4. "for" Loops
  5. Finding Loops & Conditions
  6. Module 5 Summary

6 Collections - Lists, Tuples, and Dictionaries (1 week)

Overview

This Module will focus on Python lists and tuples to store data. This will include lists that contain elements of a single type and lists with elements of different types. Dictionaries will be briefly introduced as a point of comparison. However, a full discussion will be left to a data structures course.

Objectives

At the conclusion of this Module students will be able to:

  1. Compare Python lists to a Java/C++ arrays.
  2. Utilize the list slice syntax.
  3. Utilize List Comprehensions and generator expressions.
  4. Compare lists and tuples in the context of mutability.
  5. Make use of built-in functions such as sum, min, and max to perform aggregate operations on collections.
  6. Make use of the built-in sort function.
  7. Make use of the built-in sort function with a provided key argument.
  8. Describe when a dictionary is appropriate over a list.

Relevance

To store, generate, and process information knowledge of how to select, interact with, and compose various data structures is necessary.


  1. Module 6 Objective Mapping
  2. The Basic Python Data Structures
  3. Comprehensions - An Overview
  4. Working with Python's list
  5. Working With Data
  6. Module 6 Summary

7 File IO, Context Managers, and Exceptions (1 week)

Overview

This Module will focus on working with files. This will include making use of context managers and handling exceptions such as ValueError and IndexError.

Objectives

At the conclusion of this Module students will be able to:

  1. Write code to read data from a plaintext file
  2. Write code to write data to a plaintext file
  3. Make use of the with context manager to guarantee input and output files are closed
  4. Discuss context managers in the context of scope
  5. Write code to handle specific exceptions (e.g., ValueError)
  6. Refactor code to make use of context managers.
  7. Discuss why a single bare except that handles all possible exceptions is considered bad practice

Relevance

Most programs interact with files in some way (e.g., your IDE when writing Python code). Without a knowledge of how to read from and write to files… it is impossible to write code to solve all but the simplest of tasks.


  1. Module 7 Objective Mapping
  2. Context Managers
  3. Basic Exceptions
  4. Exceptions & File Parsing
  5. Dealing With Exceptions
  6. Module 7 Summary

8 Writing Pythonic Code, Code Linting, and Testing with PyTest (1 week)

Overview

There are many best practices applied in well written Python code. These are considered Pythonic. While an exhaustive list of practices cannot be covered in a single module… we can extend the PEP 8 and PEP 20 discussions from Module 2.

Objectives

  1. Summarize how testing can be incorporated into the refactoring process
  2. Discuss regression testing in the context of refactoring
  3. Write tests for an existing codebase
  4. Add pydoc documentation for an existing codebase
  5. Discuss best practices for import statements
  6. Discuss the benefits of isort, black and pytest
  7. Discuss the functionality of isort, black and pytest
  8. Identify style and naming issues in an existing codebase

Relevance

Well-written code allows is more readable and maintainable. Test Driven Development (TDD) is a stable of modern development.


  1. Module 8 Objective Mapping
  2. Types of Tests
  3. Refactoring & Regression Testing
  4. Refactoring & Code Style
  5. Refactoring & Adding Functionality
  6. Module 8 Summary

9 Modules, Classes, & Objects (1 week)

Overview

In this Module we will discuss the basics of separating Python code into multiple .py files. We will also discuss best practices for writing Python classes.

Objectives

After completing this module students will be able to:

  1. Map existing knowledge of object oriented C++ or Java onto Python.
  2. Utilize properties and setters.
  3. Explain how to implement __eq__ and __hashcode__.
  4. Explain how to implement __str__.
  5. Define the concept of a Python module and compare it to a Java package or C++ namespace.
  6. Apply the D.R.Y principle.
  7. Summarize the justification for a formal class checklist.
  8. Describe the emergent nature of a class checklist.

Relevance

There are many options for writing classes in Python (e.g., from scratch, with an @dataclass decorator). Familiarity with these aforementioned options along with a knowledge of separating code into modules are expected on software engineering projects.


  1. Module 9 Objective Mapping
  2. What is A Module?
  3. The C++ and Java Class Checklists
  4. Using the C++ Class Checklist
  5. Using the Java Class Checklist
  6. The Python Class Checklist
  7. Using the Python Class Checklist
  8. Assembling Classes
  9. Module 9 Summary

10 Polymorphism, Interfaces, and Protocols (1 week)

Overview

This module discusses the notion of Inheritance in OOP. This includes an

Objectives

After completing this module students will be able to:

  1. Summarize the difference between inheritance and subtyping.
  2. Implement the Python deep copy (i.e., __deepcopy__) alongside an inheritance hierarchy.
  3. Discuss Protocols vs. ABCs.
  4. Discuss Liskov substitution (S.O.L.I.D.).
  5. Explain how to implement __iter__.
  6. Describe the use of an inner class in the context of abstraction and encapsulation.
  7. Apply the principles defined by S.O.L.I.D.

Relevance

Almost all modern code makes use of Iterators, Collections, and Protocols. The ability to recognize these abstractions, design code around them, and make use of them from external libraries is a fundamental skill in software engineering.


  1. Module 10 Objective Mapping
  2. Building a Linked List - Part 1
  3. Building a Linked List - Part 2
  4. Building a Linked List - Part 3
  5. Protocol vs Abstract Base Class
  6. Gathering Iterables
  7. Module 10 Summary

11 NumPy (1 week)

Overview

While Python does technically have an array type, it is not used by most Python projects. In most numerical applications, NumPy is used due to its performance, built-in functionality, and numpy.array.

Objectives

At the conclusion of this Module students will be able to:

  1. Create an empty (uninitialized) numpy.array.
  2. Create a numpy.array initialized to all zeroes.
  3. Create a numpy.array initialized to all ones.
  4. Create a numpy.array of ints from a Python list.
  5. Create a numpy.array of floats from a Python list.
  6. Obtain the dimensions of a numpy.array using shape .
  7. Write and rewrite code to make use of NumPy’s broadcast functionality in place of a loop.
  8. Perform basic statistical analysis (e.g., mean, min, max, and standard deviation) using NumPy.
  9. Explain the axis parameter.
  10. Summarize the performance (runtime and memory utilization) of NumPy in comparison the Python lists.

Relevance

Well-known data science libraries, such as Pandas, rely on NumPy. Even if you do not create NumPy arrays directly… you will still end up working with them.


  1. Module 11 Objective Mapping
  2. Creating Arrays
  3. Broadcasting
  4. Statistics
  5. NumPy & Multi-Dimension Arrays
  6. NumPy & Multi-Dimension Arrays - Refactoring
  7. NumPy & Multi-Dimension Arrays - NumPy Magic
  8. Hastening to NumPy
  9. Module 11 Summary

12 Semester Review & Things To Explore (1 week)

Overview

This is a Pseudo-Module. There is no new material (e.g., languages, paradigms or patterns) covered. This Module is an end-of-semester wrap up. We will revisit selected topics and lectures from throughout the semester.

Lectures and topics from the entire course will be covered on the Final Exam. The lectures listed here serve as a good starting point for a final review. Use them to determine how much time you need to dedicated to reviewing each module.

Modules 10 and 11 were covered fairly recently. Be sure to go back through both modules as part of your review.


  1. Structure of a Basic Python Program
  2. Structure of a Python Program with Tests
  3. Python Style & PEP 8
  4. Pythonic Code & "Good" Code
  5. Working with Python's list
  6. Basic Exceptions
  7. Exceptions & File Parsing
  8. What is A Module?
  9. The Python Class Checklist
  10. Using the Python Class Checklist
  11. Complete the Final Exam

13 Postscript

All times in this schedule are given in Eastern Time.

Symbol Key
lecture Lecture:
slides Slides :
event Event or important date
text Read
lab Do lab:
asst Assignment:
exam Take the
activity Do:
recitation In your recitation section:
construct Under construction:

14 Presentation

Topics Lectures Readings Assignments & Other Activities
topics lecture slides event exam video project construct text exam asst selfassess exam activity lab
Document Kind Prefix
lecture Read
event
exam Take the exam:
lab Do:
asst
reading Read (optional)