Basic Data Structures and Object-Oriented Design

Greg Miranda (Instructor) Paul Cao (Instructor)

This course focuses on two main topics: The basics of organizing data for efficient computation, and the design of programs that use collections, classes, and interfaces.

Each week, we will explore topics in these areas interactively during lectures. You will read beyond what we explore in lecture, complete programming assignments to hone your coding and program design skills, and take exams that test your understanding of what you’ve learned. After, you’ll be better at designing and understanding programs and the structure of data they work over.

This web page serves as the main source of announcements and resources for the course, as well as the syllabus.

Basics

Lecture

Most lecture content will be presented asynchronously through videos and readings. These will come with associated quizzes that are due on the following Monday, Wednesday or Friday at the start of our originally-scheduled lecture time. The quizzes are required work to demonstrate your consistent engagement with the material.

In our originally-scheduled lecture time, we will have an opportunity for live questions, clarifications, and some prompts for you to work on beyond the assigned reading and videos. Attendance is encouraged but not required. The sessions are 30 minutes.

Recordings of relevant classwide discussions will be posted after the meetings, though the selected videos/reading for the given day are the official “lecture” for that day.

You can visit the lectures via Zoom links provided in Canvas.

SectionInstructorTimeLocation
B00 Paul CaoMWF 8am - 8:50am Zoom
C00 Greg MirandaMWF 11am - 11:50am Zoom
D00 Greg MirandaMWF 12pm - 12:50pm Zoom

Discussion

Discussions will reinforce concepts from class and introduce concepts that are especially helpful for completing programming assignments. Students from either section can attend either discussion. They will be recorded. Attendance is encouraged but optional.

Zoom links for the discussion sections will be posted in Canvas.

SectionTimeLocation
B01 Tu 9am - 9:50am Zoom
B02 Tu 10am - 10:50am Zoom
C01 Tu 11am - 11:50am Zoom
D01 Tu 12pm - 12:50pm Zoom

Schedule

The schedule below outlines topics, due dates, and links to assignments. If you check the schedule at the beginning of the week, you’ll know when all reading quizzes, programming assignments, etc. will be due. We will often have the schedule confirmed more than a week out, but we’ll strive to be up to date with the current week.

You are responsible for checking this schedule and completing work by the deadlines given, which are always at 11:59pm local San Diego time on the listed date.

Staff

We have a large instructional staff to help with your learning, and a few kinds of help sessions you can attend.

The first is office hours, held by the TA and instructor. Office hours are a great place for any kind of question about the course, from help with your assignment to clarifications about material in lecture to questions beyond what we cover in the course.

The Zoom links to office hours will be posted in Canvas. When you join the meeting, you will be placed into a waiting room until the TA or instructor admits you to the meeting.

The second is open lab hours where tutors give one-on-one help with programming tasks and course content. For these sessions, you should submit a ticket on https://autograder.ucsd.edu to request help.

  • Give a meaningful question or problem statement in your ticket.
  • Be prepared! You should be ready to reproduce the issue you’re having, have a test case that doesn’t produce the right output, show them a drawing of the situation you’re confused about, etc.

Once a tutor accepts your ticket, they will post a link to their Zoom meeting. When you join that meeting, you will be placed into a waiting room briefly until the tutor admits you to their meeting. After you join the meeting, the tutor will chat with you to help you with your issue, and then you will leave the meeting.

Expect to have about 5 minutes with a tutor (or TA or instructor): you probably won’t have the solution at the end of the conversation, but you should feel un-stuck and ready to try new approaches.

The student procedures for open lab hours can be accessed here.

Below is the calendar for office hours and open lab hours.

The third is through Piazza. Online discussion and Q&A for the class will be available on Piazza. Important announcements from the course team will be pinned at the top of your feed. When you set up your account, you can select the frequency for email notifications of messages and discussions on Piazza.

For each programming assignment, we’ll make a frequently-asked questions discussion on Piazza. You should refer to that during the assignment if you get stuck or have questions come up; we’ll use it to aggregate common issues. You can feel free to comment publicly on those discussions, but do be conscious that other students can see what you post, so posting solution code for a project or an answer for a homework is an academic integrity violation.

