ICS 33 Fall 2024
Schedule


In lieu of a course textbook, assigned readings are mainly the Notes and Examples from lecture. It is a good idea to skim the assigned reading before the lecture for the main ideas, attend lecture, and then to go through the assigned reading again to fill in the details that you missed, both in your initial skim of the reading and in the lecture.

Date Lecture Topics Readings Assigned Work
Week 0
Lectures
  • Course introduction
  • The importance of natural curiosity
  • Experimentation in a running Python shell
  • Dictionaries as a recurring theme in Python
  • Scopes and namespaces
  • Shadowing and the LEGB rule
  • Module importation
  • How different ways to import behave differently
  • Importation in non-global scopes
  • Importation vs. loading
  • Classes and objects
  • Attributes in objects
  • Attributes in classes
F 9/27
Week 1
Lectures
  • Static and class methods
  • Positional and keyword arguments
  • Packing and unpacking
  • Default arguments
  • Tuple-packing parameters
  • Keyword-only and positional-only parameters
  • Dictionary-packing parameters
  • Context managers and the with statement
  • Examples of existing context managers in Python
  • Writing one's own context managers
M 9/30
  • Lab sections begin meeting today
F 10/4
Week 2
Lectures
  • Asymptotic analysis
  • O-notation
  • The limitations of O-notation
  • "Closest-fit" O-notation
  • Measuring time and memory
  • Searching
  • The mechanics of Python lists
  • Sequential search
  • Binary search
  • Best-, worst-, and average-case analysis
F 10/11
Week 3
Lectures
  • Databases and persistence
  • Relational databases
  • Tables, rows, and columns
  • Primary keys
  • Relationships and foreign keys
  • SQL and SQLite
  • Creating tables in SQL
  • Querying data using SQL's SELECT
  • Modifying data using SQL's INSERT and UPDATE
  • Removing data using SQL's DELETE
  • The meaning of NULL in SQL
  • Constraints and data integrity
  • Relationships and joins
W 10/16
F 10/18
Week 4
Lectures
  • List comprehensions
  • Set comprehensions
  • Interlude: What does it mean to be hashable?
  • Dictionary comprehensions
  • The mechanics of iteration
  • The iterable protocol
  • Implementing one's own iterator class
  • Generators
  • Using generators to decouple parts of a design
F 10/25
Week 5
Lectures
  • Generator comprehensions
  • Lazy evaluation
  • Infinite generators
  • Combining generators
  • Generators in the Python standard library
Th 10/31
  • NO LECTURE TODAY
F 11/1
Week 6
Lectures
  • The Python data model
  • Sized objects
  • Booleanness of objects
  • Indexing and slicing
  • Hashing
  • Overloading comparison operators
  • Overloading arithmetic operators
  • Revisiting the resolution of attribute access
W 11/6
Week 7
Lectures
  • Single inheritance
  • How derived classes reuse and enrich base class functionality
  • Multiple inheritance
  • Method resolution order (MRO)
  • Revisiting recursion in depth
  • Single, direct recursion
  • Indirect (mutual) recursion
  • Asymptotic analysis of recursion
  • Tail recursion
  • Multiple recursion
M 11/11
  • University Holiday: Veterans' Day — NO LABS TODAY
F 11/15
Week 8
Lectures
  • Memoization
  • Dynamic programming (briefly)
  • An overview of functional programming
  • Lambda expressions
  • Higher-order functions
  • Functions that accept other functions as arguments
  • Functions that return other functions
  • Partially called functions
  • Higher-order functions in Python and its standard library
M 11/18
F 11/22
Week 9
Lectures
  • Decorators
  • Writing a decorator that transforms a function
  • Decorators that accept arguments
  • The limitations on what decorators can transform
  • Implementing decorators using classes
  • Using decorators within classes
  • Decorating classes in their entirety
  • Decorators in the Python standard library
W 11/27
Th 11/28
  • University Holiday: Thanksgiving — NO LECTURE TODAY
F 11/29
  • University Holiday: Thanksgiving — NO LABS TODAY
Week 10
Lectures
  • Pythonic class design
  • Gradually refining the design of a Python class
  • The limitations of namedtuples
  • Customizing attribute access for one class
  • Customizing attribute access across classes
  • Properties and the @property decorator
  • Dataclasses and the @dataclass decorator
  • Contrasting properties and dataclasses
  • Implicit vs. explicit protocols
  • Course conclusion
M 12/2
F 12/6
Finals Week
Tu 12/10
  • FINAL EXAM: 7:00pm-9:00pm, BS3 1200