Instructor

Roger Hartley, SH 148, telephone 646-1218
Office Hours: Mondays, 4:00 - 5:00 pm; Tuesdays, 10:00 am - 12:00 pm.

Where and when

Room: SH115
Time: MWF 11:30 - 12:20
For the first four or five weeks, the Friday session will be spent in the J. Mack Adams lab. SH118.

Textbook:

C How to Program, 2nd. Edition, by Deitel and Deitel, published by Prentice Hall, 1996.

Course outline

This course teaches the fundamentals of programming in the language C, a widely accepted standard for many sorts of computer application, including system software, graphics, scientific programming and, increasingly in business as well. It is the standard language for the UNIX operating system, used here at NMSU, as well as at the majority of other university campuses. It is in use all over the world.

Syllabus

The course is organized into six sections, each of which will address a topic from programming methodology. The content of each topic will use C, but the principles are applicable to any programming language. In this way, you will gain a good set of programming skills, as well as a thorough knowledge of C. The six topics are:

  1. Code reading - from small fragments to whole functions.
  2. Code simulation - by hand, with paper and pencil.
  3. Program design - top-down stepwise refinement.
  4. Program testing - test sets, limits, unexpected inputs.
  5. Program debugging - assertions, using watches as a substitute for hand simulation, extra debugging code.
  6. Program modification - adding requirements, changing requirements, improving efficiency, improving coding.

The breakdown by weeks is:

[1] Introduction, getting started in the lab, UNIX: login/logout, files/directories, ls, cd, mkdir, rm, more/less, gemacs, gcc, e-mail, X Windows.
[2] Intro. to computer languages: source files, compiling, object files, executable files, libraries. Code reading: syntax vs. layout, tagging, names, keywords, types, operators, punctuation, comments
[3] Code reading: name scope, declarations and definitions, classes, functions, blocks, loops, levels of commenting
[4-5] Code simulation: semantics vs. behavior, paper and pencil tracing, diagrams for memory layout, values, expressions, function calls
[6-7] Program design: Top Down Stepwise Refinement, flow charts, tasks, subtasks.
[8-10] Program testing: interactive programs, expected input, unexpected input, input validation, error messages, error recovery, pathological cases, simple cases, generic cases, representative cases, test data files.
[11-12] Program debugging: trace statements replace hand simulation, assertions for exceptions, debuggers, watches, stepping, additional debugging code.
[13-15] Program modification: adding requirements, changing requirements, improving efficiency, adding coding, improving coding

Calendar

[1] 1/13-1/17 First class: Jan. 15th.

[2] 1/20-1/24 Deadline for adding: Jan. 24th. Lab. 1: Edit/Compile/Run/Print.

[3] 1/27-1/31 Lab. 2: Code reading

[4] 2/3-2/7 Lab. 3: Hand Simulation

[5] 2/10-2/14 Lab 4.

[6] 2/17-2/21 Lab 5: Assignment 1: design

[7] 2/24-2/28 Test 1. Wednesday 26th.

3/3-3/7 Spring break: no class

[8] 3/10-3/14 Drop date: Monday 10th. Assignment 2: testing

[9] 3/17-3/21

[10] 3/24-3/28 Spring holiday: Friday 28th.

[11] 3/31-4/4 Moratorium: Friday 4th. late work receives zero after this date.

[12] 4/7-4/11 Assignment 4.

[13] 4/14-4/18

[14] 4/21-4/25 Assignment 5: debugging.

[15] 4/28-5/2

5/5-5/9 Review. Assignment 6: modification.

5/12-5/16 Exam week. CS167, Friday 16th. 10:30-12:30 am.

Resources

The programming problems can be completed in two ways. Either an account on our computer science SUN network will give you access to UNIX and the C compiler gcc, or you will need access to a PC a version of ANSI C, the standard version of C.

Assessment

There will be one mid-term test and a final comprehensive examination. There will also be four or five lab. exercises early on in the course, and then five or six programming problems starting out easily and graduating to fairly hard at the end of the course. It may also be necessary to give take-home quizzes for certain parts of the course. The assignment of credit is as follows:

My grading is always flexible, but justice will also be done! ! Late work will be accepted, but will receive a maximum C grade. However, a moratorium date is included in the calendar after which, any work that is due but not handed in will receive a zero. After this date, assignments not handed in by the first day of exam week will also receive a zero.