231
Write useful programs demonstrating mastery of resources, practices, and modules used by successful Python programmers (SLOs). Use the official documentation. See the course policies. The instructor is Aaron Brick. Our section and CRN are 931/34878. Full details appear below as time passes.

1/29 – 2/4
2822
Welcome & Server See Course philosophy & Course policies & Video briefing & Instructor’s Notes #1.
2/5 – 2/11
2823
Comprehensions See Mary Rose Cook’s A practical introduction to functional programming & Peter J. Denning’s Can Generative AI Bots Be Trusted? & Video briefing & Instructor’s Notes #2. Write a program that prints the number of palindromes in /users/abrick/resources/english due 2/11.
2/12 – 2/18
2824
Functional model See A. M. Kuchling’s Functional Programming HOWTO & Carlos Balderas’s Iterating With Python Lambdas & Video briefing & Instructor’s Notes #3. Write a functional-style program (ideally only one statement long) that displays the curvature of a sinusoid on the terminal & peer review, both due 2/18.
2/19 – 2/25
2825
Generators See Dan Bader’s Generator Expressions in Python: An Introduction & Jeff Knupp’s Improve Your Python: yield and Generators Explained & Video briefing & Instructor’s Notes #4. Write a program demonstrating a generator that uses the Leibniz formula to yield progressively more accurate estimates of pi & peer review, both due 2/25.
2/26 – 3/3
2826
Time See Basic date and time types & Video briefing & Instructor’s Notes #5. Write a program that demonstrates a generator yielding the number of accesses made in each hour, from the beginning of /etc/httpd/logs/access_log & peer review, both due 3/3.
3/4 – 3/10
2827
Debugging See Lisa Tagliaferri’s How To Use the Python Debugger & Video briefing & Instructor’s Notes #6. Debug /users/abrick/resources/war-buggy.py using an interactive debugger and send in the correctly working program. Do not alter its functionality or output other than fixing bugs, but do add comments pointing out and explaining your changes & peer review, both due 3/10.
3/11 – 3/17
2828
Testing See Mike’s Python 3 Testing: An Intro to unittest & Video briefing & Instructor’s Notes #7. Use unittest.TestCase methods to confirm that the addition and subtraction of date and timedelta objects produce correct results & peer review, both due 3/17.
3/18 – 3/24
2829
Profiling See Marco Bonzanini’s My Python Code is Slow? Tips for Profiling & Video briefing & Instructor’s Notes #8. Write a program that indicates how many times out of a thousand the Monte Carlo method is faster than the Leibniz formula at converging to pi, plus or minus one one-thousandth & peer review, both due 3/24.
3/25 – 3/31
2830
CPython See Allison Kaptur’s Python Bytecode: Fun With Dis & InfoWorld’s Python moves to remove the GIL and boost concurrency & Video briefing & Instructor’s Notes #9. Write a universal launcher program that expects its command line arguments to consist of the absolute path to an executable program in any language, followed by any number of arguments for that program (e.g., /bin/ls -l). It should transparently run that program and exit with its exit value & peer review, both due 3/31.
4/1 – 4/7
2831
Concurrency See MIT EECS’s Concurrency & Nick Coghlan’s Efficiently Exploiting Multiple Cores with Python & Video briefing & Instructor’s Notes #10. Write a program that expects pathnames as arguments and creates a pool of workers to all at once count how many lines long each file is & peer review, both due 4/7.
4/8 – 4/14
2832
Decorators See Akshar’s Understanding `*’, `*args’, `**’ and `**kwargs’ & Real Python’s Primer on Python Decorators & Video briefing & Instructor’s Notes #11. Decorate print() (by assignment, not the pie) so that each positional argument it receives has a 50\% chance of being ignored, and demonstrate this behavior & peer review, both due 4/14.
4/15 – 4/21
2833
Character encodings See Python Unicode HOWTO & Video briefing & World Wide Web Consortium’s Character encodings: Essential concepts & Instructor’s Notes #12. Write a program that expects as arguments any number of pathnames of UTF-8 encoded files, and indicates the mean number of bytes per character in the content of each one & peer review, both due 4/21.
4/22 – 4/28
2834
Data encodings Homework & peer review, both due 4/28.
4/29 – 5/5
2835
Web service Homework & peer review, both due 5/5.
5/6 – 5/12
2836
Model-View-Controller Peer review due 5/12.
5/13 – 5/19
2837