Date |
Lecture Topics |
Readings |
Project Work |
Week 1 |
Lectures |
- Course introduction
- What are software libraries?
- The value of abstraction
- Designing and writing larger programs
- Files, revisited
- File systems and related modules in Python's standard library
- Paths
- Exceptions and exception handling
- try statements
- try, except, else, and finally clauses in try statements
- Higher-level file access
|
|
|
F 1/7 |
|
|
- Lab sections begin meeting today
- Project #0 due 11:59pm
|
Week 2 |
Lectures |
- Testing
- Categories of test cases
- Automation of testing using the assert statement
- Recursive data structures
- File systems as a recursive data structure
- 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__'
|
|
|
F 1/14 |
|
|
|
Week 3 |
Lectures |
- 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
- 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
- More details about import and multiple modules
- Naming conventions for modules
|
|
|
M 1/17 |
- University Holiday: Martin Luther King Jr. Day — NO LABS TODAY
|
|
|
W 1/19 |
|
|
|
F 1/21 |
|
|
|
Week 4 |
Lectures |
- 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
- More about classes
- Duck typing
- Interfaces
- Consistently designing multiple similar classes
- Using objects of multiple similar classes without explicitly knowing their types
|
|
|
F 1/28 |
|
|
|
Week 5 |
Lectures |
- Pushing out the boundaries even further: the web
- URLs
- HTTP
- GET requests
- Writing a Python program that downloads a web page given its URL
- 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
|
|
|
W 2/2 |
|
|
|
F 2/4 |
|
|
|
Week 6 |
Lectures |
- Objects, references, and id
- Multidimensional data
- Multidimensional list algorithms
- Test-driven development
- Unit tests as a way of improving one's design
- Refactoring (briefly)
- The unittest module in the Python standard library
|
|
|
F 2/11 |
|
|
|
Week 7 |
Lectures |
- 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
- Events
- Colors
- Drawing and animation
- Clocks
- 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
|
|
|
W 2/16 |
|
|
|
Week 8 |
Lectures |
- Augmenting our games with additional features
- Two ways of handling keyboard input
- Mixers and generating sound
- 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
|
|
|
M 2/21 |
- University Holiday: Presidents' Day — NO LABS TODAY
|
|
|
Tu 2/22 |
|
|
|
Week 9 |
Lectures |
- Bound methods in Python
- 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
|
|
|
M 2/28 |
|
|
Project #4 due 11:59pm |
Tu 3/1 |
|
|
|
Week 10 |
Lectures |
- NO NEW LECTURE MATERIAL THIS WEEK
- NO Q&A THIS WEEK
|
|
|
M 3/7 |
|
|
Project #5 due 11:59pm |
Tu 3/8 |
|
|
|
Finals Week |
Tu 3/15 |
|
|
|