CSE 331: Syllabus

Students are expected to be familiar with all of the information below. Read it fully and carefully.

We have also prepared an inductory video, available here (as “CSE 331 — Syllabus”), which highlights the important items from below. Please find time to watch that before the first lecture on Wednesday, September 24th.

Course Structure

Prerequisites

The course assumes knowledge of the Java programming language at the level covered in CSE 123. In particular, we assume that all students are comfortable writing recursive functions.

Goals

The goals of this course are to teach students to:

  • Organize software so that it is easy to test, understand, and change.
  • Write precise specifications for individual components so that the only implementations satisfying the specification are the ones intended.
  • Understand which bugs are caught by the type system and which are not.
  • Choose test cases that meet industry standards for coverage.
  • Ensure that implementations are fully correct for all inputs by writing a proof of correctness.
  • Practice defensive programming so that any bugs not caught by the type system, testing, or correctness proof are quickly visible and easy to debug.

Topics

The course topics will alternate between those covering design and those covering implementation.

Design topics will focus on writing precise specifications, first for individual methods and then for classes (via abstract data types). Later, we will later discuss ways to make certain kinds of bugs impossible, either with the type system or with design patterns, and ways to make our designs more extensible with subtyping and generics.

Implementation topics will focus ensuring that code is fully correct for all inputs, which can only be achieved via mathematical proof. We will start with correctness proofs for functional programs and then move on to imperative programs and eventually abstract data types. Later, we will see additional tools needed to prove correctness of code that works with arrays. Finally, we will see how understanding correctness proofs allows us to write the code so that we know immediately that it is correct.

Textbook

There is no required textbook for the course. However, the lecture slides will at times make reference to the following book, which may be a useful reference for students working in Java:

  • Effective Java by Joshua Bloch, 3rd Edition, Addison-Wesley, 2017.

Lectures

Most of the lectures will be given in person, at the locations and times shown on the time schedule. Those lectures will also be recorded for the benefit of students who are sick and unable to attend.

We have found that success in the course is correlated with in-person lecture attendance. Students who want to do well in the course are strongly encouraged to attend in person.

Nine of the lectures (shown in purple on the course calendar) will be replaced by in-class work that completes the homework assignment. The lecture that would otherwise have been held at this time will be moved to video.

Concept Checks

To help ensure understanding of the concepts introduced in lecture (and to provide an incentive to attend lecture and keep up with the material), we will have regular, short quizzes on the lecture material, consisting of short, multiple choice questions and administered on Gradescope.

There will be one concept check per lecture. They are intended to be completed before the next class (lecture or section), but the absolute deadline is 6:00pm on the day after the lecture is given. Concept checks are autograded and can be attempted as many times as you wish before the absolute deadline. You only need to get 90% of the available concept check points over the whole quarter to receive full credit (that is, we will rescale the points so that 90% becomes 100%, 45% becomes 50%, etc.).

Sections

Each week includes a TA-led quiz section. These will not be recorded, but the printed material used will be posted on this website.

Each quiz section will begin the next homework assignment, usually completing about two of the homework problems in class and then going over the answers. It is very important that students take the time to work through the these problems before starting the rest of the homework on at home.

Past experience indicates that section attendance is extremely important for being successful in the course. For that reason, we will award students points for participation in section. Those who are sick will be able complete the problems on their own and submit their solutions in Gradescope by 6pm on Wednesday.

At-Home Work

After quiz section, students will be asked to complete at least three of the reamining practice problems at home and submit their solutions in Gradescope by 6pm on Friday.

Occasionally, we will discover errors in the problems after they are posted (typically, just small typos). We will maintain a log on the website with all changes made to the assignment. If (and only if) we believe there is potential for students to submit correct solutions to the earlier version, we will also email all students about the change. In particular, we will not send email if the earlier version is obviously nonsensical. (Most typos fall into this category.)

As with quiz section, this work will not be graded for correctness. Instead, students will receive participation points for submitting a solution to the practice problems that shows a good faith effort.

Students should do their best to try to answer each question correctly. The TAs will review these submissions in order to give students feedback on where points might have been lost had the problems been graded. Students should take time to carefully review all the TA feedback when it is released. The next attempt to solve problems like these will occur in class and that attempt will be graded.

In-Class Work

The next lecture time after the at-home work was due (each Monday, starting in the third week) will be in-class work on problems suspiciously similar to those completed in section or at home. Unlike the work done in section or at home, however, these problems will be graded.

Exams

The course will have a final exam but no midterm. See the Exams section below for further details.

Getting Help

Students can ask questions at any time on the message board. During normal working hours, they should receive a response within a fairly short period of time (almost always under an hour).