The default is that posts are private to discourage accidentally over-sharing solution code. If your post is a question about content, lecture, course technology, logistics, etc, please do ask it publicly so others can benefit from the answer.

Finally, you can always send a private message on Piazza to ask any question about the course. Please don’t message individual course staff privately unless they’ve asked you to, and please don’t message only the instructor with a content question. The course staff as a whole works together to make sure these messages get prompt responses (often by adding to the frequently asked questions post).

Asking & Answering questions on Piazza

Both we (the course staff) and your classmates can answer your questions on Piazza. There are a few kinds of questions you should ask on Piazza:

  • Private questions about closed programming assignments for clarification
  • Private questions about your grade / account
  • Public questions about open programming assignments
  • Public questions about the content of lecture, discussion, lab, and any readings

When answering questions, be polite, be clear, and assume the best intentions of the person asking. If it turns out you make a mistake or were wrong, admit it with a smile (emoji are great for this 😊), and make sure the correct information is clear. Above all, keep in mind that the course is a community whose goal is to foster a positive learning environment for everyone.

For public discussion, note that answers from your classmates are not official! They could be downright wrong or misleading, completely by accident. “My classmate said so on Piazza” is not a legitimate justification in most arguments, though they may indeed lead you in helpful directions.

Materials

There is no required textbook for the course.

There is a ZyBook available that has been used in the past. You can purchase a subscription and use it at your convenience; it serves as a useful reference and is organized in the order material is presented in this course, and there will be links to relevant ZyBooks sections in with the course schedule. There is also a significant amount of reference material at the end of the book for review of Java concepts. To get access to the book:

  1. Sign in or create an account at learn.zybooks.com
  2. Enter zyBook code: UCSDCSE12Winter2021
  3. Subscribe

If you cannot afford the book or have questions about using your financial aid, please see this page: https://zybooks.zendesk.com/hc/en-us/articles/360007439574-Can-I-pay-using-my-financial-aid-

We may use other on-line resources during the quarter that may be required reading or activities. These will all be free and linked from the schedule.

The documentation for the Java language, while not required reading, will be linked to from some assignments and is always a useful reference while programming. We will be using Java version 15 for the programming assignments in this course, which is available at Oracle’s web site.

You’ll be submitting your classwork and seeing grading feedback through a tool called Gradescope.

Programming

Most weeks, you will be working on a programming assignment for this class. There are several specific policies in place regarding programming assignments, and you should pay careful attention to them.

Collaboration

This is not the same collaboration policy you have seen in your other programming courses. Read it carefully.

In your professional programming life, some of your work will be highly collaborative with lots of expert advice available from senior developers and from sites like StackOverflow. This is a common case in companies, in academia, and on open-source projects. It’s a great way to get exposed to new techniques, share knowledge, and generally enjoy teamwork. In contrast, some of your work will involve figuring out programming problems on your own, where you are the first person to encounter an issue, or the first person to try using a new library in the context of your application. You should get experience in both types of situations; we might call the former kind of problem open to collaboration and the latter closed to collaboration.

In terms of courses, this split also makes sense. Programming assignments serve (at least) two roles. First and foremost, they are a mechanism for you to learn! By directly applying the techniques and skills we discuss in class, you get practice and become a better programmer. Second, they are an assessment mechanism – as instructional staff we use them to evaluate your understanding of concepts as demonstrated by your programs. Open collaboration can reduce frustration while learning and give you chances to enjoy collaboration and lots of help, but may not let us accurately evaluate your understanding. Closed assignments are an opportunity for you to demonstrate what you know by way of programming.

