ICS 32 Spring 2018

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 1
Tu 4/3
  • Course introduction
  • What are software libraries?
  • The value of abstraction
  • Designing and writing larger programs
Th 4/5
  • Files, revisited
  • Exceptions and exception handling
  • try statements
  • try, except, else, and finally clauses in try statements
F 4/6
  • Lab sections begin meeting today
  • Project #0 due 11:59pm
  • Optionally, choose a partner for Project #1 today
Week 2
Tu 4/10
  • 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
Th 4/12
  • 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
Week 3
M 4/16
Tu 4/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
  • Revisiting the value of splitting complex functions into shorter, simpler ones
Th 4/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 4/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 4/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
Week 5
M 4/30
Tu 5/1
  • 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 5/3
  • More about classes
  • Duck typing
  • Interfaces
  • Consistently designing multiple similar classes
  • Using objects of multiple similar classes without explicitly knowing their types
Week 6
Tu 5/8
  • MIDTERM — regular lecture time and location
Th 5/10
  • Test-driven development
  • Unit tests as a way of improving one's design
  • Refactoring (briefly)
  • The unittest module in the Python standard library
Week 7
M 5/14
Tu 5/15
  • Objects, references, and id
  • Multidimensional data
  • Multidimensional list algorithms
Th 5/17
  • 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
  • Writing a visual game in Python
  • Getting started with PyGame
  • Displays and surfaces
  • The game loop
Week 8
Tu 5/22
  • Writing a visual game in Python (continued)
  • Events
  • Colors
  • Drawing and animation
  • Clocks
Th 5/24
  • 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
Week 9
M 5/28
  • University Holiday: Presidents' Day — NO LABS TODAY
Tu 5/29
  • The "Spots" game (continued)
W 5/30
Th 5/31
  • Augmenting our game with additional features
  • Two ways of handling keyboard input
  • Mixers and generating sound
Week 10
Tu 6/5
  • 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
  • Buttons, commands, and event handler functions
  • Bound methods in Python
Th 6/7
  • The grid layout manager
  • Model/view separation in a tkinter application
  • Applying test-driven development to a "real" project
  • Why model/view separation makes testing better
  • Course conclusion
F 6/8
Finals Week
Th 6/14
  • FINAL EXAM: 4:00pm-6:00pm, HSLH 100A