CSE 331: Course Info

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

We have also prepared an introductory video, available here (as "CSE 331 - Introduction", slides here), which discusses the goals of the course. At the end, we highlight a few of items from below that we want to be sure you don't miss while reading it through. Please find time to watch the video before lecture on the first day of class.

Course Structure

Prerequisites

The course assumes knowledge of the Java programming language at the level covered in CSE 123; however, students will not program in Java in this course. Instead, Java mainly will be used as a point of comparison for the languages that are used.

Topics

The course content will focus on techniques used by professional programmers to ensure that the programs they produce are, first and foremost, correct, as well as easy to understand, easy to change, and modular.

Correctness is achieved by writing careful specifications and then using tools, testing, and reasoning to detect bugs. Of these three, reasoning is the most important for detecting bugs. It is also skill (1) that best separates professional from amateur programmers and (2) that is most difficult for AI automate.

We will practice the techniques discussed above within the context of full-stack web applications. This is a good setting as the complexity of client-server interaction helps us to appreciate the difficulty of finding bugs (via debugging) when they are not caught by the techniques mentioned above. This difficulty only increases as programs get larger and more realistic, making it all the more important to detect and remove bugs when first writing the code. (Debugging and then reasoning carefully through the code is more work than just reasoning up front.)

Goals

The goals of this course are to teach students to:

  • Reason accurately so that the code they write is likely to work correctly the first time it is run.
  • Follow the accepted software engineering practices of reasoning, testing, and using the type system so that any reasoning mistakes are likely caught before a user sees them.
  • Practice defensive programming so that they will likely catch any errors that make it past the reasoning, testing, and the type system.
  • Understand the structure of larger-scale (client-server) programs so that they can effectively debug the failures do make it past those steps.
  • Structure their programs so that they are easy to understand, easy to change, and modular.

Textbook

There is no required textbook for the course. However, students may find the articles linked on the Resources page useful to read at some point during the course.

Additionally, many students, early in their CS careers, find the following book helpful (although it will not be referenced much if at all during the course):

  • The Pragmatic Programmer by Andrew Hunt and David Thomas, 20th anniversary (2nd) edition, Addison-Wesley, 2020.

Lectures

Lectures will be given in person, at the locations and times shown on the time schedule. The afternoon lecture will also be recorded for the benefit of students who are sick or otherwise unable to attend.

Sections

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

Each quiz section will be focused on preparation for the next homework assignment. A substantial portion of the time will be spent on practice problems similar to those appearing in that homework. It is very important that students take the time to work through the practice problems before attempting the homework to make sure they understand how to solve them.

Past experience indicates that section attendance is extremely important for being successful in the course. For that reason, participation in section is expected. Those who are sick or otherwise unable to attend can complete the practice problems on their own and submit their solutions in Gradescope by 5pm on Tuesday. (If a student is completely unavailable on the day of a quiz section, they can contact the instructors or their section TA to make special arrangements.)

If students do not attend section, do not submit a solution to the worksheet in Gradescope, and do not make special arrangements to submit later, then the staff will interpret that as a statement that the student is confident they can complete the homework on their own without any help from TAs, in particular, that they do not need one-on-one help in office hours. As a result, TAs will allocate their extremely limited time in office hours to students who do attend section or submit the worksheet on Gradescope. (Of course, students who skip section can still ask questions on the message board.)

Homework

As noted above, Tuesdays are intended to be used for working on the section worksheet, reading the official solutions, and asking questions to clarify any issues that were unclear. Homework assignments will generally be posted shortly after the last quiz section, on Tuesday evening.

Assignments can require either solutions in the form of written answers or typed code.

Past experience tells us that some of the homework assignments in this course can be very time consuming for some students. Students should plan to have at least 8 hours available per week to work on assignments, with the expectation that some assignments could require even more time depending on the student's background.

Students are expected to complete all homework assignments. Students who receive no (or essentially no) credit for multiple assignments risk failing. Outside of those circumstances, however, failing the course is highly unusual.

Occasionally, we will discover errors in an assignment after it is 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.)

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.

As noted above, office hours will be reserved for students who either attended section or submitted a solution to the section worksheet in Gradescope the prior Tuesday. Those who skip section can still ask questions on the message board, but one-on-one help in office hours is reserved for students who worked on the section problems as expected.

Homework Mechanics

Submission

All work will be turned in via Gradescope. For each assignment, you will turn in your written work and code separately.

You will turn in your written work to the "HW# Written" assignment on Gradescope. Make sure that any handwritten work is legible (and dark enough) for us to read. If the graders cannot read your solution, they cannot give you points. Also, when you turn in your written HW to Gradescope, please match each HW problem to where you did your work. If you do not do this, you may receive a point deduction.