There are two types of assignments in this course, open and closed:

  • Open assignments, for which you can talk to anyone else in the course, post snippets of code on Piazza, get lots of help from TAs, and generally come up with solutions collaboratively. TAs will be happy to look at your code and suggest approaches and fixes.

    There are a few restrictions:

    • Any code that you didn’t write must be cited in the README file that goes along with your submission

      Example: On an open assignment, you and another student chat online about the solution, you figure out a particular helper method together. Your README should say “The FOO function was developed in collaboration with Firstname Lastname”

      Example: On an open assignment, a student posts the recursive method calls they used to solve a problem you were struggling with. Your README should say “I used the code from https://piazza.com/class/id-of-post”.

    • Anyone you work with in-person (please follow all social distancing guidelines) must be noted in your README

      Example: You and another student sit next to each other, and point out mistakes and errors to one another as you work through the assignment. As a result, your solutions are substantially similar. Your README should say “I collaborated with Firstname Lastname to develop my solution.”

    • You cannot share an entire repository of code or paste an entire solution into Piazza. Keep snippets to reasonable, descriptive chunks of code; think a dozen lines or so to get the point across.
    • You still cannot use code that you find online (no copying code from StackOverflow or blogs online), or get assistance or code from students outside of this offering of the class. All the code that is handed in should be developed by you or someone in the class.
    • You are responsible for understanding all the code you have written. All of the programming problems on the PAs may show up on exams, where you will need to have a thorough understanding of the PA to answer the questions.

    This doesn’t mean the staff will be handing out answers. We’ll mostly respond with leading questions and advice, and you shouldn’t expect a direct answer to questions like “am I done?” or “is my code right?”

    There is no guarantee the assistance you get from your classmates is correct. It is your responsibility to use your judgment to avoid using an idea on Piazza that is wrong, or doesn’t work with your solution; we won’t necessarily tell you one way or another while the assignment is out.

    If we see that you used code from other students and didn’t cite it in the README, the penalty will range from a point deduction to an academic integrity violation, depending on the severity. Always cite your work!

  • Closed assignments, where you cannot collaborate with others. You can ask clarification questions and report potential issues as private posts on Piazza or to staff members. However, staff will not look at your code or comment on it. Lab/office hours these weeks are for conceptual questions or for questions about past assignments only, no code assistance. Treat these assignments like take-home exams.

    On closed assignments:

    • You cannot look at or use anyone else’s code in any way.
    • You cannot discuss the assignment, even in general terms, with anyone other than the course staff.
    • You should expect that staff members will politely say “The course policy says I can’t help with that” if you ask a question about your algorithm or code.
    • You cannot post publicly about the assignment on Piazza or elsewhere online.
    • All of the examples in the open section above would be academic integrity violations.

Programming assignments will explicitly list whether they are open or closed collaboration.

You should be familiar with the UCSD guidelines on academic integrity as well.

Grading Programming Work

Each programming assignment will have a portion that is automatically graded, and a portion that is manually graded by the course staff.

After each assignment’s deadline, we will open a resubmission for that assignment for two weeks (this time period may be shorter for assignments near the end of the quarter). You can resubmit to improve the automated part of your grade. You can gain up to half the points you lost in the initial submission through resubmission; we’ll divide the difference of the initial and resubmission by 2 and add it to the original. There’s no penalty for (accidentally or intentionally) resubmitting work that is marked lower. There is no way to resubmit and recover points for the manually graded part of assignments, which must be submitted before the deadline.

This policy also serves as the late policy for programming assignments; if you don’t submit an assignment, the initial grade is 0, and you can get half of the automated points by submitting after the deadline. There is no other late policy for programming work.

Example: On a PA, you submit and get 40/80 for the automated score, and 10/20 for the manual score. After the deadline, you find many of your mistakes and resubmit, and get a new automated grade of 70/80. Your new score would be

(70 - 40) / 2 + 40 = 55

for the automated part, and the manually-graded part would remain 10, for total of 65 (rather than the original 50) points on the assignment.

In addition, closed-collaboration assignments are treated as open once their deadline passes. You can talk to other students about them, get coding help from staff on them, and so on. Please make use of these resources to understand where your solution was incorrect or incomplete, and resubmit!

Grading

Your grade will be computed from:

  • 50% programming assignments
  • 30% exams
  • 20% engagement

There are 3 closed and 5 open PAs. We will use an ordered weighting to assign the 50 PA points.

For the 3 closed PAs, we will order them from highest to lowest in terms of percentage scored on the PA itself, and then assign the proportions of the following points to each:

  • 8% highest scoring
  • 7% middle
  • 5% lowest

