ICS 32 Fall 2017

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 are software libraries?
  • The value of abstraction
  • Designing and writing larger programs
Week 1
Tu 10/3
  • Files, revisited
  • Exceptions and exception handling
  • try statements
  • try, except, else, and finally clauses in try statements
W 10/4
  • Lab sections begin meeting today
  • Project #0 due 11:59pm
  • Optionally, choose a partner for Project #1 today
Th 10/5
  • Higher-level file access
  • File systems and related modules in Python's standard library
  • Paths
  • Recursive data structures
  • File systems as a recursive data structure
  • Recursive functions
  • When recursion is — and is not — appropriate in Python
Week 2
Tu 10/10
  • 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
  • String encodings (e.g., UTF-8) (briefly)
Th 10/12
  • An example Python socket "echo" client
  • Using "pseudo-file" objects to treat socket input/output as text
  • Revisiting the value of splitting complex functions into shorter, simpler ones
F 10/13
Week 3
M 10/16
  • Optionally, choose a partner for Project #2 today
Tu 10/17
  • Modules and the import statement
  • 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
Th 10/19
  • 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
Week 4
Tu 10/24
  • 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
Th 10/26
  • Pushing out the boundaries even further: the web
  • URLs
  • HTTP
  • GET requests
  • Writing a Python program that downloads a web page given its URL
F 10/27
Week 5
Tu 10/31
  • 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
Th 11/2
  • MIDTERM — regular lecture time and location
Week 6
Tu 11/7
  • More about classes
  • Duck typing
  • Interfaces
  • Consistently designing multiple similar classes
  • Using objects of multiple similar classes without explicitly knowing their types
Th 11/9
  • Some background on Othello, in preparation for Project #4
  • Multidimensional list algorithms
F 11/10
Week 7
M 11/13
Tu 11/14
  • Graphical user interfaces
  • The tkinter module in the Python standard library
  • Event-based programming
  • Creating a window and letting tkinter manage it
  • Widgets
  • Behaviors and events
Th 11/16
  • Buttons, commands, and event handler functions
  • Event binding in tkinter
  • The Canvas widget and drawing one's own graphics
  • Two-dimensional graphics and coordinate systems
  • Widgets, masters, and layout
  • Using the grid layout (briefly)
  • Bound methods in Python
Week 8
Tu 11/21
  • How to redraw a Canvas when its size changes
  • Alternative coordinate systems
  • The grid layout (briefly)
Th 11/23
F 11/24
Week 9
M 11/27
Tu 11/28
  • Models and views
  • Keeping model and view code separate
  • The "spots" application
  • Hexadecimal numbers and using them to specify RGB colors
  • Handling mouse clicks on a Canvas
  • Two-way coordinate conversions
  • Abstracting our coordinate-conveersion code into a separate module
Th 11/30
  • The "spots" application (continued)
  • More details about the grid layout manager
Week 10
Tu 12/5
  • Hierarchical user interfaces using the Frame widget
  • User interfaces with multiple windows
  • The Toplevel widget
  • Dialog boxes
  • Modal vs. modeless dialogs
  • Using grab_set and wait_window to manage multiple event loops
Th 12/7
  • Implementing animation using tkinter
  • Scheduling user interface events with the after method
  • How animation isn't that different from the "spots" application
  • Course conclusion
F 12/8
Finals Week
Tu 12/12
  • FINAL EXAM: 7:00pm-9:00pm, HSLH 100A