Bryn
Mawr College
CS 246: Programming Paradigms
Spring 2002
Course Materials
General
Information
Instructor:
Deepak Kumar, 248 Park Hall, 526-7485
E-Mail: dkumar@brynmawr.edu
WWW: http://mainline.brynmawr.edu/~dkumar
Lecture
Hours: Tuesdays & Thursdays, 10:00 a.m. to 11:30 a.m.
Room: 232 Park Science Building
Laboratories:
- Chemistry/Computer
Science Lab, Room 232 Park Science Building
Texts
& Software
- The
Haskell School of Expression: Learning Functional Programming Through Multimedia,
by Paul Hudak, Cambridge University Press, 2002.
- Other
texts TBA.
- IFP
(Illinois FP) is installed on deepc.brynmawr.edu
- Haskell
HUGS Compiler with Graphics Libraries
are installed on deepc.brynmawr.edu
- Common
Lisp is
installed on deepc.brynmawr.edu
Important
Dates
January
22: First lecture
February 21: Exam 1
April 2: Exam 2
April 30: Last lecture
May 2: Exam 3
Assignments
Homework#1
(Due on Tuesday 1/29): Click here.
Project #1 (Due on Feb 7): Click Here.
Homework#2 (Due on Tuesday 2/12): Click here.
Project#2 (Due on Tuesday, February 26) Click
Here!
Project#3 (Due on Thursday, March 7) Click Here!
Homework#3 (Due on Tuesday 4/2): Click here. Short
expo on arrays in Smalltalk.
Homework#4 (Due on Tuesday 4/9): Implement the question on the exam that
you opted out. Also implement all questions on your exam for which you lost
some/all credit. Hand in a prinout and sample runs for each method/code block
you write.
Homework#5 (Due on Thursday 4/18): Attend Paul Hudak's talk on Monday
April 15 at 4:15 p.m. in Room 338 Park. Write a 1-2 page summary and reactions.
In preparation for the talk, you may read Chapter 15 from Hudak.
Homework#6 (Due on Tuesday 4/23): Implement the latest design of the MVC
gui as discussed in class.
Project#4 (Due on Thursday, May 2): Click here for
details.
Lectures
- Week
1
Tuesday, January 22: First class Meeting. What is a programming paradigm?
von Neumann architectures, imperative programming languages. Non-imperative
options. Course administrivia (user accounts etc.)
Read: Can Programming be liberated from the von Neumann Style?
by John Backus, CACM 1978 before next class.
Thursday, January 24: Review of Backus paper. Introduction to Functional
Programming. Learn IFP. Click here for a summary
of IFP.
Homework#1 (Due on Tuesday 1/29): Click here.
- Week
2
Tuesday, January 29: Programming in IFP. Various kinds of recursion.
Example programs.
Project #1 (Due on Feb 7): Click Here.
Thursday, January 31: Designing recursive programs: More examples. Some
hints for Project#1.
- Week
3
Tuesday February 5: Sorting. A review plus examples of sorting in IFP.
Thursday, February 7: Introduction to Haskell: Strong typing, type abstraction,
overloading, polymorphism, basic data types, definitions. Using Hugs. Download
and install Hugs on your own computer (see links below). You will need to
download Hugs, the Graphics Libraries for SOE and Haskore. You may also download
the code from the text. All of these are installed in the class room.
Read: Chapter 1 from Hudak.
Homework#2 (Due on Tuesday 2/12): Click here.
- Week
4
Tuesday, February 12: Review of Haskell syntax, homework#2 solutions,
IO in Haskell.
Read: Chapter 3 from Hudak (skip over Chapter 2 for now).
Thursday February, 14: Graphics IO in Haskell. Overview of the SOEGraphics
package.
- Week
5
Tuesday, February 19: Types and type abstractions in programming languages.
Haskell types: base types, aggregates, enumerated types, records, variant
records. Modules and type classes. The Shape and Draw modules in Haskell.
Read: Chapters 2 and 4 from Hudak.
Project#2 (Due on Tuesday, February 26) Click
Here!
Thursday, February 21: Exam 1 is today.
- Week
6
Tuesday, February 26: Discussion of Exam1. Polymorphic types in Haskell:
length, map, foldr, foldl, reverse.
Read: Chapter 5 from Hudak.
Thursday, February 28: No Class today.
Self study (See reading below)
Read: Chapter 6 from Hudak.
Project#3 (Due on Thursday, March 7) Click Here!
- Week
7
Tuesday, March 5: Infinite lists in Haskell.
Thursday, March 7: Abstract Data Types in Haskell.
- Week
8
No Classes this week. Spring Break!!
- Week
9
Tuesday, March 19: Squeak: An introduction. Basic OOP concepts.
Read: The SmallTalk handout.
Thursday, March 21: Squeak Lab Session#1 (Implement the Bank Account class
as described in the handout). Work through the Joe the Box implementation.
- Week
10
Tuesday, March 26: Object-oriented analysis & design: CRC cards and
UML.
Thursday, March 28: Object-oriented programming Lab Session.
Homework#3
(Due on Tuesday 4/2): Click here. Short
expo on arrays in Smalltalk.
- Week
11
Tuesday, April 2: Exam 2 is today.
Thursday, April 4: Review of Exam. Smalltalk: the language.
Homework#4 (Due on Tuesday 4/9): Implement the question on the exam that
you opted out. Also implement all questions on your exam for which you lost
some/all credit. Hand in a prinout and sample runs for each method/code block
you write.
- Week
12
Tuesday, April 9: GUI paradigms. Towards Model-View-Controller paradigm.
Thursday, April 11: GUI Paradigms. Implementing the barebones GUI design
for the Clock class.
Homework#5 (Due on Thursday 4/18): Attend Paul Hudak's talk on Monday
April 15 at 4:15 p.m. in Room 338 Park. Write a 1-2 page summary and reactions.
In preparation for the talk, you may read Chapter 15 from Hudak.
- Week
13
Monday, April 15: Computer Science Colloquium: Paul Hudak, Yale University
will give a talk on: Little Languages for Big Applications. The talk will
be in Room 338 at 4:15 p.m., preceded by a Tea in the Math Function Space.
Tuesday, April 16: Discussion on Hudak talk. Clock GUI design: Improving
the design by adding separate classes/objects. The dependency mechanism in
Smalltalk. Using dependency to implement MVC architectures.
Thursday, April 18: Towards true MVC programming.
Homework#6 (Due on Tuesday 4/23): Implement the latest design of the MVC
gui as discussed in class.
- Week
14
Tuesday, April 23: Using plauggable GUI components in Squeak (MVC and
Morphic). An introduction to Morphic programming. Players and scripting in
Morphic.
Project#4 (Due on Thursday, May 2): Click here
for details.
Thursday, April 25: Playing with Sqeak/Morphic.
- Week
15
Tuesday, April 30: More on eToys. Doing multi-frame animations.
Thursday, May 2: Project Demos using eToys. Exam
3 is today.
Grading
All graded
work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.3, 1.0,
or 0.0. At the end of the semester, final grades will be calculated as a weighted
average of all grades according to the following weights:
Exam 1:
15%
Exam 2: 15%
Exam 3: 15%
Projects: 45%
Homework: 10%
Total: 100%
Links
Created
by dkumar@brynmawr.edu on January 17,
2002.