For the 5 open PAs, we will order them from highest to lowest in terms of percentage scored on the PA itself, and then assign the proportions of the following points to each:

  • 8% highest scoring
  • 7% 2nd highest scoring
  • 6%
  • 5%
  • 4% lowest scoring

Example: You score:

  • PA1: 90%
  • PA2: 50%
  • PA3: 70%
  • PA4: 80%
  • PA5: 100%
  • PA6: 92%
  • PA7: 90%
  • PA8: 100%

The closed PAs would be ordered 100% (PA5), 90% (PA7), 50% (PA2).

The points would be 1 * 8 + 0.9 * 7 + 0.5 * 5 = 16.8 points

The open PAs would be ordered 100% (PA8), 92% (PA6), 90% (PA1), 80% (PA4), 70% (PA3)

The points would be 1 * 8 + 0.92 * 7 + 0.9 * 6 + 0.8 * 5 + 0.7 * 4 = 26.64 points.

The total points (of 50 points) for PAs would be 43.44/50.

After your weighted average is calculated, letter grades will be assigned based on the following grading scale:

A+ A A- B+ B B- C+ C C- D, F
  >97    93-96.99     90-92.99    87-89.99    83-86.99    80-82.99    77-79.99    73-76.99    65-72.99    Below 64.99 

We may adjust the above scale to be more lenient (depending on the overall class performance), but we guarantee that we will not adjust the scale to make it harder to get a better grade. We will not adjust the scale for individual students. In addition, you must pass the final exam in order to pass the course.

Late and Makeup Work In general, work cannot be handed in late for credit. We will drop 20% of the lowest engagement activities (quizzes & surveys) to account for personal events and constraints that make you miss those deadlines.

Programming work that is late follows the resubmission policy in the programming grades section.

Regrades Mistakes sometimes occur in grading. Once grades are posted, we will allow a short period for you to request a fix to your grade (announced along with the release of grades), with a clear argument for why a mistake was made. If you don’t make a request in the given period, the grade you were initially given is final. All regrades should be made through Gradescope’s interface.

Engagement

Each lecture will come with an associated quiz. Completing the quiz before the next lecture section with at least half of the answers correct gains engagement credit. You can also get engagement credit by submitting various surveys and other small engagement tasks we may ask of you throughout the quarter.

You need to get credit for 80% (ex: 28 out of 35 total) quizzes, surveys, or tasks for full engagement credit.

Reading quizzes are open to collaboration, feel free to discuss them with your classmates!

Exams

There will be two midterm exams during the quarter, held remotely during

  • Week 4 - Friday 1/29/2021
  • Week 8 - Friday 2/26/2021

The final exam

  • will be released - Saturday, March 13 at 8am
  • and due by - Monday, March 15 at 11:59pm

Exams will be held asynchronously, meaning you can take them any time within the start and end time, usually a 24 hours period. They must be completed in one sitting. All work on exams is to be done on your own and is open book and open notes. Any form of collaboration on the exams will lead to AI violations. You may access your compiler and the internet for the exams, however, no sharing answers on any site, including Piazza. There will be no make up exams conducted.

You may not share any information about the exam with any student who has not yet taken it (including students in future quarters of CSE12).

The first two exams will each be worth 6% of your final grade. The final exam will be worth 18% of your final grade. The final exam will have a specific structure – it will be broken into three parts corresponding to material from the first exam, the second exam, and the remainder of the course. Your grade for each midterm will be the maximum of the midterm grade and the score you get on the corresponding part of the final exam.

For example, if you get 50% of the points for midterm 1 and 100% of the points for midterm 2, and then score a 75% on part 1 of the final, 25% on part 2, and 100% on part 3, you would get:

  • MAX(0.5, 0.75) * 6 = 4.5 points for midterm 1 (0.75 was higher, so the final increased the midterm score!)
  • MAX(1, 0.25) * 6 = 6 points for midterm 2 (0.25 was lower, so the original midterm score was used)
  • 0.75 * 6 + 0.25 * 6 + 1 * 6 = 12 points for the final exam (the score on the final exam is the same regardless of how the midterms went)
  • A total of 22.5 out of 30 exam points towards your final grade

