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@cs.ubc.ca (instructor)
Andy Worth jellekr0@student.ubc.ca (TA)
Eric Conlon ejconlon@cs.ubc.ca (TA)
Tarcisio Teixeira tsoares@cs.ubc.ca (TA)
3 Health, Safety, Wellbeing, and COVID-19
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 well-being, please bring them up with us! We will try to support you. (For accommodations, the minimum we guarantee is to note your concern for 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.
We are, sadly, still in the midst of the pandemic. Here is our situation:
- In keeping with UBC’s official return plan, CPSC 312 has opportunities for in-person instruction and has in-person assessments.
- Many in our course are likely to be anxious, at risk, or both, regardless of the plan. (Steve W is immune-suppressed and may have little protection from his vaccinations.) So, we have mechanisms available to limit in-person contact.
- In keeping with BC’s mandate, masks are required for all in-person course activities. (Except where needed for your health, please refrain from eating and drinking in class. There are a few exemptions to the mask mandate; if you believe you are exempt, please contact the Centre for Accessibility (mailto:info.accessibility@ubc.ca).)
- We have lots of good ways to participate remotely or catch up so do not come to class if you are sick.
- The virus ignores all guidance. We may suddenly have to shift online.
Therefore:
- Lectures will be recorded and (technology-permitting) streamed. You can stream online or attend in person. (We will have a venue for online participation.)
- Quizzes will be in-person but spread over multiple rooms to minimize risk.
- Help sessions will be online or in larger/less crowded spaces.
- Projects will be presented via a pre-recorded video.
- We will build flexibility into our grading plans (for COVID concerns but also for supporting student well-being in general).
- Students unable to attend in-person course activities: See Quizzes below for how to make-up a missed quiz. For any other activity, use an online alternative.
- Staff unable to attend in-person course activities: If we cannot get coverage, we will cancel in-person help sessions (sorry!) and move in-person lectures online. For assessments, if too few staff can attend to invigilate, we will move the quiz into the mid-term or end-of-term make-up sessions described in Quizzes below. (We will ensure extra backup coverage in the end-of-term make-up session.)
As the course instructor, I ask you out of respect for my own health status and many students’ likely concerns to get vaccinated and wear a mask at any in-person course event. As of now, masks are required at all in-person course events. Vaccines are required for many purposes, and you will be required to test regularly for COVID-19 if you have not been vaccinated.
4 Prerequisites and Preparation
Prerequisites are available on the CPSC 312 calendar entry.
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 (in-person) assessments will both include extensive computer use. For class, consider bringing (or, if safe, sharing) a device or working remotely. We will accommodate those without devices for Quizzes.
5 Evaluation
Your course mark will be based on the following breakdown. The course staff reserves the right to change this scheme, but we do not anticipate using that right except in consultation with the class as a whole.
Category | Weight |
---|---|
Quizzes (7 planned) | 66% |
Assignments (4–7 planned) | 7% |
Projects (1 planned) | 20% |
In-Class Exercises (~5–7 planned) | 7% |
To pass the course, you must also earn a passing quiz score. (If your overall quiz score is failing, your course grade will be the minimum of 45% and your normally-computed course grade.)
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 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 Special Accommodation 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.) At the very least, we will 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 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 7 | Imagine Day |
Wed Sep 8 | First day of regular classes |
Mon Sep 20 | Add/Drop deadline (and election: vote!) |
Thu Sep 30 | National Day for Truth and Reconciliation (UBC closed) |
Mon Oct 11 | Thanksgiving (UBC closed) |
Mon Oct 25 | Quiz make-up/retakes (6–8PM) |
Fri Oct 29 | Drop with W deadline |
Wed–Fri Nov 10–12 | Midterm break |
Tue Dec 7 | Last day of regular classes |
Dec 11–22 | Exam period. (Our exam is 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.
Week | Dates | Topic | Actual Topic |
---|---|---|---|
1 | Sep 8–Sep 10 | Intro to Haskell | Welcome to CPSC 312 |
2 | Sep 13–Sep 17 | Functions, Recursive Functions, and Type Inference | Intro to Haskell, Functions, & Recursive Functions |
3 | Sep 20–Sep 24 | Algebraic Data Types and Pattern Matching | Algebraic Data Types |
4 | Sep 27–Oct 1 | Polymorphism and the Prelude | Polymorphism and Higher-Order Functions |
5 | Oct 4–Oct 8 | Typeclasses and “ad hoc” Polymorphism | Ad Hoc Polymorphism and Type Classes |
6 | Oct 11–Oct 15 | Lazy evaluation and maybe some bonus IO | Monads and I/O |
7 | Oct 18–Oct 22 | Intro to Prolog | Intro to Prolog: Prop Logic, Syntax/Semantics/Proofs |
8 | Oct 25–Oct 29 | Prolog Syntax, Semantics, and Execution Model | Prolog Box Model, Extending to Datalog |
9 | Nov 1–Nov 5 | Recursion and Extending the Language | |
10 | Nov 8–Nov 12 | Lists and Trees | |
11 | Nov 15–Nov 19 | Negation as Failure, Unification | |
12 | Nov 22–Nov 26 | Applications: Natural Language Understanding | |
13 | Nov 29–Dec 3 | Applications: Semantic Web | |
14 | Dec 6–Dec 7 | End-of-Term! |
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, PrairieLearn, and the department’s remote servers (for Haskell and Prolog environments). 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. You will need a computer and internet connection for the quiz. We expect most but not all students will have one. Those without can take the quiz in a lab room we will schedule. 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 quiz grade will be the average of the percentage grades of your quizzes, after dropping the quiz for which you received the lowest grade. You will have two opportunities (listed on the Schedule) to take a make-up quiz because you missed the corresponding quiz or you simply want to replace your grade. You must schedule your make-up plans in advance via a survey the course staff will post as each make-up session approaches.
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.
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 Projects
Outside of lecture and a quiz, the last 2.5 weeks of CPSC 312 will be dedicated to a course project completed in teams of 2–4. 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.
13 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.
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.
14 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?).↩︎