Lecture Notes for Advanced Programming II

20 January 2004 - How to Pass This Course


What Happened Last Time

Fall '03 final grades.


Course Objective


Be a Good Student


Follow Directions


General Input Rules


Error Messages


General Output Rules


Bad Output Example

 

Date: 27 Sep 2003 13:41:19 -0500
From: rclayton@monmouth.edu
To: 509
Subject: Follow directions.

Many people are losing many points on the first
assignment because they're not following
directions, particularly for output format.

For example, the following is an answer produced
by one of the assignments:

  Enter the ink intervals on edges of all shreds 
  for unshredding the document: 

  The edges of unshredded document:

  1 2 
  1 2 

The answer is correct, but it won't be getting
full credit because, in addition to the correct
answer, it output all that other stuff, which was
not part of the output required by the assignment.

Starting with your second assignment, I'm going to
consider such output to be flat out wrong.


Output Example Continued


Date: 5 Oct 2003 18:22:38 -0400
From: rclayton@monmouth.edu
To: s0-----@monmouth.edu
Subject: Decorated output.

  I agree that you did not directly mention
  about prompting in the assignment page.

But I did expliclty mention during the
passing lecture not to prompt for input and
decorate output.

  I did this because I though it would be
  helpful if someone wants to test the
  program.

The only tester you should worry about is me;
if you want to be helpful, you should do what
I ask.


Exhibit Learning Behavior


"But Everybody Makes Mistakes."


Use Your Time Wisely


No, Really - Use Your Time Wisely

Date: 6 Mar 2003 16:36:14 -0500
From: rclayton@monmouth.edu
To: s0------@monmouth.edu
Subject: Deadline extension

  Is it possible to postpone the project due
  date by a couple of days? All the school
  labs are closed from Friday 5 pm to Monday
  morning, and some of us don't have
  computers at home.

Because you've been working on this project
for the past three and a half weeks, I'm
disinclined to extend the deadline.  What
you've accomplished up to this point should
be more than enough to do well in the
project; the bells and whistles you could add
in the remaining days, although they may be
interesting, are probably not important in
meeting the project's requirements.


Learn to Ask Questions


A Bad Question

Date: Wed, 10 Sep 2003 11:26:12
From: s0------@monmouth.edu
To: rclayton@monmouth.edu
Subject: using send-files

I couldn't get send-files to work.


A Good Question

Date: Wed, 10 Sep 2003 11:32:36
From: s0------@monmouth.edu
To: rclayton@monmouth.edu
Subject: I can't get send-files to work

I was trying to send the program from
rockhopper while telnetting in. Does it have
to be sent from an on campus machine?

I followed the instructions on the assignment
page:

  send-files -a 1 -s 305lab1a.cc

It says it can't find "send-files".


Other Bits of Advice


Be a Good Programmer


Programming is Communication


Know Your Tools


Test Your Code


The Vexing Question of Documentation


My Documentation Style


Functional Documentation


Functional Documentation Examples


Functional Comments and Grading


General Programming Tips


Dynamic Memory is Not Your Friend


Big Code is Bad Code


Write Small Code


Code Size and Grading


Avoid Duplicate Code


No Magic Numbers


Use Named Constants


Other Programming Tips


This page last modified on 20 January 2004.