CS35: Programming and Problem Solving

Ray Ontko
Department of Computer Science
Earlham College

Fall Semester 1999
Lecture: Dennis Hall, Room 014
Lab: Dennis Hall, Room 224
8:00-8:50 MWF

Syllabus

Why this course?

Programming is about breaking a task down into little pieces and describing each piece carefully so that a computer can flawlessly execute them in the proper sequence to achieve a particular goal.

Problem solving is about analyzing a problem, breaking it down into its constituent parts, looking at it from a number of angles, and characterizing each piece of a problem in such a way that the solution is clearly apprehended by anyone who would care to listen.

To learn to program is to learn to think carefully and precisely about a problem.

CS35: Programming and Problem Solving provides a rigorous introduction to computer programming. By writing computer programs, you will not only master a computer language, you will also learn to give instructions so completely and clearly that even a machine could execute them flawlessly.

You will also reflect on programming and problem solving as intellectual activities. You should gain some insight into how problems can be solved, and how you solve them. By the end of the course you should be able to give clear and convincing answers to questions like "What is a program?" and "What is an algorithm?", but more importantly, you will have gained experience with specific problem solving skills that will help you in any field of endeavor.

This is not a course in Mathematics, but it does build on some of the notions which are fundamental to a high-school course in Algebra. This is not a course in Logic, but you will find yourself using logic in your programs and in testing and modifying your programs. This is not a course in Engineering, but you will use specific skills and techniques in solving specific problems.

This is a course in thinking.

Pre-requisite Courses

There are no pre-requisite courses listed for CS35: Programming and Problem Solving. This is an "entry level" course in computer science designed for non-majors and people who don't know if they'll be computer science majors. It also serves as the first course in computer science for people who know they want to major in computer science but have little or no programming experience.

Students who have difficulty with variables and equations may find certain aspects of this course to be challenging (at best) or frustrating (at worst). I invite you to accept the challenge. I assume that you took a year of algebra in grade school and that you encountered it again in high school. I don't expect you to be an equation-solving whiz, but I do expect you to try to put aside any math anxieties you may have and follow along when you see variables and math symbols in programs; they're a necessary part of programming. If you are completely math phobic, come talk to me before comitting yourself to this course.

Students who have a familiarity with a typewriter keyboard will be at some advantage. If you do not already know how to type efficiently, I encourage you to teach yourself how to touch-type while taking this course. All it takes is knowing which fingers to use for which keys, and a little practice without looking at your fingers. You'll be amazed at how liberating (and how much faster) it is to type without looking.

Overview

This course will use a text and a number of programming exercises and programming projects to help you build an understanding of programming in general and of the C programming lanaguage in particular. You will also complete a final programming project in which you will apply all of what you have learned about programming to solving a small but interesting problem.

We will also take some time to reflect on problem solving as an intellectual activity; you will encounter many problems to be solved during the course. To further support this aim, I am also asking that you keep an academic journal on programming and problem solving.

Your full participation and academic integrity are critical to getting the most out of the course. Your grade for the course, then, should reflect the degree to which you have mastered the material and techniques of the subject area, and the degree to which you have taken advantage of what the course has to offer.

These topics and the course schedule, how to reach me, a possible motto, and my humble acknowledgments are given below.

This syllabus and other handouts will be available, where practical, on the course homepage. There is also a listserv available to facilitate e-mail correspondence between members of the class.

Texts

The required text for the course is Deitel, Harvey. M. and Paul. J. Deitel, C How to Program, Second Edition (Prentice-Hall, 1994). 926 pages. This is a modern, example-laden text and is designed for self-study or classroom use. This text does not assume that you have any prior programming experience.

A recommended (but not required) text for the course is Kernigan, Brian W. and Dennis M. Ritchie, The C Programming Language, Second Edition (Prentice-Hall, 1988). 272 pages. This is a classic, terse text and is designed for self-study. It is an updated edition of the first book ever written about the C programming language. This text assumes that you already know a little about programming and you just want to learn the C programming language.

Homepage

I have created a homepage for the course: http://www.cs.earlham.edu/courses/cs35/. I will place links to handouts (including this syllabus) and other information related to the course there. If you encounter any web pages related to our work in the course that you think others in the class would be interested in, let me know. I'll add them to our home page.

Listserv

There is a list-serv available to facilitate e-mail correspondence among members of the class. It is cs35@cs.earlham.edu. Feel free to use this list-serv to carry on discussions related to the material, the course, or other topics of interest to class members. I will also distribute class announcements by e-mail when possible.

