Assessment 1. Midterm Exam


Motivation

The CS106B midterm exam is intended to gauge your comfort and facility with the course material so far. Since the course topics build on each other, confirming you have a solid grasp of the foundational material now ensures you are equipped to tackle the later concepts to come in the course.

We provide the exam as a tool to take stock of where you're at and see how much you've learned in the first three weeks of the course, as well as what work you have left to do. After taking the diagnostic and receiving your grading feedback, you will have the opportunity to meet 1-on-1 with your section leader to review your results, celebrate your successes, identify areas for growth, and chart your path forward through the rest of the quarter. Although the primary goal of the midterm is to provide feedback to you, it also contributes a small but meaningful contribution to your course grade (10%), which we hope will inspire you to use this checkpoint opportunity wisely.

Lastly, we also hope the exam will give you a taste of what a timed coding challenge might look like in the software engineering world. After taking CS106B, you'll have learned many of the concepts you'd need to land a software engineering internship!

Logistics

  • The midterm will be on Monday, July 11 from 12:15pm-1:15pm in NVIDIA.
    • Students with OAE accommodations will receive extended time to complete the exam pursuant to their specific arrangements. More details will be sent out via email to the students for whom this information is relevant.
  • The midterm will be taken through the online Gradescope website.
    • Gradescope will automatically monitor the time you start and when you submit, and you will have exactly an hour from when you open the assessment.
    • Students will be added to the 106B Gradescope Roster before the exam.
    • We will be providing you with a collection of .cpp files that have function prototypes so that you can write your code in an editor that assists with formatting (writing code directly in Gradescope does not provide provide any code-relevant formatting assistance). However, we do not want you to run and test your code. Regular assignments focus heavily on the testing and debugging process, and we instead want to focus on your problem-solving skills and conceptual understanding on the midterm. Therefore, we have designed the starter files to not be easily runnable to avoid having you get stuck on small compiler issues or typos.
    • Once you write your code, you will need to upload the corresponding file to Gradescope for each question.
  • The Stanford Honor Code applies to the midterm. It is open-note, open-book, and open-course website. You must not discuss or seek help from other human beings. Read below for further details on the Honor Code.

Topic coverage and practice materials

  • Coverage. The midterm covers content up to, and including, lecture 9 Recursive Fractals, which was on July 6. Content from lecture 10 may appear as optional extra credit. All material from sections 1 to 3 and assignments 1 to 2 is fair game.
  • Format. Most questions will ask you to write a function or short passage of code that accomplishes a particular task. Other questions may ask you to read a provided passage of code and analyze or reason about its behavior. There may also be short answer questions to answer in prose. The practice problems (below) contain example problems of various formats.
    • You must bring your own laptop with a means to edit .cpp files to complete the exam. Lathrop Tech Desk is a good resource for loaning computers from Stanford if needed.
  • Practice problems. The below set of practice problems was gathered from previous quarters as a model for the scope and content of problems that might appear on the midterm.

Practice exam. We recommend working through the practice exam in an approximation of the real thing (set aside a block of time, gather the resources you plan to have on hand, and do a trial run).

Additional practice problems. The page consists of additional practice problems but is not representative of what we expect you to finish within the exam time frame.

  • Further practice.
    • Revisit our section materials. We pack the section handouts with way more problems that fit in a 50-minute section, so there is lots of good stuff for further practice. Section problems are similar size and scope to those on exams, in fact, many section problems originally appeared as exam problems.
    • The exercises in the textbook are another great source of practice problems.

Reflection and Check-in Meeting

The final part of the diagnostic process is an optional reflection and check-in with your section leader. We plan to grade the midterm during the weekend after the window closes and will release grades shortly thereafter. After you receive your grading feedback, you will be invited to sign up for a one-on-one meeting with your section leader to reflect on your experience taking the exam and your personal learning goals for the rest of the course. These check-in meetings are optional, but strongly recommended. In order to encourage your engagement in this process, we offer the following incentive:

  • If you schedule a check-in with your SL and come prepared with sincere reflection on your situation and engage in thoughtful discussion of your future plans, we will bump up your midterm score to earn back a third of the points you lost. If your original score was 85%, your adjusted score is upped to 90%.
  • If you choose not to take part, your midterm score is unchanged. CS106B does not generally apply much, if any, of a curve to scores on assessments, but if we were to feel it necessary, any curve would be computed on the raw, unadjusted scores, meaning there is no penalty if you decline to participate.

Strategies

Assessments in a programming course can seem intimidating. How can you be sure the skills you are building on assignments will translate well to this new setting? We offer some sage advice based on our past experience.

Before the exam

