CS 3110 - Data Structures and Functional Programming

General Information

The third level programming course in the CS major. Features a new programming language which is probably different than anything you’ve done before: OCaml. Considered by some to be the first “weeder” course - while the course staff doesn’t intend this, it can be true, since the amount of work is greater than you might have seen in prior courses. Also, focuses on software design, team work, and “writing good code” more than previous courses. Both professors (Michael Clarkson teaches Fall and Nate Foster teaches Spring) are some of the best in the department.

Prerequisites

CS 2110/CS 2112, coreq CS 2800

Topics Covered

  • OCaml and functional programming concepts
    • Pattern matching
    • Currying
    • Higher-order functions
    • Anonymous functions
    • Polymorphism
    • Models of evaluation
    • Functors
    • Mutability
  • Logic
  • Concurrency
  • Data Structures
  • Analysis of algorithms
  • Random topics towards the end, at discretion of professor
    • Locality
    • Streams
    • B-Trees
    • Lazy Evaluation
    • Splay Trees
    • Type inference
    • Lambda Calculus

Workload

Heavy but doable. Six increasingly time consuming assigments, one prelim, a final, and one large group project. The project takes place over the last half of the semester with several checkpoints. It is generally developing a fully-fledged game (or calculator or database etc.) with several team members. Workload also includes writing book reflections and team work reflections, but this doesn’t add much work.

General Advice

Take it. You have to.

Ocaml. It’s fun.

3110 has a reputation of being more difficult than it really is. Don’t be scared of it, but make sure to not fall behind on the course material.

Do well in the exams and you will be fine… Projects are time consuming and fun, but won’t affect the final grade that much…

If you did well in the class, enjoyed the material, and are willing to put in a significant amount of time to help with the course, consider asking if you can TA this course. It has a very unique culture among the course staff, and you can meet some cool CS majors.

Start on the projects early - if nothing else, thinking about how you’re going to layout your solution.

Don’t be too intimidated by OCaml. It’s scary at first, but when you get to the third or fourth assignment, you’ll be able to look back and do the first assignment in about 15 minutes. The first half of this course is learning the language, and everyone is learning the language.

Take this class early in your CS career - it introduces a new paradigm of thinking about computational problems which can prove invaluable.

Make sure you learn the law of diminishing returns; getting your assigment/project from “pretty good” to “perfect” is going to take way more energy than it’s worth.

Yes, it has a reputation. And it’s not an easy course. But you’ll get so much out of it. You aren’t just going to learn OCaml. You’re going to learn how to learn languages.

Testimonials

Probably the best class I’ve taken so far. Functional programming will blow your mind. And personally, I didn’t think it was all that hard.

CS3110 is like the toad you kiss unwillingly and then it turns into a beautiful princess who you marry and live happily ever after. Once it clicks, you’ll love it.

Past Offerings

Semester Time Professor Median Grade Course Page
Spring 2019 TR 10:10 - 11:00 Nate Foster B+ http://www.cs.cornell.edu/courses/cs3110/2019sp/
Spring 2018 TR 10:10 - 11:00 Nate Foster B+ http://www.cs.cornell.edu/courses/CS3110/2018sp/
Fall 2017 TR 10:10 - 11:00 Michael Clarkson B http://www.cs.cornell.edu/courses/CS3110/2017fa/
Spring 2015 TR 10:10 - 11:00 Michael Clarkson and Michael George B+ http://www.cs.cornell.edu/courses/CS3110/2015sp/
Fall 2014 TR 10:10 - 11:00 Michael Clarkson - http://www.cs.cornell.edu/courses/CS3110/2014fa/
Fall 2012 TR 10:10 - 11:00 Ramin Zabih B http://www.cs.cornell.edu/courses/CS3110/2012fa/
Fall 2009 TR 10:10 - 11:00 Dexter Kozen B http://www.cs.cornell.edu/courses/CS3110/2009fa/

Edit this page on GitHub: classes/CS3110.md

Edit me on GitHub