CS 32 Spring '22

1. General info

Instructor: Mehmet Emre – emre@cs.ucsb.edu

Teaching Assistants: Jiarui Zhu, Vivian Ross, Lucas Relic

Learning Assistants: Qiru Hu, Anshuman Dash

This course is a continuation of introductory classes CS 16 and CS 24. We are going to explore more features of C++, generic programming, object-oriented programming, programming tools and compilation pipeline, and some data structures and algorithms along the way.

More details about course objectives and structure are in the syllabus.

We are using

  • GauchoSpace for class forums,
  • this website for disseminating materials, and
  • GradeScope for submitting assignments.

2. Office Hours

Time Person Location
Monday 3–4pm Jack Phelps 3525 (where your lab section is)
Monday 4–5pm Qiru Online (see GauchoSpace for the Zoom link)
Tuesday 11am–12pm Mehmet Online (see GauchoSpace for the Zoom link)
Wednesday 3–4pm Lucas Online (see GauchoSpace for the Zoom link)
Thursday 10–11am Vivian TA Trailer
Thursday 2–4pm Anshuman Online (see GauchoSpace for the Zoom link)

3. Important dates

  • The homework assignments are due Wednesday before class. They are assigned in pairs most of the time.
  • The labs are due Tuesday 11:59pm, so you will have a chance to work on them in the lab hours.
  • The tentative exam dates are:
    • Midterm 1: Wednesday, 4/27 in class.
    • Final: Tuesday 6/7 3–6pm according to the registrar. Subject to change.

4. What to do by the first lab

4.1. Make sure you have a CSIL account and know how to use it

Ideally, before this lab begins, you will have been instructed to visit this link, and create your College of Engineering (CoE) computer account. You need to do this only if you don't have a CSIL account already.

You should already know the following from CS16 / CS24. If not, alert your TA/instructor immediately:

  • How to log in with your CoE/CSIL account.
  • How to use the Linux computers in:

    • Phelps 3525 (the computer lab where your sections are scheduled in), and
    • Computer Science Instructional Lab (CSIL) at Harold Frank Hall (accessed through an outside door on the side facing the ocean).

    The Linux computers in both places work the same way.

After making sure of this, go on to read the instructions for Lab 1.

5. Working in pairs

You can choose to work in pairs for some of the labs, in that case:

  • Review the following explanation on pair programming and Falco's definition for "strong-style pair programming".
  • Make an agreement to be respectful and work together to maximize your learning benefit.
  • There are many ways to do pair programming, we suggest:
    • Finding a partner of a similar skill level/confidence with C++ programming.
    • Finding a style that works best for you and your partner.
      • You can switch roles once per "step" (section) in the lab.
      • Or, you can switch roles periodically (e.g. every 10/15/20 minutes).
  • When you are not working at the physical lab, you and your partner can work using Zoom and screen sharing. If you are using Visual Studio Code, it has a pair programming plug-in. I have not personally used it, so you are on your own if you want to use it.
  • If you don't have a partner, you can use this GauchoSpace forum to find partners. Mention which section you are in, when you are making a post. If you don't have a partner by 9/27, I will send out a survey to match up people who are still looking for a partner.
  • You don't need to have the same lab partner for the whole class. If you want to change lab partners or work by yourself for any reason, let your current partner know as soon as possible and finish up any labs you have started working on together.

Make sure that you are both working on the lab assignment actively and together. The following arrangement is NOT OK:

  1. Students A and B form a pair.
  2. A works on the lab by themselves on Tuesday.
  3. B takes the work A has done so far and finishes the lab on Wednesday.

In the scenario above, A and B worked on only half of the lab assignment and did not practice half of the material in the lab, so it is not OK.

5.1. Additional requirements when working in pairs

  • Your partner must be enrolled in the same lab section as you.
  • You and your partner must agree to work together outside of lab section in case you do not finish the lab during your lab section. You must agree to reserve at least two hours outside of lab section to work together if needed (preferrably during an open lab hour where you can work in Phelps 3525 and ask a mentor for help). You are responsible for exchanging contact information in case you need to reach your partner. You can also work over Zoom, but make sure you know how to use SSH to connect to CSIL computers in that case.
  • You must write your names and perm numbers on each file submitted to Gradescope.