Commands to join the list or modify your subscription to it should be sent to majordomo@cs.earlham.edu.

Programming Exercises

Each Wednesday and Friday through most of the term I will ask you to write a brief program as an exercise applying the material we've covered in class or in the assigned reading.

The exercise programs are meant to be simple applications of a new programming concept, not difficult problems to be solved. If you've come to class and read the assigned reading, these should take about half an hour or an hour of your time.

I will not grade your exercises, but I would be happy to look at them if you would like to turn them in or if you have questions about them. They are an excellent way to validate and deepen your understanding of a particular element of the language before you need to apply it in a full-blown program. If you don't do the exercise programs, you should expect to have lots of trouble on the programming projects.

Programming Projects

The programming projects are an opportunity for you to apply some of what you've learned thus far in the course. As a general rule, the programs will be relatively short, but should be robust and easy-to-read programs which solve a particular problem. They should convey your very best effort to solve the problem and write good, readable, maintainable code.

I'm looking for programs which demonstrate a clear understanding of the underlying programming language elements and which provide an appropriate solution to the assigned problems. You may wish to add bells and whistles to the program, but beware that although these may make the program more fun for you, they are not likely to improve your grade and may in fact make your program harder to write, debug, and read.

The due dates for the programming projects are indicated on the course schedule. The specific programming tasks will be assigned at the beginning of the corresponding section of the course.

The grading for each programming project will be divided between functionality and style:

Note that the bulk of the grade is on the functionality of program. In other words, Does the program work? If the program doesn't have to work, I'll bet I can write one smaller, faster, sooner than the one you wrote (or at least no worse than). By definition, programs which don't work are useless.

A significant portion of your grade is for programming style, by which I mean the readability, maintainability, extensibility, and accessibility of the code. Few programs are ever the work of one person, and the most successful programs are often those that are modified and enhanced by others, both in industry and academia. Code which is unreadable or not understandable is ignored; write code which others would enjoy reading and enhancing.

The four programming projects comprise 40% of your grade; each one is worth a whole letter of your final grade.

Final Project

In addition to the programming projects described above, you will also complete a final programming project. The goal of this assignment is to apply all that you have learned about programming and problem solving to solve a small but interesting probelm. You will have your choice of a number of recommended projects, or you may create a project of your own design.

You will have several weeks to complete the final project, but you should begin thinking about your project early in the course, certainly by mid-semester. A good project can't be completed in a weekend, and you may find that you're more productive as a programmer if you set the program aside and come back to it with fresh eyes the following day. Waiting until the last minute precludes this tactic.

The final project comprises 30% of your grade (three letters of your final grade for the course).

Journal

During the course I will ask you to keep an academic journal. This should be a notebook devoted to a personal and scholarly exploration of programming and problem solving. In it you should record observations about programming as it relates to problem solving, significant hurdles and breakthroughs you encounter during the course, and other noteworthy happenings related to the course and your reflections on them. It is not a day-by-day diary of what you did in or for the class, but should include mention of events that were intellectually significant for you. It is also not merely a collection of important events, but your earnest reflections on what problem solving is and how you solve problems.

I will ask you to submit your journal several times during the course, approximately every two weeks, typically on Mondays when you do not have other assignments due. I will read them all, and may offer questions for you to consider or other things to think about, but mostly I'm there to give you someone to think out loud with and give you specific intermediate goals. The primary goal of the journal is to help you focus on what problem solving is and how you do it.

The journal comprises 20% of your grade (two letters of your final grade for the course).

Participation

This course is not only about learning the material in the text and writing a few programs. If it were, there would be very little reason for us to meet as a class. A good student could learn the material by studying the text carefully and working through the exercise problems given. Indeed, this is the point of the text.

We meet as a class for a number of reasons:

Your full participation in the course, then, is essential for you to get the full benefit of the course. Engagement in the course includes, but is not limited to:

I will assess your participation, subjectively, based on the above criteria. Note, however, that attendance is a key component; you can't participate if you're not present.

Participation comprises 10% of your grade (one letter of your final grade for the course).

Academic Integrity

In order for you and others in the class to get the most out of the course, it is essential that everyone do their own learning. While this is perhaps obvious, it is essential that we be vigilant to avoid circumventing the learning process for ourselves or others we wish to help. Perhaps a few words about academic integrity are in order.

First, be absolutely clear that it is inappropriate and unacceptable for you to copy any portion of a program written by someone else (whether enrolled in the course or not) and take credit for it as your own. Not only does this deprive you of the joy of discovery and sense of accomplishment that comes from writing the code yourself, but it is also places you at an intellectual disadvantage; you didn't come up with it and don't know that you could come up with it on your own if you needed to. Furthermore, it's unfair to the person whose code you stole.

