Date: Wed, 20 Nov 1996 22:32:59 GMT Server: NCSA/1.4.2 Content-type: text/html Last-modified: Wed, 20 Nov 1996 04:36:06 GMT Content-length: 26844
This class is designed mainly to teach you the art of computer programming. To that end, we shall try to develop in you a sense of style and aesthetics that will help guide your programming efforts, and we shall try to develop your intuition about how things work and why. You will learn some of the design principles that go into the engineering of good programs. We shall teach you a little computer science, to give you a way of analyzing your programs and your algorithms and finding the means to improve them. You will learn a number of standard algorithms and some programming idioms--standard ways of performing certain kinds of tasks.
To do any programming, we need to choose a language. Whichever we choose, the language does not place limits on what our programs can do, but only on what they look like. It provides us with a framework in which to organize our ideas about processes and problem solving. The programming language we use in this class is Scheme. We have chosen it because it provides a convenient mechanism for describing most of the idioms and processes that programmers have found useful. We won't spend much time teaching the details of the language, because we don't have to; you will find that it is easy to pick up as we go along.
It is often helpful to first program using a simple, powerful language like Scheme, even if one must then translate the solution into a more traditional programming language like C++. The simplicity of Scheme allows us to treat many computer science topics in more depth than would be possible if C or C++ were used, for in traditional languages more inessential detail must be mastered. Scheme allows us to give a better impression of the true joys and challenges of programming. Then you will be in a better position to study C++ in your next computer science course, C212.
Finally, computer programming is still a fairly young field, and it hasn't lost its sense of fun for lots of people, including us. We hope that you will enjoy it as much as we do.
What is less appreciated is that programs must also be comprehensible to the programmer. Otherwise the programmer cannot have any confidence that the program is correct. (A program may easily be comprehensible to the computer, but not do what is intended--and only the programmer knows what is intended.) In most cases it is also essential that programs be comprehensible to other programmers. Though this is not typical of student programming experience, in the "real world" programmers spend most of their time modifying huge programs that were developed over a long period of time by many other programmers. Modifying someone else's code (or even your own, a few months later) may be a joy or a nightmare--depending on how clearly the program is written.
Thus we emphasize the importance literate programming: writting
programs that are easy to understand (relative to the difficulty of the
problem they solve). Literate programming is almost always more important
than other programming goals such as efficiency and code compactness
(though efficiency and compactness are often byproducts of literate
programming).
Course Materials
The links in the following list are to script files that drive the on-line lecture presentations. The script file for chapter n may also be accessed on the machine copper as the file ~c211/www/scriptn.
Prof. Leone uses a separate script for each lecture, based on the scripts below (sometimes with more examples).
# | Assignment | Due | Answers |
---|---|---|---|
1 | Getting started | 9/11 @ 5pm | -- |
2 | Simple procedures | 9/18 @ 5pm | Answers |
3 | Simple recursion | 9/25 @ 5pm | Answers |
4 | More on recursion | 10/2 @ 5pm | Answers |
5 | Deep recursion | 10/11 (Fri) @ 5pm | Answers |
6 | Iteration | 10/16 @ 5pm | Answers |
7 | Locally defined procedures and polynomials | 10/23 @ 5pm | Answers |
8 | Binary Numbers, Data Abstraction, and Trees | 10/30 @ 5pm | Answers |
9 | Encodings and Interactive Programming | 11/8 (Fri) @ 5pm | Answers |
10 | Procedures as Arguments and Building Huffman Trees | 11/13 @ 5pm | Answers |
11 | Procedural Abstraction, Strings, and Vectors | 11/26 (Tue) @ 5pm |
As submitted, all programs must run under Chez Scheme. It is recommended that you use the UCS (University Computing Services) machines named copper and zinc. New students should have a Network ID and instructions for creating copper and zinc accounts.
As soon as you have your account, you should configure it to run emacs, Scheme within emacs, and the handin program. This is done by entering ~c211/setup, hitting return, and logging out. You only have to do this once! When you login the next time, your account will be configured for C211. You have to configure both your copper and zinc accounts.
Assignments will be posted on or before Wednesday afternoon and will be due electronically by 5:00 p.m. on the Wednesday of the following week. Any written material will be due at the beginning of the lecture on that Thursday or Friday. Late assignments will not be accepted! In computing the semester assignment average, the lowest assignment grade will be dropped. Although assignments count for only 10% of the final grade, it is essential that you do the assignments to master the material. Computer programming, like playing a musical instrument, can only be mastered through lots of practice.
Programming assignments are submitted using the program c211-handin (in the directory ~c211/bin on copper and zinc). The handin program evaluates and grades your program's behavior and the results are returned to you almost immediately via email. Since zinc allows e-mail to be sent but not received, you will have to read the grading results on the machine where you normally read your mail. You may correct and resubmit your programs as many as five times until the announced deadline. The highest grade recorded for the assignment will be the one that is entered into the class gradebook.
In this course, you may discuss assignments with other students. (Do not assume this is true in all your courses!) We expect you to actually think through and fully understand assignment solutions. We have found that students who copy someone elses work and turn in something they do not fully understand usually fail the examinations and the 10% added by having good assignment grades is insufficient to pass the course. Teamwork in doing assignments is good as long as each member of the team contributes and fully understands the programs. This certainly means that you should not put your name on a file written by someone else and submit it as your own work.
After the final submission of an assignment, it will not only be electronically graded, but an Associate Instructor will also grade the assignment for style. Good programming style makes it easier to get your programs working and also develops the habit of literate programming which, as we have already noted, is of great importance in developing large programs. In this course good style is also rewarded in the evaluation of exams. For Scheme programming, consistent use of a suitable style of program indentation is essential, and violation of the first cardinal rule of indentation will automaticaly result in loss of credit.
Communication
The course newsgroups,
ac.csci.c211 and,
ac.csci.h211 will be used
to post announcements, such as assignments, exams, and any exceptions
to our usual office hours. You are also encouraged to use it to post
questions related to the course or share related information with the
class. Make a habit of looking for new notes a few times each
week. On individual or personal matters, please feel free to contact your
instructor or associate instructor via email.
Another newsgroup you should check regularly is cs.students, which contains important announcements from the Computer Science Department to all of its students. It also contains interesting dialogs on various topics.
This course description is accessible as an HTML (hypertext markup language) file on the WWW (World Wide Web) with the URL (Universal Resource Locator) http://copper.ucs.indiana.edu/~c211/home.html. It will be updated with additional information, such as programming assignments, as the course progresses.
To view a resource given its URL, use the netscape program on a
networked PC or Mac. Netscape underlines HTML hypertext links. To
follow a link, click on it. The URL for the computer science
department's home page is
http://www.cs.indiana.edu/home-page.html, from which all sorts of
information can be obtained.
Evaluation