Time: MWF 11:00-12:05
Place: HR 510
The goal of this course is to familiarize you with 'non-traditional' programming languages and styles, specifically Lisp, Smalltalk and Prolog. When the course is over, you should be able to write reasonably large programs using each of these languages. You should also be able to articulate their strengths and weaknesses. In addition, we will talk about the different programming paradigms (functional, object-oriented, declarative) represented by these languages more generally; you should be able to apply these ideas to the design of programs written in more 'traditional' languages, such as Java or C++.
CS 112 or equivalent. You should be familiar with at least one programming language, and comfortable with the material from CS 245, including the use of common data structures such as lists, trees, and hash tables.
The course will consist of three smaller homework assignments, three larger programming projects, and a final exam. For each section of the course (Smalltalk, Lisp, Prolog), you will have a small(ish) 'getting started' homework designed to help you familiarize yourself with the basics of the language, and a larger programming project in which you will take advantage of each language's strengths to build a fairly large application, typically modifying a reasonably large existing piece of code. For each project, you will turn in both your code and a writeup describing the project; both the code and the writeup will be graded. We'll also have a final exam, which will consist of questions designed to test your understanding of the concepts underlying each language, the realtionships between them, and your ability to apply OO, functional, and declarative programming techniques to more traditional languages.
Small homeworks: 10% each.
Projects: 20% each.
Exam: 10%.
Text: No text - course materials will be provided online or via handouts.
Optional books: We'll use material from these books at times. I'll put
them on reserve in the library and make handouts of the relevant
sections for you.
Late Policy: 10% taken off for each day your assignment is late. Weekends don't count, so if your assignment is due on a Friday and you turn it in on a Monday, you get 10% off. After 3 days (30% off), the assignment is worth zero - at that point, you're better off moving on to the next assignment rather than getting further behind.
Collaboration: In general, I expect students to behave responsibly and do their own work. I'm willing to assume this is the case until proven wrong. More specifically, it is OK to talk with each other about the general parameters or approach of the assignment. It is NOT OK to share source code, to do part of an assignment for another person, or to directly copy another person't work. If you are unsure as to whether something is considered fair game or not, please ask me and we can discuss it.
A few examples: "On question 4, are we supposed to implement a non-destructive version of sort?" This is fine; it's a clarification of the assignment. Feel free to talk about this sort of thing with your classmates.
"I just can't figure out the difference between cons and append, and it's messing up my list construction. Can you show me how they work?" Also fine; you're talking about the course material generally; I think students should help each other with this sort of thing - you're great resources for each other.
"Question 3 is really hard. How did you do it?" Now we're getting into a gray area. If you're talking in generalities here ("Well, we have a module that parses user input, and one that matches the template to stored data, and then another module that constructs a response") that's fine; you're not telling the other person exactly how to do the assignment, you're just discussing approaches. If you're talking specifics ("To reverse the list, you read in the first element and recursively cons the rest onto it") then we're moving into unacceptable territory. The question to ask is: does the person I'm talking to still need to think for themselves in order to solve the problem, or have I just given them the entire answer?
"Can I just look at/use/copy your code?" Definitely not acceptable. Students that I feel are cheating in this manner (this is cheating) will not be treated nicely.
Also note that using code that you get off the web, from a friend, etc. and turning it in as your own is considered plagiarism, just as if you did it in a paper. This will result in (at least) a zero for that assignment.
Schedule:
Note: This timetable is quite likely to change. I will announce any changes in class, but be sure to check the webpage frequently for updates as well.
| Week 1: | ||
| Fri 8/23 | Intro | |
| Week 2: | ||
| Mon 8/26 | Principles of OO design pt 1 | |
| Wed 8/28 | A tour of Squeak | hw1 out |
| Fri 8/30 | Smalltalk basics and syntax. | |
| Week 3: | ||
| Mon 9/2 | Labor Day | |
| Wed 9/4 | Smalltalk basics: Using squeak. | |
| Fri 9/6 | Intro to Morphic. | |
| Week 4: | ||
| Mon 9/9 | Morphic and scripting | |
| Wed 9/11 | Networking in Smalltalk | |
| Fri 9/13 | Project 1 description. | hw 1 due - Project 1 out |
| Week 5: | ||
| Mon 9/16 | HTML Forms and CGI | |
| Wed 9/18 | Streams | |
| Fri 9/20 | Project discussion/OO design concepts | |
| Week 6: | ||
| Mon 9/23 | Multimedia in Squeak | |
| Wed 9/25 | Multiple Processes in Smalltalk | |
| Fri 9/27 | Smalltalk wrapup and summary | |
| Week 7: | ||
| Mon 9/30 | Intro to functional programming | project 1 due |
| Wed 10/2 | Lisp intro | hw2 out |
| Fri 10/4 | List Operations and recursion | |
| Week 8: | ||
| Mon 10/7 | Conditionals, more recursion | |
| Wed 10/9 | Lambda, let, labels | |
| Fri 10/11 Project 2 discussion | hw 2 due, Project 2 out | |
| Week 9: | ||
| Mon 10/14 | More list operations: find, sort, etc. Association Lists. | |
| Wed 10/16 | Structures | |
| Fri 10/18 | Iteration: Do, dotimes, loop, while | |
| Week 10: | ||
| Mon 10/21 | Packages. | |
| Wed 10/23 | Macros | |
| Fri 10/25 | programs as data | |
| Week 11: | ||
| Mon 10/28 | Language extensions, functional programming | |
| Wed 10/30 | CLOS | |
| Fri 11/1 | more CLOS | |
| Week 12: | ||
| Mon 11/4 | Introduction to declarative programming | Project 2 due |
| Wed 11/6 | Prolog intro | hw3 out |
| Fri 11/8 | Prolog syntax and execution model | |
| Week 13: | More Prolog syntax and execution | |
| Mon 11/11 | Cuts | |
| Wed 11/13 | How to do 'normal' things in Prolog | |
| Fri 11/15 | Project 3 discussion | hw 3 due, Project 3 out |
| Week 14: | ||
| Mon 11/18 | Lists | |
| Wed 11/20 | Managing the Stack | |
| Fri 11/22 | Streams and I/O | |
| Week 15: | ||
| Mon 11/25 | A closer look at inference | |
| Wed 11/27 | Thanksgiving | |
| Fri 11/29 | Thanksgiving | |
| Week 16: | ||
| Mon 12/2 | Declarative Programming design - comparision to C/C++ | |
| Wed 12/4 | Review. | Project 3 due |
| Final ... |