Informatics 1 – Functional Programming

Contents

  1. People
  2. Course description
  3. Schedule
  4. Course blog
  5. Examination
  6. Programming competition
  7. Course resources
  8. Other resources & external links

1. People

Lecturer: Don Sannella
<Don.Sannellathe letter a with a circle around ited.ac.uk>
IF 4.04
Teaching Assistant: Chris Banks
<C.Banksthe letter a with a circle around ited.ac.uk>
IF 3.50

2. Course description

The course teaches the basics of functional programming using the language Haskell. The main goal is to acquaint the student with fundamental programming concepts such as recursion, abstraction, higher-order functions and data types, whilst at the same time emphasizing the practical use of such constructs by applying them within a graphical environment.

The course is part of Informatics 1.

3. Schedule

The course comprises 20 lectures and 9 tutorials, spread over the eleven weeks of the semester. There is also the drop-in lab: special times at which the computer room in Appleton Tower is staffed by demonstrators, who are ready to help out with any questions on the course material. Lecture notes, tutorial exercises and solutions will be made available here on a weekly basis.

Lectures

Lectures are on Mondays and Tuesdays, starting week 2. There is an extra lecture on Friday of week 4 (David Hume Tower, Lecture Theatre C) and no lectures in week 5. See the semester 1 timetable for Informatics 1.

Drop-in lab

Drop-in lab is held daily at Computer Lab West on level 5 of Appleton Tower. Lab demonstrators will be available at the times indicated to assist with the coursework.
Reserved for Inf1-FP Demonstrator available Location
Mondays 3:00–5:00pm 3:30–4:30pm Lab West
Tuesdays 2:00–5:00pm 2:00–3:00pm Lab West
Wednesdays 2:00–5:00pm 2:00–3:00pm Lab West
Thursdays 2:00–5:00pm 2:00–3:00pm Lab West
Fridays 3:00–5:00pm 3:30–4:30pm Lab West

Every student should attend their assigned lab during Lab Week in week 2.

Lab week exercises are posted in the table below.

After week 2, the labs are run on a drop-in basis.

Tutorials

Tutorial groups with their times and places can be found here. If you wish to attend a tutorial at a different time, contact the ITO and explain your constraints.

Tutorials are held in groups of about 12, on Thursdays and Fridays, starting in week 3. Students are expected to prepare for each tutorial, which includes completing the exercises and reading the appropriate chapters in the textbook.

Tutorial exercises will be posted in the table below, and are due at the tutorial of the same week—for instance, the exercises of week 3 will be discussed during the tutorials on Thursday 4th and Friday 5th Oct. Exercises will be made available at least a week before they're due.

You must attempt the work before the tutorial and bring with you a printout of the work you have done. Tutorials are mandatory, and the only way to learn is to do the work before the tutorial, not at the tutorial. Students who have not done the work in advance will be sent away.

Revision tutorials

There will be some extra tutorials on Wednesdays starting 7th Nov for those who require extra help. This is in addition to and separate from your normal tutorial and tutorial exercises. There will be two sessions: 1:10-2:00pm and 2:10-3:00. Those attending this extra tutorial should do the exercises below before the tutorial and bring your solutions with you.

Week-by-week schedule

Week Subject Slides (code) Reading assignment Tutorial exercises Solutions
1. 17–21 Sep (No FP this week) *Tutorials start in week 3*
2. 24–28 Sep Introduction. Functions. Lab Week lect01.pdf (lect01.zip) 1–3 (pp. 1–66) Labweek.pdf, Labweek.zip solutions
3. 1–5 Oct Lists and Recursion lect03.pdf (lect03.zip) 4–7 (pp. 67–176) tutorial1.zip solutions
4. 8–12 Oct More fun with recursion; map, filter, fold lect05.pdf (lect05.zip) 8–9 (pp. 177–212) tutorial2.zip solutions
(extra FP lecture on Friday) lect07.pdf (lect07.zip)
5. 15–19 Oct (No FP lectures this week) 10–12 (pp. 213–286) tutorial3.zip solutions
6. 22–26 Oct Class test; sections, binding lect08.pdf *Class Test* tutorial4.zip solutions
7. 29 Oct–2 Nov Algebraic data types lect09.pdf (lect09.zip) 13–14 (pp. 287–356) tutorial5.zip solutions
8. 5–9 Nov Abstract types lect11.pdf (lect11.zip) 15–16 (pp. 357–414) tutorial6.zip solutions
9. 12–16 Nov Type classes lect13.pdf (lect13.zip) 17–21 (pp. 415–534) tutorial7.zip solutions
10. 19–23 Nov IO and monads lect15.pdf (lect15.zip) *Mock Exam* *No tutorial this week*
11. 26–30 Nov Logic and programs lect17.pdf lect18.pdf tutorial8.zip solutions