Each member of the course staff will have at least one office hour every week, where students can get one-on-one help. See the home page for times and locations.

Note, however, that office hours are the most limited resource available to students — those held near the due date of assignments are almost always oversubscribed — so asking questions on the message board should always be preferred.

Homework Mechanics

Submission

At-home work will be turned in via Gradescope. After each assignment is reviewed by TAs, students will be able to see their feedback in Gradescope.

In-class work will be scanned and posted to Gradescope by the staff. After the assigment is graded, students will be able to see their grades in Gradescope.

Regrades

If grading mistakes occur, students should to bring them to the attention of the staff and see that they are corrected. They can do so by requesting a regrade in Gradescope, with the following caveats:

  • We will only entertain regrade requests for one week after the grades are initially are posted. In particular, students searching for extra points late in the quarter by requesting regrades of problems from early assignments will be ignored.

  • While regrades can (and should) be used to fix mistakes where a correct solution is mistakenly marked incorrect, they cannot (and should not) be used to request changes to amounts of points deducted for errors. Deductions are applied consistently to all students. We will not give one student a smaller deduction than others who made the same (or very similar) mistakes, so do not ask us to do so.

  • If students wish to fix an inconsistency between the grading of two assignments that had similar answers, both students must request a regrade. That way, the staff can determine whether the appropriate correction is to add points to the student with the lower score or remove them from the student with the higher score. If only the student who lost points requests a regrade, it will be ignored.

Policies

Inclusiveness

Students should expect and demand to be treated with respect by their classmates and the course staff. All students belong here, and the staff is here to help them learn and enjoy a challenging course. If any incident occurs that challenges this commitment to a supportive and inclusive environment, students should let the staff know so the issue can be addressed. You can use the anonymous feedback tool if you would like to tell us something anonymously.

Late Policy

At-home assignments are designed to be completed by the due dates listed. Situations may arise, however, where students are unable to complete the at-home work by those dates. For that reason, the staff will allow students to submit assignments one day late with no penalty, provided that the following conditions are met:

  • Students use no more than one late day per assignment. A “day” means 24 hours from the original due date/time.
  • Students use no more than three late days total during the quarter.

Late work not meeting these conditions (i.e., more than 24 hours on one assignment or more than four assignments) will only be accepted after a discussion with course instructor. There is no need to talk to the instructor until all three late days have been used or more than one late day is needed on an individual assignment.

Students do not need to take any special action when submitting an assignment late. The course staff will note the late submission and keep track of how many late submissions have occurred.

In addition, please note that:

  • Anything more than 10 minutes late is just as late as something submitted the next day.

  • Late days are intended to cover any emergencies that arise. We do not grant extra late days beyond the first four, just for emergencies — those four are intended to cover most emergencies.

Students who are sick and cannot attend the in-class portion of the homework assignment must notify the instructor to arrange a make-up time within the next 1-2 days. We understand that this will not always be possible. For that reason, we plan to drop the lowest homework score for each student before calculating final grades, which will leave out the missed work.

Collaboration

Students are allowed to discuss homework problems with others, but they must write or type their solution individually, without assistance.

Student solutions are not group work. Students can work together to solve problems, but then, they must leave the group, taking no written or electronic records of group work with them; wait at least 20 minutes; and then write up their solution on their own, unassisted.

This policy clearly precludes copying code off of the Internet. Hence, students should not consult the Internet for problems or key-phrases. This includes Google, Stack Overflow, reddit, and any other website. However, students may consult the internet for ideas, definitions, and understanding general concepts.

Each student should keep anything they plan to submit as a solution completely private. Under no circumstances should they give a copy of their code or written work to another student.

AI Assistance

AI tools are not disallowed for the at-home portion of the assignment. However, past experience indicates that students who use AI to complete problems do worse on the graded portion than those who do not. For that reason, we recommend that students only use AI on those problems where AI use is explicitly indicated.

Academic Integrity

As noted above, the staff expects each student to write their own solutions, independently. Attempting to misrepresent another student's solution as their own would be unfair to the other students in the course and constitute academic misconduct in violation of the Allen School policy. Any such violation will be reported to University, and the instructors will make every attempt to ensure the harshest allowable penalty.

Note that, in cases where one student copies the solution of another, both students have violated the policy and both will be reported. Again, all students should keep their solutions private.

If a student is ever unclear about whether their discussions with other students went over the line, they should (a) ask and (b) describe their collaboration clearly on their assignment. If they do, the worst that will happen is losing some points. That is much better than the alternative.

Accommodations

Please refer to university policies regarding disability accommodations and religious accommodations.

Grading

Homework Grading

Graders will identify incorrect answers in submitted solutions and deduct points commensurate with the severity of the errors made. They will aim to deduct points consistently across all assignments making the same or similar errors.

In addition, the course has the following policies:

  • Graders will ignore requests to change the amount of points deducted. These amounts, as long as they are applied consistently, are entirely at the discretion of the course staff.

  • Graders will ignore legalistic arguments about why incorrect solutions should be accepted under an alternative reading of the problem statement. Incorrect answers will be marked as such as long as the staff believes the intention of the problem statement was clear.

  • Talking to a staff member does not take away the student's responsibility to submit a correct answer. The staff will not accept incorrect answers due to a claim that some staff member said it was acceptable. Students sometimes misunderstand what TAs are trying to say, and in any case, it remains the students responsibility to make sure their understanding of the problem statements matches up with the plain meaning of the instructions given in the assignment or class.

Course Grades

Overall scores for the course will be determined roughly as follows:

4% Concept Checks
72% Homework
24% Final exam

Each homework assignment is worth 9% of the grade: 2% of the points are section participation, 3% of the points are for participation on the at-home work, and 4% of the points are for the in-class work.

Finally, note that, while we will have 9 homework assignments, only 8 of them will count in the final grade, as we will drop each student's lowest homework score. This policy is primarily intended to account for students who are sick for the in-class portion of some homework assignment, at both the regular date and any potential make-up date.

We tentatively intend to translate percentage scoures into course grades using the following table. However, since this is the first time using this arrangement of at-home and in-class work, it is possible that this will need to be adjusted. That said, adjustments are likely to only be made to increase student grades, so those given by this table can be assumed to be a floor on what actual grades will be.

96.5% 4.0   84.0% 3.4   71.5% 2.8
94.5% 3.9   82.0% 3.3   69.5% 2.7
92.5% 3.8   80.0% 3.2   67.5% 2.6
90.5% 3.7   78.0% 3.1   65.0% 2.5
88.5% 3.6   75.5% 3.0   63.0% 2.4
86.0% 3.5   73.5% 2.9   61.0% 2.3

Grades for scores below 60% will be determined by the instructors on a case-by-case basis. (In particular, we reserve the right to pass students whose percentages would fall below 2.0 if we continued the table above.)

We expect the median grade to be about 90% on the homework assignments and 80% on the exam. That would translate into an overall percentage score of 88%, using the tentative weights in the first table above. Per the second table, that translates to a 3.5 grade as it is above 86.0% and below 88.5%.

Each assignment will include an optional extra credit problem. These problems will not count toward the final grade unless students are within 0.3% of the next grade cut-off. Students who successfully complete a few extra credit problems will see their grade rounded up as much as 0.1%. Students who successfully complete all of the extra credit problems could see their grade rounded up as much as 0.3%.

In-Class Mechanics

For in-class work, students must bring their UW ID and have it ready to be checked. This work will be closed notes, with no electronics.

Exam Mechanics

The will be no midterm exam this quarter.

The final exam will be held on December 9th from 12:30pm to 2:20pm in KNE 120. If you have a conflict, please contact course staff as soon as possible and at least a week in advance of the exam.

Students must bring their UW ID and have it ready to be checked during the exam. The exam will be closed notes, with no electronics.

The exams will be similar to the homework assignments. Students who understood how to solve all the homework problems should already be well prepared for the exam, which will consist of problems similar to those in the homework.

Since students often request additional practice materials, here are some that you can look at:

As noted above, it is probably not necessary to work through these practice materials in order to do well on the final. It is more important to be sure you understand how to solve all homework problems.

Advice For Students

  • Prefer the message board to office hours. Office hours get very busy, especially in the last 48 hours before assignments are due. (Yet another reason to start early is so that students can attend office hours that are less busy.) Even just before assignments are due, however, questions on the message board are usually answered within a short period of time.

  • Do not skip class to work on homework, not even late in the quarter when students are more tired and busy. Doing so often seems like it will save time in the short run, but it will cost time in the long run.

  • Think about which lecture material applies to that homework problem. As described above, each assignment is intended to apply ideas from lecture, so if it does not seem that any lectures apply to a given problem, it is nearly certain that the student did not understand some part of some lecture.

  • Do not blindly trust outside resources. Most people do not program like we do in this course. A student's goal should be to solve homework problems "like a 331 student" and not "like an average programmer". Outside resources may mislead you about what we are trying to teach you.

  • Focus on understanding, not on getting points. A student's understanding of the material, not the points they received, is what will get them a job and ensure a successful career as a programmer.