CS 223, UChicago, Fall 2023
Tu/Th 9:30-10:50am
Stuart
Hall 104
Instructor | Teaching Assistants | ||
---|---|---|---|
Ravi Chugh | Sam Cohen | Bhakti Shah | Loren Troan |
he / him | he / him | she / her | he / him |
Programming languages often conflate the definition of mathematical functions, which deterministically map inputs to outputs, and computations that effect changes, such as interacting with users and their machines. In this course, students will develop an enriched perspective about these two related but distinct mechanisms, by studying the statically-typed pure functional programming language Haskell. Topics include: algebraic datatypes, an elegant language for describing and manipulating domain-specific data; higher-order functions and type polymorphism, expressive mechanisms for abstracting programs; and a core set of type classes, with strong connections to category theory, that serve as a foundational and practical basis for mixing pure functions with stateful and interactive computations. In addition to small and medium sized programming assignments, the course includes a larger open-ended final project.
Learn how to precisely model and manipulate application-specific data using polymorphic, recursive, algebraic datatypes.
Learn how type-constrained higher-order functions can be used to organize and abstract common patterns of computation.
Learn how to separate the definition of pure, mathematical functions from components that exhibit computational effects.
Employ these pure functional programming features in the context of modestly-sized but representative programming tasks.
An alternative characterization, consistent with these objectives, are the goals of Advanced Programming by the wonderful PL folks at Penn: “(1) to take good programmers and turn them into excellent ones, and (2) to introduce them to a range of modern software engineering practices, in particular those embodied in typed, functional programming languages.”
If you are looking for a detailed summary of topics, see the schedule.
Our primary source is the book A Quarter of Haskell, by our very own Master Professor Stuart Kurtz.
If you would like to consult additional texts, see Learn You a Haskell for Great Good by Miran Lipovača, Programming in Haskell by Graham Hutton, and Haskell: The Craft of Functional Programming by Simon Thompson. (There’s also Real World Haskell, but it no longer reflects the real world.)
Class will be run primarily as live coding sessions with interactive discussion throughout. This plan will work as long as I remember to bring my laptop and you remember to come to class.
I will share my lecture notes from the schedule page. These are notes for my lecture, not a substitute.
You may do the corresponding reading before or after class. Figure out what works best for you.
Tasks | Weight | |
---|---|---|
~7 | Problem Sets (PS) | 5% |
~7 | Programming Assignments (PA) | 50% |
1 | Quiz | 10% |
1 | Exam | 20% |
1 | Project | 15% |
There’s a regular cadence to the weekly schedule:
In general, Problem Set (PS) n and Programming Assignment (PA)
n
both exercise topics covered up through and including
Week n.
PS n is assigned at the start of Week n and due by the start of Week n+1 (Monday 9am).
PA n is assigned at the end of Week n and due at the end of Week n+1 (Friday 11pm).
Weekly problem sets comprise exercises from the textbook. These exercises are mostly small programming or writing tasks focused locally on the material at hand. Problem sets serve primarily as a check on your understanding — as well as a nudge to keep up with the reading in timely fashion.
You are encouraged to work on problem sets with your classmates — groups of up to 3 are allowed to submit a single solution. More details about submitting PSets will follow on the discussion board.
PSets will be graded based solely on participation, that is, whether or not your group submitted something (anything) by the deadline. After the deadline, you can (and should) freely discuss solutions on the discussion board.
Weekly programming assignments form the bulk of the coursework, providing the opportunity to apply the concepts under study to larger — and hopefully fun(ctional) — programming tasks.
Programming assignments must be done individually. As per the policy below, you may discuss them at a high level with classmates as long as those interactions are fully disclosed.
The course project is an opportunity to design and implement something of your choosing. Generally the idea is to work in groups of one or two and build something fun and interesting in Haskell that makes use of your newfound advanced programming skills in some way. Bite off as much as you can chew. The project will be split into several milestones, culminating in demos at the end of the quarter.
Programming assignments are due on Fridays at 11pm CT, unless otherwise noted.
Up to four programming assignments may be submitted one day late (within 24 hours after the deadline) without penalty.
In addition to using one of these “late chips”, an assignment can be submitted 2 days late (1 day beyond the late deadline) with a 25% penalty, and 3 days late with a 50% penalty. If the four cumulative late chips have already been exhausted, then an assignment can be submitted 1 day late with a 25% penalty and 2 days late with a 50% penalty.
Barring extenuating circumstances discussed with the instructor well in advance of a deadline, assignments submitted more than one day late risk receiving zero credit, as do additional late assignments beyond the specified allowances.
Late submissions will be identified automatically based on submission times; no need to notify us.
From the College Academic Integrity & Student Conduct policy:
All members of the University of Chicago belong to a tradition dedicated to the pursuit and cultivation of learning. A few simple principles — academic honesty, mutual respect and civility, personal responsibility — lie at the heart of our intellectual community. Each of us — students, faculty and staff — is pledged to live up to these standards and to support each others’ efforts in this regard. We take these values seriously…
And the Academic Honesty and Plagiarism policy:
It is contrary to justice, academic integrity, and to the spirit of intellectual inquiry to submit another’s statements or ideas of work as one’s own. To do so is plagiarism or cheating, offenses punishable under the University’s disciplinary system. Because these offenses undercut the distinctive moral and intellectual character of the University, we take them very seriously.
Proper acknowledgment of another’s ideas, whether by direct quotation or paraphrase, is expected. In particular, if any written or electronic source is consulted and material is used from that source, directly or indirectly, the source should be identified by author, title, and page number, or by website and date accessed. Any doubts about what constitutes “use” should be addressed to the instructor.
Student interactions are an important and useful means to mastery of the material. We recommend that you discuss the material in this class with other students; that includes problem sets and programming assignments.
So what is the boundary between acceptable collaboration and academic misconduct?
For Problem Sets, there are no restrictions beyond the limit of three students for a group submission. (Although only one submission is required per group, keep in mind the importance of typing up and understanding the exercises on your own.)
For Programming Assignments, while it is acceptable to discuss them, it is not acceptable to turn in someone else’s work as your own.
When the time comes to develop your solution, you should write it yourself from your own memory. You should not send code files back and forth. You should not copy from someone else’s screen. You should not allow someone else to copy your work.
Moreover, you should cite any material discussions (with classmates or others) and any written sources you consulted (e.g. websites or textbooks) in comments at the top of your code files. For example:
// I discussed the proof that P = NP in this assignment // with ${NAME}. // // ${NAME} helped me debug issues I was having with the last step // in that proof. // // I also found code from ${URL} that performed some automatic // checking of some key lemmas, and I adapted it to...
Please also make sure not to post solutions publicly, for example, in public GitHub respositories or on Stack Overflow.
For student collaborations, it can be a slippery slope that leads from sanctioned collaboration to outright misconduct. But for all the slipperiness, there is a clear line: present only your ideas as yours, and attribute all others.
What about ChatGPT and other AI tools? Use them if you’d
like. (I’d be curious to hear how much they help with Haskell and the
kinds of projects we’ll do this in this course.) If you do, you must
provide extensive documentation. First, you must submit full
transcripts of all inputs provided to and outputs by produced such tools
(even interactions that did not directly or indirectly affect your work)
— create a directory called ai-transcripts/
in your
assignment repository, which organizes all transcripts in some
reasonable fashion. Second, in your source file(s), you should write
comments that clearly explain when and how you used AI tools, and how
the results contributed to your solutions. (I’ll also state the obvious:
You won’t have access to such tools on written exams or oral
presentations.)
Violations of this policy will result in zero credit for affected assignments, a further reduction in final course grade, the inability to subsequently withdraw from the course, and a report to the Office of College Community Standards.
For the Project, the restrictions are the same as for Programming Assignments, except that you may work with your group member (if any).
If you have any questions about what is or is not proper academic conduct, please ask us.
Pass/Fail: Please let me know by the end of Friday Week 9 if you would like to opt for Pass/Fail grading. To earn a Pass, you must complete all coursework (problem sets, programming assignments, quiz, exam, and project) with an overall weighted average that would correspond to a quality grade of C- or higher.
Withdrawal: As per College grading policies, “Students who wish to exercise this option must request a W from their adviser in writing by 5 p.m. the Monday of the ninth week of instruction or the day before the final project/exam is due, whichever is earlier.”
[Borrowed from Stuart Kurtz and then adapted]
The University of Chicago is committed to diversity and rigorous inquiry that arises from multiple perspectives. We concur with this commitment and also believe that we have the highest quality interactions and can creatively solve more problems when we recognize and share our diversity. We expect to maintain a productive learning environment based on open communication, mutual respect, and non-discrimination. We view the diversity that students bring to this class as a resource, strength and benefit. It is our intent to present materials and activities that are respectful of diversity: gender, sexuality, disability, generational status, socioeconomic status, ethnicity, race, religious background, and immigration status. Any suggestions for promoting a positive and open environment will be appreciated and given serious consideration.
Our school is committed to fostering a safe, productive learning environment. Title IX and our school policy prohibits discrimination on the basis of sex. Sexual misconduct — including harassment, domestic and dating violence, sexual assault, and stalking — is also prohibited at our school. See also the University Policy on Harrassment, Discrimination, and Sexual Misconduct.
Our school encourages anyone experiencing sexual misconduct to talk to someone about what happened, so they can get the support they need and our school can respond appropriately.
If you wish to speak confidentially about an incident of sexual misconduct, want more information about filing a report, or have questions about school policies and procedures, please contact our Title IX Coordinator, which can be found on our school’s website.
Our school is legally obligated to investigate reports of sexual misconduct, and therefore it cannot guarantee the confidentiality of a report, but it will consider a request for confidentiality and respect it to the extent possible.
As a teacher, I am also required by our school to report incidents of sexual misconduct and thus cannot guarantee confidentiality. I must provide our Title IX coordinator with relevant details such as the names of those involved in the incident.
If you have an accommodation, I’ve been contacted by Student Disability Services with your determination letter. But please feel free to double-check with me or ask about any questions.
You may find additional resources at Access UChicago Now.