Second, be extremely careful in how you "help" (or get "help" from) others. If someone has a question about a point of fact about the language, feel free to answer the question. Better yet, answer the question with a question which helps the inquirer find the answer on her (his) own. If someone doesn't understand what's going on in their code, feel free to suggest a change that might help elucidate the problem for them (e.g., "What would happen if you put a print statement here?"). Do not type anything for someone, do not accept typing from anyone, do not give code to anyone, do not accept code from anyone, and certainly, do not go looking on the web for code to paste into your program. Do your own work; carefully support others in doing their own work.

Taking credit for the work of someone else is plagiarism and is an offense to the intellectual community we seek to create at Earlham. It is an offense of the worst kind and will not be tolerated, even if the work is plagiarised "with permission". All plagiarism circumvents learning. Violators (both the donor and the recipient) may fail an assignment, fail a course, or even be expelled from the institution. See the Student Handbook if you doubt my (our) seriousness on this topic.

Grading

The primary goals of this course are to learn the material and the methods.

I have attempted to create a mechanism for grading that supports a wide variety of learning styles, but you will not do well in this course (indeed you may not pass) without learning the material and participating.

The following components will be used to compute your final grade for the course.

ComponentWeight
Exercises0%
Programs40%
Final project 30%
Journal20%
Participation10%
Course Evaluation0%

I will use a weighted average numerical grade when computing your grade for the course. For the purpose of assigning letter grades, the following conversion table will be used:

Letter Grades
A+greater than 97%less than or equal to 100%
greater than 93%less than or equal to 97%
A-greater than 90%less than or equal to 93%
B+greater than 87%less than or equal to 90%
greater than 83%less than or equal to 87%
B-greater than 80%less than or equal to 83%
C+greater than 77%less than or equal to 80%
greater than 73%less than or equal to 77%
C-greater than 70%less than or equal to 73%
D+greater than 67%less than or equal to 70%
greater than 63%less than or equal to 67%
D-greater than 60%less than or equal to 63%
NPgreater than  0%less than or equal to 60%

For example, if you got an average of 92% on the programs, 84% on the final project, a 90% on the journal, and had a participation grade of 100%, you would get a "B-" (92 * 40% + 84 * 30% + 90 * 20% + 100 * 10% = 80.1) If you had the same scores and had a participation grade of 80%, you would get a "C+" (92 * 40% + 84 * 30% + 90% * 20% + 80 * 10% = 79.9 )

My objective is not to focus obsessively on grades. The point here is that you understand how I compute the grade you receive on your transcript.

Due Means Due

Assignments will not be accepted for credit after they are due. Assignments are due during class when called for, or at the beginning of class if you are absent. Do not miss class to finish an assignment.

Course Schedule

The following schedule lists approximate due dates for all assignments and reading. I reserve the right to adjust the schedule to meet the needs of the class. I will advise you of any such changes in class or via e-mail.

The level of effort required for the course should be approximately two hours of focussed, efficient programming or study outside of class for each hour inside of class. Be aware, however, that parts of the course may vary in level of difficulty for you, and you may not be able to predict how long it will take to complete an assignment. In general, I advise you to start all assignments as early as possible, even if you only take a few minutes to immerse yourself in the problem and then come back to it after you've thought about it for a while.

On days when assignments are due, I will devote available time to answering specific questions about the assignment, or other questions from the reading. I will address questions of interest to the largest number of class members present before addressing questions of individual interest. I will lecture to help introduce each new topic in the course and from time to time where I have additional commentary. But, as often as possible, I will invite students to share insights and present their work in class.

In general, the class sessions are available for you to get answers to questions you generate while reading, working on the exercise programs, or from your programming assignments. On Mondays, I will generally lecture on a new topic and assign exercises, one of which should be completed by Wednesday, and the other by Friday. Wednesdays and Fridays will be less like lecture, and more like discussion; they will allow us to explore questions you have about the exercise problems or other relevant topics.

During the first 5 weeks you will have 2 programs due. During the second 5 weeks you will have 2 more programs due. In the final 5 weeks you will have a final project due. Throughout the semseter, on Mondays when you do not have a program due I will ask you to submit your Journal for review.

Always be prepared to discuss the material from the text and your own work in depth. I will facilitate or lead discussion which I think will be most valuable for the class as a whole. Be sure to bring your brain and your most inquisitive self. Make the most out of coming to class; it's your time.

