CS 251: Exam 1 Info

Notes sheet

You are permitted one 8.5 x 11 handwritten notes sheet (both sides) for use as a reference during the exam.

How to study

Lots of research has shown that reading over material isn't a very good way to prepare for exams. The best thing to do is to practice. Reading how to swing a baseball bat or how to cross-country ski might give you some good ideas on how to get better the next time you try it, but it's not even close to just getting out there and swinging a bat or skiing in the Arb.

How can you practice? Go back to look at the homework problems. Can you do them from scratch on paper? This website and this website contain long lists of exercises, though they don't focus much on the more abstract concepts. Here are more, which seem to include some content that the other sites are missing. Practice these under test conditions and see how you do. Even though the solutions may not be available, just trying to do them can be incredibly useful. The ones that involve programming you can put into the computer to see if they work. Otherwise, you can work with other students to see if you think you've got the right answers. Even if you don't know for sure if you've got the right answer, just practicing with these exercises can be helpful.

Finally, make sure to do all of your practicing on paper, not at a keyboard, so as to simulate the exam conditions.

Exam content

Listed below is the material that I have in mind that you should know for the exam. It's what's in my head when creating it. That said, this isn't a contract. I may have inadvertently left something off this list that ends up on an exam question. I make no guarantees that the exam will be 100% limited to items listed below. Moreover, I will not be able to test all of this material given the time limitations of the exam. I will have to pick and choose some subset of it.

Students should be able to…

Be able to write Scheme functions on paper to do specified tasks. Specifically, students should be able to successfully make significant use of recursion. Lazy lists, currying, and higher order functions (map, foldl, foldr, etc) are all ideas that students should be able to use and reason about. Any Scheme code should be written in a purely functional style (no side effects).

Be able to identify tail recursion, and show how tail recursion is beneficial.

Be able to define and identify a side-effect, and to reason about advantages/disadvantages in using them.

Be able to distinguish value model from reference model. Be able to reason about C, Java, Python, or Scheme code that demonstrates distinctions between the models.

Be able to distinguish among stack and heap memory storage. For a known language (Scheme, Python, Java, C), be able to identify whether a particular language characteristic relates to data stored in a stack or in a heap.

Be able to distinguish between a compiler and interpreter, and tradeoffs between them.