6. Lectures

7. Homeworks

This section contains the homework descriptions and any supplementary material you may need for the homework assignments. You are going to submit your homeworks to Gradescope. You can choose to type it up or fill the blanks in the PDFs provided below:

Homework Assigned Due
Homework 1 HTML / PDF / LaTeX <2022-03-28 Mon> <2022-04-06 Wed> @ 12:30pm
Homework 2 HTML / PDF / LaTeX <2022-03-28 Mon> <2022-04-06 Wed> @ 12:30pm
Homework 3 HTML / PDF / LaTeX <2022-04-06 Wed> <2022-04-13 Wed> @ 12:30pm
Homework 4 HTML / PDF / LaTeX <2022-04-06 Wed> <2022-04-13 Wed> @ 12:30pm
Homework 5 HTML / PDF / LaTeX <2022-04-13 Wed> <2022-04-20 Wed> @ 12:30pm
Homework 6 HTML / PDF / LaTeX <2022-04-13 Wed> <2022-04-20 Wed> @ 12:30pm
Homework 7 HTML / PDF / LaTeX <2022-04-20 Wed> <2022-05-04 Wed> @ 12:30pm
Homework 8 HTML / PDF / LaTeX <2022-04-20 Wed> <2022-05-04 Wed> @ 12:30pm
Homework 9 HTML / PDF / LaTeX <2022-05-04 Wed> <2022-05-11 Wed> @ 12:30pm
Homework 10 HTML / PDF / LaTeX <2022-05-04 Wed> <2022-05-11 Wed> @ 12:30pm
Homework 11 HTML / PDF / LaTeX <2022-05-11 Wed> <2022-05-18 Wed> @ 12:30pm
Homework 12 HTML / PDF / LaTeX <2022-05-11 Wed> <2022-05-18 Wed> @ 12:30pm
Homework 13 HTML / PDF / LaTeX <2022-05-18 Wed> <2022-05-25 Wed> @ 12:30pm
Homework 14 HTML / PDF / LaTeX <2022-05-18 Wed> <2022-05-25 Wed> @ 12:30pm
Homework 15 HTML / PDF / LaTeX <2022-05-25 Wed> <2022-06-01 Wed> @ 12:30pm
Homework 16 HTML / PDF / LaTeX <2022-05-25 Wed> <2022-06-01 Wed> @ 12:30pm

If you are using the LaTeX files to write up your homework (completely optional), you can download the preamble file, you need to put it in the parent directory as preamble.tex or change the \input{../preamble} line to point to the file.

8. Labs

Lab Assigned Due
Lab 1 <2022-03-28 Mon> <2022-04-05 Tue>
Lab 2 <2022-04-05 Tue> <2022-04-12 Tue>
Lab 3 <2022-04-12 Tue> <2022-04-19 Tue>
Lab 4 <2022-04-19 Tue> <2022-04-26 Tue>
Lab 5a <2022-04-26 Tue> <2022-05-03 Tue>
Lab 6a <2022-05-03 Tue> <2022-05-10 Tue>
Lab 7 <2022-05-10 Tue> <2022-05-17 Tue>
Lab 8 <2022-05-17 Tue> <2022-05-24 Tue>
Lab 9 <2022-05-24 Tue> <2022-05-31 Tue>

9. Exams

Note that there is only 1 midterm this quarter but the sample exams are split differently. Also, there are small differences in the topics we cover and the topics covered in the previous quarters. You can skip on any sample problems on the topics we did not cover.

10. Resources

  • cppreference.com – A good C++ reference website that also shows what is available different versions of the language. Avoid cplusplus.com if possible, as it contains subtly outdated information sometimes.
  • Abseil – a C++ library that provides near-equivalent of C++ standard library containers with better performance. It also has equivalents of parts of the new versions of the standard library. So it allows using modern-ish C++ constructs even if you are stuck with a C++11 compiler.

Author: Mehmet Emre

Created:

The material for this class is based on Prof. Richert Wang's material for CS 32