For want of a nail, the shoe was lost.
For want of the shoe, the horse was lost.
For want of the horse, the rider was lost.
For want of the rider, the battle was lost.
For want of the battle, the kingdom was lost,
And all for the want of a nail ...
(Latest Revision -- January 23, 2011)
[01/23/2011: Initial updates]
TERM: Spring 2011
for Computer Programming I: CS 1500
The 10:00 Class:
20414 CS 1500 001 Computer Programming I Lec 3.0 MW 10:00-10:50 P-103
20415 CS 1500 002 Computer Programming I Lab 0.0 F 10:00-10:50 P-103
The 12:00 Class
23670 CS 1500 005 Computer Programming I Lec 3.0 MW 12:00-12:50 P-101
23671 CS 1500 006 Computer Programming I Lab 0.0 F 12:00-12:50 P-101
(Although "Lab" is officially scheduled in the classroom on Fridays,
we will actually go to P-288 for most or all labs - and we'll use Monday,
Wednesday, or Friday for labs, according to convenience.)
INSTRUCTOR: John Sarraillé, Professor of Computer Science
P-286, Professional Schools Building (aka: Demergasso-Bava
Hall), Cal State Stanislaus
OFFICE HOURS: MF 13:00-15:30; or by appointment
(The first day of scheduled office hours is Friday, January 28 and the last is
Monday, May 16.)
The point of the course is to learn to do computer programming.
Fundamentally that means you have to acquire:
An algorithm is a step-by-step description of how to solve a problem. A
couple of examples of algorithms encountered in ordinary life are 1) a recipe
for corn bread, or 2) instructions for assembling a bicycle. A computer
programmer uses a programming language to write an algorithm that
describes how s/he wants a computer to solve a problem. I'll require you to
learn some of the C++ programming language, and write some programs with C++.
- Good problem-solving skills,
- Techniques of algorithm design, and
- Skill in choosing ways to represent data.
Here are several sub-goals relating to our main objectives:
- Learn the basics of program testing and debugging,
- Find out how to use unix computers effectively,
- Gain facility with a text editor,
- Develop self-confidence and self-reliance, and
- Acquire the ability to cope with the inherent uncertainties and
complexities of today's computing systems.
Problem Solving with C++, (7th edition);
Walter Savitch, University of California at San Diego;
published by Pearson Addison-Wesley, 2009;
Learning the Unix Operating System (5th edition);
by Jerry Peek, Grace Todino-Gonguet and John Strang;
published by O'Reilly and Associates, 2001;
We will cover chapters 1-7 in Savitch.
online class schedule
for a complete list of weekly reading assignments. (The URL is:
This class will be C++ oriented. You'll learn C++. You'll do all your
programming labs and assignments in C++.
BASIC INFORMATION ABOUT CLASS SESSIONS:
For technical reasons, students in this class are required to sign up
separately for a lecture section and a lab section of CS 1500. In fact, each
class session is a mixture of lab and lecture. Each day we do whatever we
need to do: lab, lecture, or some of both. Sometimes we will meet in the
CS department laboratory (P-288).
In a given week, possibly we'll spend one class hour in the lab and two in the
lecture room. Many variations are possible, so check the
online class schedule
My expectation is that everyone will attend all the classes and keep current
with everything that is happening in class. I will keep track of attendance.
TESTS & GRADING:
Your course grade depends on three components: laboratory, solo programming,
The laboratory component consists of work you do with a lab partner in
the CS lab. You run commands, run applications, and write small programs. To
show that you did the work properly, you turn in such things as listings of
source code, scripts showing your work sessions, and/or listings of command
outputs. (The specific requirements vary with the different lab assignments.)
Your score on the laboratory component of the course will be the average of
your scores on the individual labs.
The solo programming component consists of programs that you design,
write, and test all by yourself. Your score on the solo programming component
of the course will be the average of your scores on the individual solo
The examination component consists of several quizzes and an optional
comprehensive final examination. Each quiz and exam will cover topics from
lab, reading assignments, programming assignments, and lecture. Your score
on the examination component of the course will be the maximum of
To pass CS 1500 you must:
- the average of your quiz scores, and
- your score on the final examination.
If you meet all the criteria above, your course grade will be derived from the
weighted average score of your course components. If the average is 91-100
you will receive an 'A' in the course; 81-90 earns a 'B'; 71-80 gets a 'C';
and 61-70 is a 'D'.
- turn in a satisfactory solution to every solo programming problem;
- have a passing score on the solo programming component;
- have a passing score on the examination component; and
- have a passing weighted average score on your course components: 20%
weight goes to the laboratory component, 40% to the solo program
component, and 40% to the exam component.
You don't have to take the final examination. You can take it if you want to
try to raise your score on the examination component.
There will be no make-up quizzes.
Please feel free to seek my help in office hours, lab, or lecture
if you are having difficulty making progress on any programming
problem. You are entitled to this service. Students need this
kind of help from time to time, so please have the wisdom to use
it when you need it. Also please get started early on
assignments and come early for the help you need. I'll listen
and do what I reasonably can to help.
Experience has shown that when students submit late assignments
and professors tolerate it, chaos sets in very rapidly.
You will be penalized 10% per calendar
day* for a late solo programming assignment up to a
limit of 6 days, or up until such time that I show a solution to the class,
whichever comes first. Beyond that limit your
submission will not be accepted, and unfortunately that will mean
that you do not pass CS 1500 this term.
* Every day is a calendar day -- including weekend days and
We can discuss due dates in class and I may be willing to move a due
date back (for the whole class) if doing so can be justified to my
satisfaction. If you are uncomfortable with a scheduled due date, please
bring this to my attention as soon as possible, and not at the last minute.
(It's usually a good idea for class members to try to work out some consensus
before bringing the subject up with me.)
If you are not finished with an assignment on the
due date, turn in what you have done on the due date, and
write me an e-mail explaining that you are turning in an assigment that you
have not yet completed. After that, try your utmost to finish it before
the end of the six-day penalty period. If you can't finish by then,
do turn in what you have done before the end of the six-day
(Depending on the quality of the work
and the circumstances, it may be possible to get up to about half
credit for a partially-completed solo programming assignment.)
If you think you are going to be unable to take a test or turn in an
assignment on time due to extraordinary circumstances beyond your control,
then let me know at the very earliest time possible. I'll try to make some
fair arrangement with you.
I hope to be accessible, helpful, and responsive to your needs during this
course. I hope you get what you want out of it.
To optimize your likelihood of success, I think you should participate fully
in the course: Attend all the classes. Listen closely and take notes.
Finish assignments on time. Review your notes before class. Try to reply to
questions or remarks addressed to you. Ask questions. When you are not
getting anywhere on some problem, and it's not the kind of thing you can get
resolved in class, seek my help during office hours.
RESPONSIBILITY FOR YOUR OWN WORK:
Feel free to discuss anything about the lab assignments
with your lab partner or anyone else. Feel free to give or
accept any kind of help on these assignments, including the
sharing of actual C++ code. (Of course, you are likely to learn
more if you try to do what you can on your own.)
You must treat the solo programming assignments in a very
different manner. You must not "share code" - meaning:
It is OK to discuss your solo assignments. For example, students may
get together and make sure they all understand what the progam is supposed to
do. It's also OK to discuss the relative merits of various general
approaches to designing the program. As I said above, however, it is
not OK to share code,
- You may not allow any part of the C++ code you
compose (make up) for a solo programming assignment to be
communicated to another member of the class or allow another
person's solution code to be communicated to you.
- You may not look at any part of the solo program code of another
member of the class, whether on paper or on a computer screen.
In your solution code for a solo program, you are permitted to
use segments of code or algorithms that you find in:
You are permitted to share material of type 1-3 above with other
members of this class.
- any printed material available for student check-out in our library,
- our course texts, or
- any programming textbooks to which you have access.
You may ask me for help and hints on solo assignments. I prefer
that you ask questions in class, so that everyone has a chance to
benefit from the discussion.
During quizzes and exams, you are allowed to come forward and ask me to
clarify the meaning of a test question. It will be up to me to decide how to
answer, or whether to answer at all. I will tell the members of the class any
new information that arises from such an exchange. Aside from that, you
must write quizzes and exams without help from other people and without
the help of any written materials that I have not explicitly approved.
I will withhold credit if there is
compelling evidence that you did not follow the rules spelled out
NETWORK AVAILABILITY OF COURSE MATERIALS:
Many course documents, assignments, supplements, and so on will be made
available via the world wide web. To access the on-line CS 1500 materials,
you can open the URL
from any web browser on any computer connected to the campus network or
Also, there is a miscellaneous collection of information of which you may need
to make use from time to time. It is located here:
COMPUTER EQUIPMENT -- CS Lab Workstations:
Each of you will need an account that gives you access to Computer Science
Department computers. Most or all of these computers have been specially
networked so that you get the same environment, including home directory of
your personal files, regardless of which computer you log on to.
You will learn much of what you need to know about using the computers during
our lab sessions.
The machines are located in the Computer Science Lab:
P-288 is in the Professional Schools Building (also known as Demergasso-Bava
Hall, or DBH). P-288 is in the northwest corner of the second floor of the
north wing. (
See the map ).
You can develop your programs on whatever computer you like. However,
I will test the programs that you write for this course by compiling
and executing them on one of the Computer Science Lab Sun Ultras. Therefore
you must write programs that will compile and run without errors on these
machines. There should be no problems if you use the standard C++ programming
constructs from your textbook. I'll let you know if I have a problem with
your code. Your cooperation will be appreciated (and expected).
Generally, the CS Department workstations are available for access and use on
a 24-hour basis. However the campus computer labs do not remain open at all
hours. Therefore sometimes network connections will be the only means
available for connecting to the CS Department Lab workstations. For more
information about network connections, see the section below entitled
"INTERNET CONNECTIONS". Also see the document entitled Gaining Access to
Workstations in the Computer Science Department Network, which you can
access at the following URL:
P-288 will be open basically mid-morning until about 17:00 (5:00 p.m.).
During these times, you can be physically present in the CS Department Lab
while using a department computer. This can be very beneficial because you
then have the opportunity to work and communicate with fellow students and
members of the faculty.
Due to budgetary constraints beyond our control, the hours during which P-288
is open are subject to change on short notice. Please check the postings of
the lab hours at the entrance to the lab, or in the "message of the day" that
is printed on your screen when you log on to your CS computer account, or
check on the web.
Incidentally, the CS Department often seeks volunteers and work-study students
to help keep the lab open longer hours. For further information, ask our
system administrator, Julie Gorman:
While you are in the CS Lab, you will be able to access workstations by
logging in directly at the console, or by using a remote-login program such as
"ssh" from another workstation, or from your laptop computer.
Remote login makes it possible for many people to use a given workstation
simultaneously. If you are developing a program on one computer and want to
see if it compiles and runs OK on a different computer, you can login to the
second computer remotely to do the test. Depending on the circumstances, you
may first need to use a file-transfer program (sftp) to place a copy of your
program on the remote computer.
We will have a demonstration of how to perform remote login. (You can
probably get help just by asking someone in the lab.) You can also access CS
workstations via an "ssh" connection from most any computer on the campus
local network, such as those in L-145, N-201 and L-210. Generally those labs
are open during the same hours that the campus library is open. To get
further information about the labs and their hours of operation, try
consulting OIT Client Services:
You may also check postings at the labs or ask lab personnel for information.
Lab assistants should be able to show you how to do a remote login and/or
a file transfer to a CS Department workstation.
You may want to have Internet connectivity installed in your home. This is
not a requirement and not necessary for success, but it can be a
great time-saver and convenience once you have gotten past the hurdle of
setting everything up.
There are several Internet service providers (ISP's) that serve this area.
Chances are that members of the class can make good recommendations. We can
devote some time to this topic in class.
One can find many ISP's by using the site:
ISP's also advertise in the yellow pages and in newspapers.
If you get an Internet connection, make sure you get remote-login and
file-transfer software. This will allow you to log in from home to
your computer account at the college and also transfer files back and forth.
For more information about this, read the remote-login and file-transfer help
sheet, which may be found online here:
For additional information, ask me or the CS Lab Administrator, Julie Gorman.