4. Course blog

The course blog is maintained by the teaching assistant. A summary of the topics covered in each lecture, a reading list, and any other information about the course will be posted each week.

5. Examination

Examination is done through two tests. The first, the class test, is a hand-written exam held on 22 Oct in place of the lecture (at the same time and place). The second, the final exam, is a programming test held in the computer labs, scheduled for the examination weeks at the end of the semester. The class test contributes 10% towards the final mark, the final exam contributes 90%. There is a mock exam in the week of 19 Nov as practice for the final exam.

Notes

6. Programming Competition

Each year the course concludes with a thrilling programming competition, with an actual prize draw and first prize sponsored by software company Galois. The competition centers round the drawing of fractal-based images. This provides students with an excellent opportunity to show off the skills they have learned during the course, and to set loose their creativity in an unconstrained environment. Every year students have gone on to amaze the course organizers—and themselves—with ingenious and beautiful drawings and fractals, and this year is certainly not going to be different.

2012 Programming Competition: This year's entries can be found here.

Previous programming competition entries:

7. Course resources

Textbook

Haskell: The Craft of Functional Programming, Third Edition. Simon Thompson. Addison-Wesley, 2011.

Lectures on video

The lectures will be captured on video and made available here.

Last year's lectures are available here (look at the directories in the range 2011-09-26/ - 2011-11-29/).

InfBase

InfBase is a staffed student help desk. You can make an appointment on the wiki, or just drop-in to ask questions about the course!

Previous exams

Questions & Answers

See the newsgroup or the wiki.

8. Other resources & external links

  1. An extra exercise sheet covering list comprehensions and recursion:
  2. Alternative textbooks: All of these books were also written for beginning students, and may provide a useful alternative perspective.
  3. Online material on Haskell:
    • Real World Haskell by O'Sullivan, Stewart and Goerzen.
      This is an introductory textbook with a practical angle of approach, fully available online.
    • A Gentle Introduction to Haskell by Hudak et. al.
      It would be good idea for everybody to print out a copy of this and bring it with you to tutorials/demonstrations as a reference.
    • Two Dozen Short Lessons in Haskell by Rex Page.
      This book is available in PostScript and PDF format. To read the PostScript version outside of the University labs, you may need to install additional software. If you can't get a hold of the official textbook, then this one may be of some help.
    • Learn You a Haskell for Great Good by Miran Lipovaca.
      An easy introductory web page with lots of examples.
    • The Haskell Reference at ZVON by Miloslav Nic.
      This site is a friendly version of the Haskell Report. It contains information about all of Haskell's predefined functions like drop, take, ord, chr, sum and length. Good reference website.
    • A Tour of the Haskell Standard Prelude by Bernie Pope and Arjan van IJzendoorn.
      Another good introduction to Haskell's predefined functions.
    • Video lectures from Microsoft on Haskell.
    • Lecture Notes and Exercises of John Hughes' Introductory Course on Haskell. (See also the old exams at the bottom of the exercises page.)
    • www.haskell.org
      This site has everything you could possibly want to know about Haskell, and more! From "A Short Introduction to Haskell" and the aforementioned "A Gentle Introduction to Haskell" to the definition of the language, a list of books on the subject, links to conferences/workshops, and various libraries.
  4. Online material on pair programming:
  5. Teaching Assistant
    Please feel free to email the teaching assistant with any questions you may have concerning Haskell.
  6. If you are using your own machine, we recommend that you download and install the "Haskell Platform" from here.
  7. Lecturer
    If after consulting all the above resources, you still can't find an answer to your question or just want to know even more, please email the lecturer.
  8. There is an open discussion forum for all issues relating to Informatics first year courses. The computing society Compsoc run a chatroom for all inf1 courses.

Informatics Teaching Organisation

Courses are administered by the Informatics Teaching Organisation (ITO), located on the fourth floor of Appleton Tower. Contact the ITO for adminstrative issues, including changes to lab sessions or tutorials, using this form. When it is inconvenient to use the form, send e-mail to <ito@inf.ed.ac.uk>.


Home : Teaching : Courses : Inf1 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh