Functional Programming Fall 2017
This course presents the functional programming paradigm, based on the idea of functions as “first-class” values that can be computed and operated on like other data. Functional languages provide great power of expression while maintaining simplicity, making it easier to write correct and maintainable software. Functional programming has gradually found new applications in areas like finance, telecommunications, and graphics. The essential feature of treating functions as values has also been added to a broad range of conventional languages, such as Python, C++, Java, Apple’s Swift and Google’s Go language.
The course will use the Haskell Language based on it representing a purely functional language and its large community support that helps with writing Haskell programs easily. After learning the basic elements of these languages, we will explore functional programming techniques that can be exploited in many areas of application. In particular, we will examine how FP features are used in more modern languages and libraries such as C++, Java, Elm, and React libraries and how they are used in “real-world” settings.
We will briefly compare the functional paradigm with the related paradigm of object oriented programming. If time permit then we will explore more advanced topics including concurrent functional programming and functional reactive programming.
The following information below about the course is subject to change.
Course Staff
Instructor
Lamont Samuels
Email: lamonts@cs.uchicago.edu
Office hours: Saturdays in CSIL from 10:00 AM - 11:30 AM
or by appointment
TAs
Mark McDonald
Office hours: Wednesdays at Hallowed Grounds Cafe on the second floor of the Reynolds Club from 7:00 PM - 8:30 PM
Course Information
| Lectures |
Monday 5:30pm–8:30pm, Eckhart Hall 207 |
| Communication |
We'll use Piazza for general discussion and questions about course material.
Piazza is the best place to get help quickly. The TA's and I will monitor Piazza
as frequently as possible and often be able to answer immediately. Students
are encouraged to help their peers on Piazza by contributing when it is convenient.
|
| Textbook |
This course will not have a required textbook; although, for those students who may find it helpful to know
the topics we will dicuss each week, readings will come from the text:
- Programming in Haskell by Graham Hutton (2nd Edition)
and will be shown on the course schedule. Along with these readings and the lecture notes, students may find the following references helpful in understanding the course material:
- Learn You a Haskell for Great Good! by Miran Lipovaca
- Real World Haskell by Bryan O’Sullivan, John Goerzen, and Don Stewart
|
| Course Software |
Stack (Haskell Project building tool): https://docs.haskellstack.org/en/stable/README/
Haskell platform: https://www.haskell.org/platform/
Git: http://git-scm.com/downloads/
|
| Getting Help |
I will be available during office hours. The pace of this course is rapid,
so please email me or come to office hours if you feel you're falling behind or need help.
|
Homework
There will be weekly/biweekly homework assignments due normally the Sunday before the next class, unless otherwise noted on the homework page. In the homework assignments,
you will be required to solve a programming problem(s) related to the topics covered in class so far. Late work will not be accepted. Our time frame is
compressed and you must keep up. Exceptions to this policy will be granted only in the case of extraordinary circumstances.
NOTE : Homework assigned and due dates are subject to change with notice.
Projects evaluation criteria
- 34% Does the program perform per specification, or as expected?
- 33% Is the algorithm elegant/efficient with respect to memory, and other resources.
- 33% Good code style; naming variables, formatting, ease of reading, well-documented?
Evaluations are Final and Non-negotiable:
Project evaluations are final and non-negotiable. The TA and grader for this course are both experienced and fair. Please do not ask me to intervene to change your grade if you are dissatisfied with a project evaluation. The only way I would intervene is if there was a gross miscarriage of process, e.g. the TA/grader fails to evaluate any assignments at all, or moves to isolated island with no internet connection and never comes back. If you are dissatisfied with an evaluation, you may appeal to me, describing why you feel you were not treated fairly, and I will note your dissatisfaction in the gradebook. This may mitigate in your favor when I assign final grades.
Exams
There will be two exams in this course. Each exam will be a mixture of coding exercises and short-answer questions.
| Exam |
Length |
Exam Date |
| Midterm Exam |
90 minutes |
Monday October 23rd |
| Final Exam |
90 minutes |
Monday November 27th |
Missed exams and late registrant policy
There are no make-up exams in this class. There also will not be any earlier exams taken unless due to extraordinary circumstances such as an
medical emergency.
Labs
During labs, we will use the course tools to create applications together in class. All the source code that you will need to follow along during labs will be available in shared repository before the lecture. The lecture hall will be outfitted with power-strips, and you are required to bring your own laptop and follow-along during labs. Labs are not evaluated. Solutions to the labs will also be provided on the course schedule page.
Course Content
Topics that will be explored in the course will include the following:
-
Introduction to Haskell and the ghci interpreter
-
Basic Haskell types and functions
-
Advance function topics: guards, pattern matching and recursion
-
Lists, strings and tuples
-
Types and polymorphism
-
Higher order functions on lists: map, filter, list comprehension
-
Lazy evaluation
-
Type classes
-
User defined data structures: lists, queues, trees
-
Advance Haskell topics: Applicative, Functor, Moniod, Monads
-
Input/output in Haskell
-
Functional Programming vs Object Oriented Programming
-
Functional Programming in modern languages and real-world settings
A detailed description of when each topic will be discussed is on the course schedule page.
Final Evaluation
The final grade is determined as follows:
|
Weight |
| Project #1 |
3% |
| Project #2 |
3% |
| Project #3 |
6% |
| Project #4 (2 weeks) |
9% |
| Project #5 (2 weeks) |
12% |
| Final Project |
17% |
| Midterm exam |
20% |
| Final exam |
25% |
| Class participation |
5% |
Class participation
The participation evaluation will be based on: your questions/comments during class, your posts/replies to the Piazza, your
willingness to help, and your presentation of project solutions when called on to do so.
Possible Curve
Be advised that MPCS policy dictates that no more than 30% of the students in any MPCS course may receive an A. In most cases,
I will curve the raw scores up to award as many A's as possible. An A is defined as 93% or higher. In rare cases, I will curve the
raw scores grades down to conform to school policy. This policy is in place to protect students from grade inflation.
Credits
Course description originally written by David MacQueen and slightly modified by Lamont Samuels
I would also like to thank,
J. Alex Halderman, for allowing me to adapt his web site design for this course.