Practice in simulated conditions. A good way to study for the programming problems is to take a problem (from lecture, section, textbook) and write out your solution under test-like conditions. This is much more valuable than a passive review of the problem and its solution, when it becomes too easy to conclude “ah yes, I would have done that,” only to find yourself adrift during the real midterm when there is no provided solution to guide you!

Get your questions answered. If there is a concept you’re a bit fuzzy on or you’d like to check your answer to a chapter exercise, or you wonder why a solution is written a particular way, get those questions answered before the exam. Swing by the LaIR, come to office hours, or post on Ed, and we’re happy to help.

Consolidate your resources. With an open-resource exam, it can be tempting to come in with little preparation and unorganized materials. However, by consolidating your notes into a shorter cheatsheet and more generally organizing your physical and digital resources, you'll end up reviewing the content you need to know for the exam. During the midterm, one of the most common pitfalls is to spend too much time trying to find one particular lecture example or practice problem in your notes and then to lose time for actually solving the problem at hand.

During the exam

Scan all the problems first. Quickly peruse all questions before starting on any one. This allows you to “multitask”—as you are writing the more mundane parts of one answer, your mind can be brainstorming strategies or ideas for another problem in the background. You can also sketch out how to allocate your time between questions in the first pass.

Spend your time wisely. There are only a handful of questions, and each is worth a significant amount. Don’t get stuck on any particular problem. There is much opportunity for partial credit, so it’s better to make good efforts on all problems than to perfect one answer while leaving others untouched.

Style and decomposition are secondary to correctness. Unlike the assignments where we hold you to high standards in all areas, for a midterm, the correctness of the answers dominates the grading. Decomposition and style are thus somewhat de-emphasized. However, good design may make it easier for you to get the functionality correct and may require less code, which takes less time and provides fewer opportunities for error. Comments are never required unless specifically indicated by a problem. When a solution is incorrect, commenting may help us determine what you were trying to do when we attempt to give partial credit.

Pay attention to specific instructions. A problem statement may include detailed constraints and hints. These constraints are not intended to make things difficult; typically, we are trying to guide you in the direction of a more straightforward solution. If you disregard these instructions, you are likely to lose points, either for not meeting the problem specification and/or for errors introduced when attempting a convoluted alternative.

Syntax is not that important if it is clear what you mean. Since you can't compile code in the files we provide, we won’t trouble you about most small syntax errors (forgetting semicolons or spaces, for example) as long as your intentions are clear. Having said that, beware that if your syntax errors cause ambiguity, we might not get the correct meaning. For example, if we see a for loop followed by two lines with no curly braces, where both lines are vaguely indented or a third line has been added in after the fact, we may be confused about what code is really inside your for loop.

Save a little time for checking your work. Before submitting your exam, reserve a few minutes to go back over your work. Check for matching parameter names passed into functions, etc. We try not to deduct points for minor things if it is obvious what you meant, but sometimes it is difficult to decipher your true intention. You might save yourself a few lost points by tidying up the details at the end.

Miscellaneous Resources

Honor Code

We expect you to uphold your obligations to the Stanford Honor Code whe completing the work, just as with all coursework.

  • You must not give or receive unpermitted aid of any form.
  • The work you submit must be your independent, original work; not jointly developed nor derived from the work of another.
  • You are not to discuss the content with any other person (except for private, individual communication with the course staff to ask for clarification). This restriction applies while completing your own work and afterwards up until the midterm solutions are released to the entire class.
  • The prohibition against sharing or discussing with others applies to the content in any form (no verbal description, problem text, solution diagrams or code, and so on) and through any communication channel (no private conversation, group chat, email, Ed post, internet question/answer forum, etc.)

Here is a non-exhaustive list of what resources are permitted and not:

  • Permitted
    • You may access the textbook and other books in printed or digital form
    • You may look at any materials on the course website (lecture slides, section problems, practice materials, etc.), read previous conversations on our Ed forum, and review your own assignment code on Paperless
    • If you are taking the exam remotely, you may make a private post on Ed to ask a clarifying question to the course staff
  • Not Permitted
    • You must not make a public post on Ed discussing any midterm content
    • You must not post content from the exam on any online site or seek help from a forum such as Stack Overflow
    • You must not discuss the exam content with any person (other than the course staff)
    • You must not share your solution code with other students nor ask other students to share their solution code with you

Final Thoughts

✨We want you to do well on this exam.✨

See this as an opportunity to show what you've learned and to display your great efforts in the class so far. Always remember why you are here! Your efforts to practice real-world skills and build your understanding will take you a lot further than a pristine transcript. If you work hard toward mastery and feel good about your understanding of computer science, that is an achievement to be proud of—regardless of how many points you get relative to the other students in the course.