ICS 32A Fall 2017
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/28
  • 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 10/2
  • Lab sections begin meeting today
Tu 10/3
  • Writing Python scripts
  • Printing output and reading input
  • Strings
  • Conversions between types
  • Conditionality using the if statement
  • Truth testing and "truthiness"
W 10/4 Project #0A due 11:59pm
Th 10/5
  • 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/9 Project #0B due 11:59pm
Tu 10/10
  • Built-in data structures in Python
  • Tuples
  • Lists
  • Type annotations (briefly)
Th 10/12
  • 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
F 10/13
  • Optionally, choose a partner for Project #1 today
Week 3
Tu 10/17
  • Exceptions and exception handling
  • try statements
  • try, except, else, and finally clauses
  • Recursive data structures
  • File systems as a recursive data structure
Th 10/19
  • 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/23
Tu 10/24
  • 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/25
  • Optionally, choose a partner for Project #2 today
Th 10/26
  • 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
  • Namedtuples
Week 5
Tu 10/31
  • 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 11/2
  • MIDTERM — regular lecture time and location
Week 6
M 11/6 Project #2 due 11:59pm
Tu 11/7
  • 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)
Th 11/9
  • Pushing out the boundaries even further: the web
  • URLs
  • HTTP
  • GET requests
  • Why standards are so important on the Internet
  • Why HTTP is for more than just web browsers
F 11/10
  • UNIVERSITY HOLIDAY: Veterans' Day — NO LABS TODAY
Week 7
Tu 11/14
  • 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
  • More about classes
  • Duck typing
Th 11/16
  • Duck typing (continued)
  • Interfaces
  • Consistently designing multiple similar classes
  • Using objects of multiple similar classes without explicitly knowing their types
Week 8
M 11/20 Project #3 due 11:59pm
Tu 11/21
  • When Python's standard library falls short
  • Why we need third-party libraries
  • Installing third-party libraries
  • Virtual environments
  • Writing a visual game in Python
  • Getting started with PyGame
  • Displays and surfaces
  • The game loop
  • Events
  • Colors
  • Drawing and animation
  • Clocks
Th 11/23
  • UNIVERSITY HOLIDAY: Thanksgiving — NO LECTURE TODAY
F 11/24
  • UNIVERSITY HOLIDAY: Thanksgiving — NO LABS TODAY
Week 9
Tu 11/28
  • 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/30
  • The "Spots" game (continued)
F 12/1 Project #4 due 11:59pm
Week 10
Tu 12/5
Th 12/7
F 12/8 Project #5 due 11:59pm
Finals Week
Th 12/14
  • FINAL EXAM: 7:00pm-9:00pm, HSLH 100A