You will turn in your code to the "HW# Code" assignment on Gradescope. You only need to submit the final version of each of the files you worked on in the assignment.

In the HW instructions, for each coding problem, we will identify which files you will need to upload to Gradescope. It is crucial that you only upload the files that we instruct you to, or else you may not pass the autograder. For example, if HW1 Problem 30 says to upload file example.ts and Problem 60 says to upload fun.ts, you should only upload example.ts and fun.ts to Gradescope. You should not put example.ts and fun.ts into a folder, and then upload the folder to Gradescope, as this will cause you to fail the autograder.

Be sure to look for any error messages from the autograder when you submit, and be sure that you received all of the auto-graded points. If you did not, you can examine the error messages, identify the problem, and then submit a corrected solution. Make sure you leave enough time to fix any errors that identified by the autograder. Try to avoid submitting for the first time in the last few minutes before the assignment is due because that will not leave you enough time to fix any problems encountered.

Regrades

If grading mistakes occur, students are encouraged to bring them to the attention of the course 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.

  • For the final assignment, HW9, the staff will not regrade individual parts. Students can request a regrade for the entire assignment, and their points may go up or down as a result.

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

Homework assignments are designed to be completed by the due dates listed. Situations may arise, however, where students are unable to complete the assignment 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 four late days total during the quarter.

Note that, if an assignment has separate due dates for the “written” and “coding” parts, then one late day allows both parts to be submitted up to 24 hours late.

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 4 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.

  • Finishing an assignment one date late usually puts the student behind schedule for the next assignment.

    The day after the assignment is due is intended to be focused on the section component of the next assignment. If a student is unable to fully concentrate on quiz section, then they go into the next assignment at a disadvantage. Hence, it is always to the students benefit to finish each assignment on time.

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 / code up their solution on their own, unassisted. Students who initially solve problems with a group, must list the other group members as "collaborators" in the written part of their solution.

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, as that would clearly violate the rules listed above.

AI Assistance

AI tools such as GitHub Copilot or ChatGPT are clearly not allowed under the policy described above. While using Copilot is entirely reasonable on personal projects, it must be turned off when completing the assignments in this course.

Such tools have essentially memorized all the code on the Internet. Asking the tool to produce code from its memory is no different, as far as we are concerned, from searching for the code and then copying it yourself. We explicitly disallow the latter, so the former is also disallowed.

On the other hand, students are allowed to look at outside resources in order to build up their understanding and then use their understanding to solve the problem. It is understanding that will get students a job. (No one will pay someone just to type prompts into ChatGPT. They can do that themselves!) Hence, any technique that short circuits the process of building up understanding is adverse to a student's long-term career goals, and so we disallow it.

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 disciplined. 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

Students are responsible for making sure that they submit solutions to the final version of the problems posted on the website. (As noted above, the initially posted versions of assignments sometimes contain errors.) Students should confirm that they have solved the final version by consulting the change log on the website before submitting their solutions.

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:

1% Knowledge Quiz
75% Homework
24% Final exam

The course will begin with a knowledge quiz meant to help students identify background that they are missing before starting. Students get full credit for completing the quiz, regardless of their score.

Homework assignments will not be weighted equally as they are of different length and difficulty. Later assignments will generally be weighted more heavily because they are more involved. In particular, we expect the individual assignments to have the following weights in the overall grade:

5.0% each HW 1–2
8.0% HW 3
9.0% each HW 4–6
10.0% each HW 7–9

That said, we may need to adjust the weights if any assignments turn out to be much more difficult or easier than expected.

Overall percentage scores will be translated into course grades as described in the following table:

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 exams. That would translate into an overall percentage score of 87%, 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%.

Exams

The will be no midterm exam this quarter.

The final exam will be held on December 10th from 12:30-2:20 in BAG rooms 131 and 154. Note that this may not be at the time and place listed in the UW final exam schedule. 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.

The exams will focus on the theoretical material, especially reasoning. (This is in contrast to HW8-9, which will focus on practical skills, namely, building full-stack applications.) In more detail, you should be prepared to (1) prove the correctness of straight-line code, recursion, and loops using the tools taught in class; (2) implement a function correctly according to its specification using straight-line code, recursion, or loops; and (3) write tests for functions containing straight-line code, recursion, or loops using the heuristics taught in class. The code above could be in a standalone function or a method of an ADT. (Note that, for any non-trivial loops, the loop idea and invariant would be provided.)

If you understood how to solve all the written homework problems, you should already be well prepared for the exam, which will consist of problems similar to those in the homework and section materials. Given the time constraints, you should expect the difficulty to be more like section problems than homework problems.

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.

Advice For Students

  • Start assignments early. Aim to complete them the day before they are due. Assignments are often more difficult than expected, and students should also to leave time to make and correct mistakes.

  • 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.

  • 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.