ICS 32 Winter 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 1/9
  • Course introduction
  • What are software libraries?
  • The value of abstraction
  • Designing and writing larger programs
Th 1/11
  • Files, revisited
  • Exceptions and exception handling
  • try statements
  • try, except, else, and finally clauses in try statements
F 1/12
  • Project #0 due 11:59pm
  • Lab sections begin meeting today
  • Optionally, choose a partner for Project #1 today
Week 2
M 1/15
  • University Holiday: Martin Luther King Jr. Day — NO LABS TODAY
Tu 1/16
  • 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 1/18
  • 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 1/22
Tu 1/23
  • 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 1/25
  • 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 1/30
  • 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 2/1
  • 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 2/5
Tu 2/6
  • 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 2/8
  • 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 2/13
  • MIDTERM — regular lecture time and location
Th 2/15
  • Multidimensional data
  • Multidimensional list algorithms
Week 7
M 2/19
  • University Holiday: Presidents' Day — NO LABS TODAY
Tu 2/20
  • Multidimensional list algorithms (continued)
  • 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
W 2/21
Th 2/22
  • Writing a visual game in Python
  • Getting started with PyGame
  • Displays and surfaces
  • The game loop
  • Events
  • Colors
  • Drawing and animation
  • Clocks
Week 8
Tu 2/27
  • 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 3/1
  • The "Spots" game (continued)
Week 9
M 3/5
Tu 3/6
  • Augmenting our game with additional features
  • Two ways of handling keyboard input
  • Mixers and generating sound
Th 3/8
  • Test-driven development
  • Unit tests as a way of improving one's design
  • Refactoring (briefly)
  • The unittest module in the Python standard library
Week 10
Tu 3/13
  • 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 3/15
  • 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 3/16
Finals Week
Tu 3/20
  • FINAL EXAM: 7:00pm-9:00pm, PSLH 100