ICS 32A Fall 2019
Schedule


In lieu of a course textbook, assigned readings are mainly the Notes and Examples from lecture, which I'll try to keep posted ahead of where we are in lecture at any given time. 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 Project Work
Week 0
Th 9/26
  • Course introduction
  • What is Python?
  • What are software libraries?
  • Designing and writing larger programs (briefly)
  • Launching a Python shell
  • Expressions and evaluation
  • Types, objects, numbers, and operators
  • Variables
  • Values have types; variables do not
  • Naming conventions
  • Statements
  • Booleans
Week 1
M 9/30
  • Lab sections begin meeting today
Tu 10/1
  • Writing Python scripts
  • Printing output and reading input
  • Strings
  • Conversions between types
  • Conditionality using the if statement
  • Truth testing and "truthiness"
W 10/2 Project #0A due 11:59pm
Th 10/3
  • Repetition using the while loop
  • Ranges
  • Iteration using the for loop
  • Abstraction
  • Writing functions
  • Parameters and arguments
  • Type checking and type errors
  • Scope and scoping rules
Week 2
M 10/7 Project #0B due 11:59pm
Tu 10/8
  • Built-in data structures in Python
  • Tuples
  • Lists
  • Type annotations (briefly)
W 10/9
  • Optionally, choose a partner for Project #1 today
Th 10/10
  • Files and the built-in open function
  • Why it's important to close files
  • Higher-level file access
  • File systems and related modules in Python's standard library
  • Paths
Week 3
Tu 10/15
  • Exceptions and exception handling
  • try statements
  • try, except, else, and finally clauses
  • Recursive data structures
  • File systems as a recursive data structure
Th 10/17
  • Recursive functions
  • When recursion is — and is not — appropriate in Python
  • Python programs that span multiple files
  • Modules and the import statement
  • Namespaces (briefly)
  • if __name__ == '__main__'
Week 4
M 10/21
Tu 10/22
  • Overview of computer networks (briefly)
  • Network input and output
  • Some necessary background on how the Internet works
  • IP addresses, ports, packets, routers, etc.
  • Sockets
  • A socket's input and output streams
  • Servers and clients
  • Using sockets in Python
  • Bytes vs. strings (briefly)
  • An example Python socket "echo" client
  • Using "pseudo-file" objects to treat socket input/output as text
W 10/23
Th 10/24
  • Namedtuples
  • Network protocols
  • The importance of knowing who and what to trust
  • Public and private functions in a module
  • Implementing a custom text-based protocol in Python
Week 5
Tu 10/29
  • Implementing a custom text-based protocol in Python (continued)
  • Namespaces and name resolution (briefly)
  • More details about import and multiple modules
  • Naming conventions for modules
Th 10/31
  • Why namedtuples are a limited way to create new kinds of objects
  • Classes
  • Objects and their attributes
  • Constructors, initialization, methods, and the self parameter
  • The difference between method calls and function calls
  • Why we specify some parts of a class as public and others as private
  • Naming conventions for classes
  • Sets (briefly)
  • Dictionaries (briefly)
F 11/1 Project #2 due 11:59pm
Week 6
Tu 11/5
  • MIDTERM — regular lecture time and location
Th 11/7
  • More about classes
  • Duck typing
  • Interfaces
  • Consistently designing multiple similar classes
  • Using objects of multiple similar classes without explicitly knowing their types
Week 7
M 11/11
  • University Holiday: Veterans' Day — NO LABS TODAY
Tu 11/12
  • Pushing out the boundaries even further: the web
  • URLs
  • HTTP
  • GET requests
  • Writing a Python program that downloads a web page given its URL
Th 11/14
  • Why standards are so important on the Internet
  • Why HTTP is for more than just web browsers
  • Web APIs
  • URLs with query parameters
  • URL encoding (briefly)
  • JSON (JavaScript Object Notation), and why it matters even if you're not writing JavaScript
  • Using Python's standard library to access web APIs
Week 8
M 11/18 Project #3 due 11:59pm
Tu 11/19
  • Objects, references, and id
  • Multidimensional data
  • Multidimensional list algorithms
  • When Python's standard library falls short
  • Why we need third-party libraries
  • Installing third-party libraries
  • Virtual environments
  • What libraries we might need if we want to implement games
Th 11/21
  • Writing a visual game in Python
  • Getting started with PyGame
  • Displays and surfaces
  • The game loop
  • Events
  • Colors
  • Drawing and animation
  • Clocks
Week 9
Tu 11/26
  • The "Spots" game, using PyGame
  • Models and views
  • Keeping model and view code separate
  • Handling additional kinds of events
  • Using modules and classes to improve our design
  • The fractional coordinate system
  • Two-way coordinate conversions
Th 11/28
  • University Holiday: Thanksgiving — NO LECTURE TODAY
F 11/29
  • University Holiday: Thanksgiving — NO LABS TODAY
Week 10
M 12/2 Project #4 due 11:59pm
Tu 12/3
  • The "Spots" game (continued)
Th 12/5
  • Augmenting our game with additional features
  • Two ways of handling keyboard input
  • Mixers and generating sound
Su 12/8 Project #5 due 11:59pm
Finals Week
Th 12/12
  • FINAL EXAM: 4:00pm-6:00pm, BS3 1200