Instructor: Prof. Seth Fogarty
Email: sfogarty@trinity.edu
Office: CSI 270M
Office Hours: Posted on webpage
Meets: CSI 257 MWF 11:30 and 12:30
Textbook: Learn You a Haskell for Great Good (Available free online)
Classroom Workspace Repository
The purpose of this course is to introduce the theory, practice, and design principles of functional programming. Functional programming views computation as the calculation of mathematical functions. We will be using Haskell, a purely-functional, strongly-typed, lazily-evaluated language. The course is taught using a problem-driven design, where programming concepts are introduced in a just-in-time fashion. This course is designed for computer science majors, and will cover a variety of topics.
Functional programming in the small: Create small, purely functional programs in a strongly typed language. You will learn to manipulate types include tuples, records, algebraic data types, recursive types, parametric types, type classes, and monads. You will master programming techniques such as pattern matching, recursion, and higher-order functions.
Program design: How to design larger programs. You will decompose given problems into logical subproblems, create data-types to model a physical or mathematical object, and design interfaces between users, programs, and program components. In the larger end-of semester project, you will create a command-line program of some complexity from scratch.
Communicating Computation: How to work in pairs or small groups to design, write, review, and debug code. You will perform code reviews, express what makes code maintainable, program individually, in pairs, and in groups, learn how to divide a problem among a group, and become familiar with using Git to manage code revisions and complexity.
Concepts in Artificial Intelligence: How to tackle problems that do not admit exact solutions. The course projects will tackle a variety of problems in artificial intelligence, using simple (even naïve) techniques. These techniques are often based on weak correlations in a very large data set, and produce approximate or heuristic answers. You will become familiar with supervised and unsupervised learning, the vulnerability of AI to minor changes in the algorithm or input, and be prepared for a dedicated course in Artificial Intelligence.
The primary objective of this course is not to make the student a proficient Haskell programmer, but to make them better problem solvers in whatever language they use. In specific, this course stresses:
Decomposition: Breaking a problem into logical sub-problems to produce readable, coherent, and maintainable programs.
Abstraction: Transforming specific solutions into general ones, resulting in concise, expressive programs that embody computation at a high level.
Recursion: Solving a problem by decomposing it into smaller problems of the same type, as well as data structures composed of smaller instances of the same type of structure.
This course meets three times a week, and is structured around in-class activities, quizzes, and programming projects.
Class Activities: Most classes will contain at least one problem, and some days will be devoted to longer activities or in-class assignments. If not finished in class, these must be finished before the next class. These problems may be completed individually or in pairs, and will usually be submitted on HackerRank.
Quizzes: Some classes will instead have a quiz, which will either be on HackerRank or written. These quizzes must be completed in class, and must be completed individually.
Projects: There will be five programming projects covering functional programming constructs, methods of abstraction, and program design. The first two projects are individual projects, the next two projects are pair-programmed, and the final project is a large group project. The final project implements a command-line solver for a two-player game of perfect information.
This course meets three times a week. Assessment is broken down into the following categories.
Class Participation: Class participation accounts for 15% of the grade, including attendance, discussion participation, HackerRank activities, and quizzes.
Projects: The five projects are worth 50% of the course grade. Projects are submitted using GitHub Classroom. Regardless of permissible collaboration, you must be able to explain your code to receive credit for it: randomly mutating code until it passes the tests is not sufficient.
Exams: There will be a single out-of-class midterm and a cumulative final exam. Together the exams are worth 35% of the course grade. You must achieve a passing average (50%) on the exams to pass the course.
The following grade cutoffs apply for this course. Grading will be stringent to reflect these cutoffs.
Students are expected by abide the Trinity University Honor code. For all projects, students may receive assistance from the instructor, teaching assistant, or ACM peer tutors. For individual projects, students may collaborate via whiteboard or paper, but students may not look at each other's code and all code must be written alone. For pair-programmed projects, students may submit one assignment as a pair, and collaborate with other pairs. However, all code must be written by a member of the pair. For the final project there are no restrictions on collaboration.
In this class the use of large-language models is considered a form of pair programming. Thus, for individual assignments the use of tools like CoPilot and Chat GPT is considered unauthorized assistance. For pair-programmed and group projects, you are allowed to use these tools on the condition that you fully cite the tool. This requires that all code written with the assistance of the LLM tool have a corresponding comment in the source code.
Finally, during class time the use of computers, tablets, or cell phones is prohibited, unless specifically for the use of class activities.
Students are expected to attend class regularly. Students who will miss class should contact me before their absence, and complete all assignments ahead of time.
In line with the Trinity University policy on equal access and equal opportunity, this course will be made accessible to all students. Any student who may need accommodations based on the impact of a disability or long illness should contact both me and the office of Student Accessibility Services to discuss your specific needs. Any student who may need assistance or accommodations for any other need should contact me.
As a faculty member, I am designated as a Responsible Employee. As such, I am required to report any instances of sexual misconduct or sexual harassment to the Title IX Coordinator. If you share information with me that implicates sexual misconduct or harassment, I am required to report this to the Title IX Coordinator. The purpose of this report is to ensure you have information about support resources and complaint resolution options. My report will not initiate the complaint process, and you are in control over how you choose to engage with our Title IX Coordinator
Please be aware that all classroom instruction, including student participation in classroom activities, is subject to recording and dissemination on secure systems. The recordings will be made available only to students enrolled in the course, or to other CSCI faculty for course review, unless written permission of everyone in the recording is obtained.