Week 1
Wed8/25 First day of class, introductions, course overview, mechanics.
Fri8/27 First day in lab. Assignment 1 due. Student Survey due.
Week 2
Mon8/30 Second day in lab. Assignment 2 due.
Note: Final registration cards due at Registrar's Office, 4:00 pm.
Wed9/1 Assignment 3 due.
Fri9/3 Assignment 4 due.
Week 3
Mon9/6 Assignment 5 due. if and else lecture. Labor Day; classes in session today.
Wed9/8 Assignment 6 due. while and getchar() lecture.
Fri9/10 Assignment 7 due.
Week 4
Mon9/13 Assignment 8 due. No journal due.
Wed9/15 tba
Fri9/17 tba
Week 5
Mon9/20 Program 1 due.
Wed9/22 tba
Fri9/24 Assignment 9 due.
Week 6
Mon9/27 Journal due.
Wed9/29 Assignment 10 due.
Fri10/1 Assignment 11 due (first try).
Parent's weekend
Week 7
Mon10/4 Assignment 11 due (second try).
Wed10/6 Assignment 12 due.
Elements of C Style
Fri10/8 Program 2 due.
Quiz 1 (self test)
Homecoming weekend
Week 8
Mon10/11 Journal due.
Wed10/13 Assignment 13 due.
Fri10/15 Mid-semester Break.
Week 9
Mon10/18 tba
Wed10/20 Assignment 14 due.
Fri10/22 Assignment 15 due.
Note: Last day to withdraw from enrolled fall classes.
Week 10
Mon10/25 An Introduction to Pointers in C
Wed10/27 Assignment 16 due.
Fri10/29 Program 3 due.
Quiz 2 (self test)
Week 11
Mon11/1 Journal due.
Wed11/3 Assignment 17 due.
Fri11/5 Assignment 18 due.
Week 12
Mon11/8  
Wed11/10  
Fri11/12 Program 4 due.
Week 13
Mon11/15 Journal due.
Wed11/17 Final Project Specification due
Fri11/19 Assignment 19 due.
Week 14
Mon11/22 Thanksgiving Break.
Wed11/24 Thanksgiving Break.
Fri11/26 Thanksgiving Break.
Week 15
Mon11/29  
Wed12/1 Assignment 20 due.
Fri12/3  
Week 16
Mon12/6 Final Project due.
Wed12/8  
Fri12/10 Journal due.
Last day of class.
Week 17
Mon12/13 First Reading Day
Tue12/14 10:30 Final ???
Wed12/15 Second Reading Day
Thu12/16 Finals
Fri12/17 Finals

How to Reach Me

I am sharing an office, Dennis 202F, with Ed Delaney in the Math/Computer Science area in Dennis Hall, 2nd Floor.

I will be on campus and generally available to the course from 8:00-10:00 Mondays, Wenesdays, and Fridays throughout the semester. I will likely be around more often, usually in the morning, so feel free to stop by my office. I can be available at other times by appointment.

I check e-mail several times each day, and e-mail is often the best way to get a specific answer to a specific question. My e-mail address is rayo@ontko.com. Note that rayo@cs.earlham.edu and ontkora@earlham.edu may also work, but these are forwarded hopefully to the first address listed above.

My campus mailing address is Drawer 98. I share this with the rest of the department, so this is not necessarily a good place to turn in assignments. If you want to turn in an assignment, please place it under the door to my office with the following clearly shown: your name, the name of the course, and the date and time you left it.

I do not have a campus telephone extension. If you wish to leave voice mail for me, dial my company voice mail at 966-6221, voicemail box 9001.

My phone number at Ray Ontko & Company is 935-4283. Please feel free to call me there. When I'm not on campus, it's where you're most likely to find me, often past 5:00 pm. If I'm not there, leave a message including the phone number I should call and when I might reach you there.

My home phone number is 935-1598. Please don't call before 9:00 am or after 9:00 pm unless it's an emergency. If it's an emergency, please do not hesitate to call.

Motto

Consider adopting the following motto for your involvement in the course:

"Work hard. Learn lots. Stay Excited. Have fun."

Acknowledgments

This course has been taught at Earlham by a number of people and this offering of the course, while distinctly my own creation, has benefitted from the advice and experience of many others. I humbly acknowledge the contributions of John Howell, Peter Suber, George Silver, Charlie Peck, and Tim McLarnan.

Copyright © 1999, Ray Ontko (rayo@ontko.com).
If you're curious about why I copyright, see Peter Suber's Why Copyright Web Documents?.