Syllabus
1 Introduction
Welcome to CPSC 312!
In this course, we will streeeeetch our minds around two programming languages that you may find strange. Why bother doing that? You might go out and use these as your “home” programming languages for the rest of your career, but the real point is that stretching your concept of programs and programming will make you a better designer, programmer, and thinker.
Maybe you’ll write a unification engine and EDSL to support constraint-based reasoning in a medical search engine. Maybe you’ll teach your team how to make snapshotting, undo, and time travel easy in your game by building it on a pure functional core. Maybe you’ll just have an easier time understanding the next shiny new popular language feature that was actually imported from long-standing practice in a functional or logic programming language.
Regardless, you’ll have some fun and (re?)discover a bit of the magic of code.
Acknowledgments:
- UBC’s main Vancouver campus—including our classroom and other course spaces—is located on the traditional, ancestral and unceded territory of the Musqueam people. These lands have always been a place of learning for Musqueam youth, who were instructed in their culture, history, and tradition, and who in turn shared their knowledge with a new generation.
- Materials in this course have been based on fantastic work by others, including especially David Poole/UBC CPSC 312, Brent Yorgey/UPenn CIS 194, and Mattox Beckman/Illinois CS 421.
- Our “CPSC 312: Minds Blown Weekly” logo is by Naomi Wolfman.
Also see the Thanks below.
2 Course Staff
Steve Wolfman wolf@mail.ubc.ca (instructor)
TAs:
- Oleg Yurchenko olegy03@student.ubc.ca
- Youssef Saleh ysaleh03@student.ubc.ca
- Shibo Ai sai02@student.ubc.ca
Nanjou Olsen nxengilo@student.ubc.ca
- Kevin Huang jiajun03@student.ubc.ca
3 Health, Safety, and Wellbeing
All of us are people first and students/staff second (or maybe nth). Learning and teaching is challenging if you’re not healthy, safe, and secure.
If you face any challenges in CPSC 312 to your health, safety, or security, please bring them up with us! We will try to support you. (For academic concessions, we guarantee to at least note your concern for careful review at end-of-term as we finalize course grades. More generally, we’ll try to be reasonable and flexible!) Also see UBC Senate’s Policies and Resources to Support Student Success.
Masking is optional but encouraged in class.
If you are sick and may be infectious, please don’t attend any in-person course activities! Alternatives to in-person attendance when you’re unwell:
- Lectures will be recorded and streamed via Panopto. (We’ll also have in-person activities from which you won’t benefit much. So, don’t regularly miss class! Some you can complete on your own outside of class. For the others, you can get full credit while missing quite a few class sessions.)
- Our roughly bi-weekly quizzes are in-person. If you’re ill, don’t attend! See Quizzes below for how to make-up a missed quiz.
- While some help sessions (office hours) will be in-person, others will be online or hybrid.
- Projects will be presented via a pre-recorded video.
If the course staff is sick, we’ll either get coverage for the class, switch to online (hopefully with the online feed streamed in our normal room), or cancel class.
In case of extreme weather events, we will switch class sessions to online (or cancel and reschedule), reschedule quizzes to the corresponding upcoming make-up session, cancel one-off help sessins or move them online, and extend deadlines on other activities as needed. Please monitor the course’s Piazza site for announcements and details in the event of extreme weather. (If the final quiz time is impacted by extreme weather, we will follow UBC’s guidelines for final exams, although our final quiz is much lower-stakes than a typical UBC final exam.)
4 Prerequisites and Preparation
Prerequisites are available on UBC’s CPSC_V course list.
For preparation beyond that:
- A large majority of CPSC 312 students have taken or challenged CPSC 110. That gives them some experience with functional programming. If you haven’t, you may need to study a little harder in the Haskell unit (which is fine, but worth knowing!).
- Class and assessments will both include extensive computer use. For class, consider bringing (or sharing) a device. We expect at least half of students will write quizzes in the CBTF. If you are unable to use your own device for Quizzes, let us know, and we will ensure you have a CBTF seat.
5 Evaluation
Your course mark will be based on the following breakdown. The course staff reserves the right to change this scheme in ways that will not hurt any student’s grade.
Category | Weight |
---|---|
Quizzes (7 planned) | 66% |
Assignments (3–5 planned) | 6% |
Projects (1 planned) | 20% |
In-Class Exercises (~5–7 planned) | 6% |
In-Class Participation (most lecture days) | 2% |
To pass the course, you must also earn a passing overall quiz grade. (If your overall quiz grade is failing, your course grade will be the minimum of 45% and your normally-computed course grade. See Quizzes for how the quiz grade is calculated.)
5.1 Flexibility in Grading
To support student success, we try to make each graded component flexible and supportive of your effort toward mastering course material.
We provide various ways to make up or improve your quiz work, described in the Quizzes section. Assignments will be graded so you can reach full credit without a fully correct solution and allow late submissions for partial credit (see Assignments). We will give you interim feedback on your project to help you succeed (see Projects). In-Class Exercises will be available to complete across multiple class sessions, allow multiple retries with feedback, and will automatically scale so that 90% credit earned on each one is worth 100%. In-Class Participation does require you to come to class but will automatically scale so that 80% credit earned on in-class participation overall is worth 100%.
In addition, we have Bonus Points. For every power of two you reach in bonus points, we shift 1% point of weight from the category with your lowest grade to the category with your highest grade. And there are other fabulous rewards that come with Bonus Points!
5.2 Academic Concession and Regrade Requests
If circumstances arise in your life that negatively affect your work, tell us about it. (Via any of our Communication mechanisms, including e-mail.) We guarantee to at least keep a record of your concerns to review at the end of the term. Remember that communicating sooner (and ideally before deadlines) is better than later, and anytime is better than never.
While we listen to concerns any time, to get a regrade, you must make a clear and complete request within two weeks of your grade being available, using the feedback mechanism for that assessment. A good request lays out all issues you have with the grading with clear reference to the question, your solution, any provided solution and rubric, and the grading to show how you believe your solution should have been graded differently.
For PrairieLearn assessments, submit an “issue” on the individual question. (We expect this to cover quizzes, assignments, and in-class exercises.) For in-class participation, contact Steve. For your project, contact your assigned team shepherd on the course staff. If that is insufficient, contact Steve. For later assessments (especially later project milestones and the final quiz), we may reduce the two week period for regrade requests.
For regrades, the course staff will review the marking in context and respond with a final grade. The grade can go up or down based on review. The reviewed grade is final, but you are still welcome to communicate further concerns to us.
For other concerns, see UBC’s Review of Assigned Standing policy.
6 Important Dates
Also see our Schedule.
Date | Description |
---|---|
Tue Sep 3 | Imagine Day |
Wed Sep 4 | First day of regular classes |
Mon Sep 16 | Add/Drop deadline |
Mon Sep 30 | National Day for Truth and Reconciliation (UBC closed) |
Mon Oct 14 | Thanksgiving (UBC closed) |
Roughly Wed Oct 23 | Quiz make-up/retakes; exact date/time TBA as we schedule with the CBTF and a second room (anticipated: 7–9PM) |
Fri Oct 25 | Drop with W deadline |
Mon–Wed Nov 11–13 | Midterm break |
Fri Dec 6 | Last day of regular classes |
Dec 10–21 | Exam period. (Our exam is one normal quiz + make-up/retakes. We’ll know the date when you do!) |
7 Rough Topic Schedule
Here is a tentative schedule of topics. Depending on our progress and interests, we may move faster or slower through some parts and add or drop topics.
(Quiz dates are confirmed as of 2024/09/04, except the final quiz which will be during our scheduled final exam slot.)
Unit | Approximate Dates | Topic |
---|---|---|
1 | Sep 4–Sep 6 | Welcome to CPSC 312 |
2 | Sep 9–Sep 13 | Intro to Haskell, Functions, & Recursive Functions |
3 | Sep 16–Sep 18 | Algebraic Data Types |
Sep 20 | Quiz #1 | |
4 | Sep 23–Sep 25 | Polymorphism and Higher-Order Functions |
5 | Sep 27–Oct 2 | Ad Hoc Polymorphism and Type Classes |
Oct 4 | Quiz #2 | |
6 | Oct 7–Oct 11 | Monads and I/O |
7 | Oct 16–Oct 21 | Intro to Prolog: Prop Logic, Syntax/Semantics/Proofs |
Oct 18 | Quiz #3 (Haskell only) | |
8 | Oct 23–Oct 25 | Prolog Box Model, Extending to Datalog |
9 | Oct 28–Oct 30 | Recursion and Extending the Language |
Nov 1 | Quiz #4 | |
10 | Nov 4–Nov 8 | Lists and Trees |
11 | Nov 15–Nov 20 | Unification |
Nov 22 | Quiz #5 | |
12 | Nov 25–Nov 29 | Negation as Failure and Applications |
Dec 2–Dec 4 | Project Discussions | |
Dec 6 | Quiz #6 |
8 Communication
Outside of lecture time, most communication with the course staff should go through discussion in Piazza, or sometimes via issues on PrairieLearn. For private matters you’re not comfortable sharing there, definitely feel free to e-mail us.
In terms of online systems, we will use this website, Canvas, Piazza, and PrairieLearn. You will also submit video presentations for your project, hosted however you like (e.g., YouTube, Vimeo, or your web space on a students.cs.ubc.ca server).
9 Quizzes
The highest-stakes assessments we will have are roughly bi-weekly quizzes. Quizzes will be held in-person during lecture time (plus the final exam time) using PrairieLearn. If you do not have a reliable (networked) computer, let us know! (In that case, we will accommodate you in the CBTF.) Quizzes are individual work. You may not collaborate with anyone else or consult resources except those listed in the PrairieLearn assessment page.
Our quizzes replace exams for the course. So you should expect a quiz to be shorter than an exam but with similar types of questions. Quizzes will focus on content from the most recent 2–3 weeks but can ask about any previous course material. (The final quiz will ask questions from across the course.)
Your overall quiz grade is the average of the percentage grades of your quizzes, after adjusting for make-up quizzes and then dropping the quiz for which you received the lowest grade. You will have two opportunities (listed on the Schedule, one for quizzes 1–3 and one for quizzes 4–6) to take a make-up quiz. A make-up quiz is a similar but new quiz targetting the same learning objectives as the original. You must schedule your make-up plans in advance via a scheduling system the course staff will post as each make-up session approaches. If you do not take a make-up, your effective quiz grade for that quiz is whatever you earned originally. If you do, your effective quiz grade is 20% of the original grade plus 80% of the new grade. You make retake a maximum of two of Quizzes 1–3 and two of Quizzes 4–6, but you are not required to retake any quiz. (If you have an excused absence for a quiz, reach out to us for how to make-up that quiz and manage any other retake(s) you plan.)
See the Schedule for more details.
10 Assignments
Our series of short assignments will focus on hands-on practice with the course material. The assignments are primarily for your practice and learning. We will design grading for each assignment to reflect that: allowing full credit even before you reach a fully correct solution. Assignments will be submitted on PrairieLearn. In each assignment, look for the “maximum points” on a question to see how many of the available points you need to earn for full credit. Each assignment (except possibly the last) will also list a late submission deadline for 75% credit.
Assignments are to be completed and submitted individually, but with some caveats you may collaborate with anyone and any resource. Refer to the Academic Conduct guidelines right away for the caveats. (Roughly speaking: acknowledge any person/resource that helps you and take a short break before writing up your own solution on your own.)
See the Schedule for more details.
11 In-Class Exercises
In-class exercises will also be completed as “homework” on PrairieLearn. The exercises are designed to accompany lecture and to prepare you for quizzes. Each set of in-class exercises scales your mark so that earning 90% of the available points on the exercise is worth a 100% mark. As with assignments, each exercise set (except possibly the last) lists a late submission deadline for 75% credit. If lecture runs faster than expected, we will leave in-class exercise deadlines unchanged. If lecture runs slower than expected, we will extend in-class exercise deadlines.
You may work freely with others on in-class exercises, but ensure you learn from them so you’re well-prepared for quizzes!
See the Schedule for more details.
12 In-Class Participation
In-class participation will be via Agora (with the “join code” coming on Piazza), with some points available simply for attendance and some for being willing to participate. The exact breakdown is coming soon, but marks will be scaled so that earning 80% of the available marks yields a 100% grade. There may be bonus points available for actually participating vs. only indicating willingness to do so. This is the only in-class element of the course that cannot be earned remotely, but also allows more than two weeks of absence without losing marks.
Agora is an experiment for us this term. If we run into trouble that we cannot resolve, we will move one or both of the 2% points for in-class participation onto In-Class Exercises instead; so, keep up with the exercises!
UPDATE: See Piazza for details of Agora/In-Class Participation grading. One key clarification is that in-class participation may only be done in-person. Participating remotely is academic misconduct. If you cannot attend occasionally, that’s no problem. You can earn 100% while missing multiple weeks of class. If you plan almost never to attend, take a zero on this part of the evaluation and use bonus points to improve your course grade.
13 Projects
Outside of lecture and a quiz, the last roughly 2.5 weeks of CPSC 312 will be dedicated to a course project completed in teams of 3–5. You will have substantial freedom in the topic of your project, but it must use either Haskell or Prolog (or another similar language you clear with the course staff at the project proposal stage).
There will be three major stages to the project:
- Propose a Haskell-based project (due mid-term, everyone proposes one!)
- Propose a Prolog-based project (due late-term, everyone proposes one!)
- Complete one project of your choice from your proposals.
We will give feedback on each proposal (with rapid feedback on the Prolog proposal, since you will be starting on your project then!). When completing your project, you will have check-ins with your team’s project facilitator from the course staff about once per week leading up to the final submission (of code and a video demo).
You guessed it: See the Schedule for more details.
14 Academic Conduct
Collaboration enhances the learning experience. We encourage collaboration in various ways throughout the course, subject to the rules stated here.
Course staff: You can ask us for help and show us solutions regardless of any limits below.
In-Class Exercises: We welcome collaborative work and use of resources on in-class exercises (even if you’re working on them outside of class!). Do try problems yourself first! It helps with learning.
In-Class Participation: When the course staff isn’t addressing the class or specifically asking you to work alone, we welcome you discussing participation questions with your neighbors. In the end, you have to participate for yourself, however!
Assignments: Assignments are your individual work. You may also work with any person or resource subject to these rules:
- Spend 15 minutes trying each problem yourself first.
- Collaboration with others is for planning, experiments, discussion, and brainstorming. Take no record away from the session (no files, notes, stone tablets, etc.), except your collaborators’ names, which you’ll need below.
- After collaborating, do something else for 30 minutes that is so distracting that you must have learned anything you can then reconstruct. (Have fun!)
- Write up your own solution independently, using your own words and code. (Where you copy/quote from resources, cite and acknowledge as always!)
- Acknowledge all collaborators and resources in your submission (except the course staff).1
Our Piazza site is a bit of a special case. To encourage discussion, we are allowing posting assignment solution snippets there in questions, but keep them short and to the point. Please see the Rules for Piazza Posts post for more details and evolution of that policy as we see how it works!
Projects: Projects are group work. Within your project group, you may collaborate however you wish. You may also work with any person outside your group or any resource subject to the rules for assignments above with the addition that you may use packages/libraries and adapt existing code (both with clear citation) as needed.
(For advice on group work, speak with the course staff and check out All I Need to Know About Pair Programming I Learned in Kindergarten for light-hearted but thoroughly researched advice.)
Quizzes: Quizzes are strictly individual work and gollow the University’s rules for Student Conduct during Examinations, including disallowing any communication by any means with anyone besides the invigilators except where specifically noted in the instructions.
Violation of any of these rules constitutes academic misconduct and is subject to penalties ranging from a grade of zero on a particular assignment to indefinite suspension from the University. If you are uncertain as to what is or is not reasonable collaboration, or you’re having problems understanding or keeping up, please contact the instructor or a TA. Don’t cheat! It sucks the soul from the course.
15 Thanks
Major acknowledgments are at the top. Additional acknowledgments include:
This policy itself is based on the Gilligan’s Island Rule picked up at UW CSE, probably from Larry Snyder or Larry Ruzzo. It’s so easy to confuse Larrys (Larries?).↩︎