This policy also covers what happens if you miss a midterm for any reason. If you are absent for a midterm, you get a 0 initially, and then whatever score you get on the final for that section will be applied to your midterm grade. There are no make-up midterms, and the final exam policy is governed by the university’s policies.

Other Policies

The CSE 12 Community

CSE 12 is a large course: there are over 40 people on the instructional team and over 550 students. We are all here because we are excited about Computer Science and want to ensure a productive, interesting, and useful quarter.

At UC San Diego, we agree to hold ourselves to the Principles of Community of respect, inclusion, and integrity. This translates to all our interactions in this course, and beyond.

These practices go beyond the university setting. A huge amount of modern computer science happens via collaboration, in text, online. Sites like Stack Overflow and Github hold incredible wealths of information generated through asking and answering questions. Computer science research, large system development, and cutting-edge design happens through professional, high-volume mailing lists. Practicing using Piazza professionally prepares you for these situations, so do it mindfully.

Before you post a question or answer, consider:

  • Does it contribute to a positive, constructive, and respectful forum for discussion and learning?
  • Does it contain contain source code from your solution or other information that shouldn’t be shared class-wide? Consider if the assignment is open or closed.
  • Is it a question that’s been asked before, that you could find via searching?

If you make a post that violates these guidelines, we may make it private and remind you of these guidelines. Overall, our goal is to make the public content on Piazza constructive and relevant for everyone.

Student Resources and Support

IDEA Engineering Student Center

The IDEA Engineering Student Center, located just off the lobby of Jacobs Hall, is a hub for student engagement, academic enrichment, personal/professional development, leadership, community involvement, and a respectful learning environment for all. The Center offers a variety of programs, listed in the IDEA Center Facebook page at http://www.facebook.com/ucsdidea (you are welcome to Like this page!) and the Center web site at http://idea.ucsd.edu/. The IDEA Center programs support both undergraduate students and graduate students.

Diversity and inclusion

We are committed to fostering a learning environment for this course that supports a diversity of thoughts, perspectives and experiences, and respects your identities (including race, ethnicity, heritage, gender, sex, class, sexuality, religion, ability, age, educational background, etc.). Our goal is to create a diverse and inclusive learning environment where all students feel comfortable and can thrive.

Our instructional staff will make a concerted effort to be welcoming and inclusive to the wide diversity of students in this course. If there is a way we can make you feel more included please let one of the course staff know, either in person, via email/discussion board, or even in a note under the door. Our learning about diverse perspectives and identities is an ongoing process, and we welcome your perspectives and input.

The Office for the Prevention of Harassment & Discrimination (OPHD) provides assistance to students, faculty, and staff regarding reports of bias, harassment, and discrimination. OPHD is the UC San Diego Title IX office. Title IX of the Education Amendments of 1972 is the federal law that prohibits sex discrimination in educational institutions that are recipients of federal funds. All students have the right to an educational environment that is free from harassment and discrimination.

Students have options for reporting incidents of sexual violence and sexual harassment. Sexual violence includes sexual assault, dating violence, domestic violence, and stalking. Information about reporting options may be obtained at OPHD at (858) 534-8298, ophd@ucsd.edu or http://ophd.ucsd.edu. Students may receive confidential assistance at CARE at the Sexual Assault Resource Center at (858) 534-5793, sarc@ucsd.edu or http://care.ucsd.edu or Counseling and Psychological Services (CAPS) at (858) 534-3755 or http://caps.ucsd.edu.

Students may feel more comfortable discussing their particular concern with a trusted employee. This may be a student affairs staff member, a department Chair, a faculty member or other University official. These individuals have an obligation to report incidents of sexual violence and sexual harassment to OPHD. This does not necessarily mean that a formal complaint will be filed.

If you find yourself in an uncomfortable situation, ask for help.

Students with Disabilities

We aim to create an environment in which all students can succeed in this course.
If you have a disability, please contact the Office for Students with Disability (OSD), which is located in University Center 202 behind Center Hall, to discuss appropriate accommodations right away. We will work to provide you with the accommodations you need, but you must first provide a current Authorization for Accommodation (AFA) letter issued by the OSD.
You are required to present your AFA letters to Faculty (please make arrangements to contact me privately) and to the OSD Liaison in the CSE department in advance so that accommodations may be arranged.

