CMPS 105: Systems Programming

Programming Assignments


There will be about eight programming assignments. All programming assignments are due at midnight on the date specified. Late assignments will not be accepted unless they are the result of an emergency or severe illness, and then only by permission of the instructor. Be forewarned, if you claim to have had an emergency or severe illness, I will require a note from your doctor. One word of advice; these assignments may be difficult so it is essential that you start them early and give yourself enough time to work on them.

Turning in programming assignments

Programming assignments are to be turned in electronically, using submit. The class locker is cmps105-sb.s05 and the assignment name is simply assignmentn, where n is the number of the assignment, i.e. assignment #1 is assignment1.

For example, to submit assignment #1, assuming that you want to submit a file called foo, simply type:

    submit cmps105-sb.s05 assignment1 foo
To submit multiple files, simply execute this command multiple times, specifying the correct file name each time (or a list of files separated by spaces). Alternatively, you can tar your files into single file and submit that. For more information on the tar command, type "man tar".

For more information about how to use submit, just type "submit -m" on one of the cats machines and you will get the instructions.


Design Documents

Your design document for each project should be called DESIGN, and should reside in the project directory with the rest of your code. Your design should describe the design of your assignment in enough detail that a knowledgable programmer could duplicate your work. This includes descriptions of the data structures you're going to use, all non-trivial algorithms and formulas, and a description of each function including its purpose, inputs, outputs, and assumptions it makes about the inputs or outputs.

I have written up an example of a reasonable but not very wordy design, and an adequate if not exceptionally beautiful piece of code that implements it. They show the design and implementation of a tic-tac-toe program. It works, but the I/O is not great. A graphics interface would be a lot nicer. Please note that I really did write the design first, and writing the code was almost as easy as following a recipe. Interestingly, other than typos and poorly formatted output, the only bug was a missing end-of-comment symbol that caused some of my code to disappear.

By the way, this command: "indent -bad -bap -bbb -bbo -br -brs -ce -i2 -cli2 -l80 -lc80 -npcs -npsl -nut ttt.c", produces nicely formatted code that conforms to the coding standards I expect you to use.

Here are the files:

The Design: DESIGN

The Code: ttt.c


Coding Style

System software is often complex and/or confusing. Poor coding style only makes the situation worse. For that reason, I expect exemplary coding practices from everyone in this class. If you fail to follow the guidelines I have provided, you will lose points on your assignments even if they are otherwise perfect

C Style Guidelines for CMPS 105 - you must read and follow these guidelines.


Tools and Techniques

Good programming involves more than just good coding. Good practices include using project directories, RCS, good editors (emacs), etc. Accordingly, you are expected to use certain tools and techniques in implementing your solutions to the programming assignments.

Tools and Techniques for CMPS 105 - you must read this and use the tools and techniques listed


The Assignments

Assignment
Description:
Solution
Timer Program
Efficient File Copier
File Searcher
A Simple Shell
Assignment 5
ps/top
 
Assignment 6
The Skeleton of an Audio Player
 


sbrandt@cs.ucsc.edu