Investigating the Impact of Pedagogical Choices on University Student Learning and Engagement

Who is conducting the study, why you have been asked to participate, how you were selected, and what is the approximate number of participants in the study?

Gabriele Wienhausen, Director of the Teaching and Learning Commons, together with her education research colleagues is conducting a research study to find out more about how pedagogical choices affect student learning and experience in the classroom. You have been asked to participate in this study because you are a student in a class that is being studied or used as a control. There will be approximately 500,000 participants in this study.

Why is this study being done?

The purpose of this study is to create knowledge that has the potential to improve the learning and educational experience of students at UC San Diego and beyond.

What will happen to you in this study and which procedures are standard of care and which are experimental?

If you agree to be in this study, the following will happen: Your data from this class including grades, homework and exam submissions, and survey responses will be included in the analysis to determine the effectiveness of the pedagogical techniques used in this course compared to other similar courses.

How much time will each study procedure take, what is your total time commitment, and how long will the study last?

Your participation involves only agreeing to let us use your data in our analysis. It will require no time on your part above the time you put into this course without agreeing to the study.

What risks are associated with this study?

Participation in this study may involve some added risks or discomforts. These include the following:

  1. A potential for the loss of confidentiality. We will not share your personally identifying data with people outside our research team. Data will only be kept in anonymized form for research purposes. Course data will not be used for this research study until after final grades have been posted and will be rendered confidential by removing any identifiers before analysis. Your instructor will not know whether or not you are participating in this study until after final grades have been posted. Data from students who opt out of the study will be removed prior to data analysis. Research records will be kept confidential to the extent allowed by law. Research records may be reviewed by the UCSD Institutional Review Board.
    Since this is an investigational study, there may be some unknown risks that are currently unforeseeable. You will be informed of any significant new findings.

What are the alternatives to participating in this study?

The alternatives to participation in this study are not to participate. If you choose to opt-out of participating in this research study, we will exclude your data from analysis. Whether you participate will have no impact on your experience or grade in the associated class as the professor will not know who is or is not participating in the study until after final grades are assigned.

What benefits can be reasonably expected?

There is no direct benefit to you for participating in the study. The investigator, however, may learn more about how to improve student learning, and society may benefit from this knowledge.

Can you choose to not participate or withdraw from the study without penalty or loss of benefits?

Participation in research is entirely voluntary. You may refuse to participate or withdraw or refuse to answer specific questions in an interview or on a questionnaire at any time without penalty or loss of benefits to which you are entitled. If you decide that you no longer wish to continue in this study before the end of the quarter, simply respond to the online opt-out form here: https://goo.gl/forms/JSBRjEmkES6W6xYc2. If you decide to opt out after the quarter has ended, you must contact Laurel Nelson (laureln@ucsd.edu) and give the quarter and the course from which you would like your data withdrawn.

You will be told if any important new information is found during the course of this study that may affect your wanting to continue.

The PI may remove you from the study without your consent if the PI feels it is in your best interest or the best interest of the study. You may also be withdrawn from the study if you do not follow the instructions given you by the study personnel.

Will you be compensated for participating in this study?

You will not be compensated for participating in this study.

Are there any costs associated with participating in this study?

There will be no cost to you for participating in this study.

Who can you call if you have questions?

Gabriele Wienhausen and/or her colleague has explained this study to you and answered your questions. If you have other questions or research-related problems, you may reach Gabriele Wienhausen at gwienhausen@ucsd.edu or (858) 534-3958.

You may call the Human Research Protections Program Office at 858-246-HRPP (858-246-4777) to inquire about your rights as a research subject or to report research-related problems.

If you consent to participate in this study, no action is needed. If you DO NOT consent to participate in this study, or you choose to opt-out at any time during the quarter, please submit this form online at https://docs.google.com/forms/d/e/1FAIpQLScs0Cznypp4SxQJOsFMgP9nFDjJ0zzYPlSBWsiP3_wiWkdjaA/viewform. Your instructor will not have access to the list of students who opted out until after grades are posted. Note that you must separately opt-out of the study for each course involved in this study.