How to submit your homework assignments

All written assignments must be put in my mailbox (in the CS mail room - CSB727) before the time the assignment is due (usually 5pm). I check my mailbox shortly after the assignment is due and take out all assignments. I won't take anything submitted after that. The room is usually open until 5, after that you can always knock on the door.

All programming assignments should be submitted using my TURN_IN script. If you care to type your written assignments, you can submit them using the script, too.

To submit an assignment, you should call

  /u/myros/commands/TURN_IN your_directory_name
  

The script requires that you have a file called README in your directory. You should put your writeup or a reference to in the README file.

You can also e-mail your assignments to me. In this case you have to tar and gzip your files and send them as an attachment. But I much prefer that you use the TURN_IN script.

Writeup

Please include the following in your writeup

Also, if you're running out of time and cannot implement something, describe in more detail how you would have done it - you may get credit for this, too.

Style

Note. Many of the comments in this section may seem obvious to you - they are pretty much usual requirements for programming style. However, they are here because some students made the same mistakes in the past, so I hope that this can help to prevent them.

Don't forget to comment your code. I look over it to see how it works, and you'll loose points if I cannot figure it out.

You should follow the usual good programming style, giving the variables meaningful names and avoiding obscure programming constructions. In particular, you should never use general loop operator "DO" - it renders your code practically unreadable, and anything you can use it for can be achieved by using "DOLIST", "DOTIMES" or recursion.

Even though LISP does not require it, all your variables should be declared. The global variables are declared using "defvar" or "defparameter". One common problem for beginning LISP programmers is forgetting that by default all LISP variables except function parameters are global. All local variables must be declared using "LET" operator. You will loose points if you do not declare your variables, especially if it interferes with global variables I set for testing. As in any algorithm, you should only declare the variables global if they denote shared data structures, and motivate your decisions in the algorithm.

Another problem often encountered by people accustomed to procedure oriented programming is input and output. When you're writing a program, say, in C++, you expect the arguments to be entered from an input stream, either a console or a file, and output them by writing to an output stream - terminal or file. Things are rather different in LISP. For the most part your input is entered as function arguments and your output is just the result of a function you execute. In the past, several people actually put print statements in their functions printing the results. This is NOT what you should do, unless you're dealing with complex data structures that cannot be easily printed with the internal LISP printer. In this case, they way to go is to write one function that produces the result, and another that can interpret and print it nicely. You may be asked to get some timing results for functions you write. In this case, you should never time the functions that do any output - it is extremely slow in LISP and the overhead will completely cover the computation time. As the LISP problems grow more complex, you'll have more freedom with your input data format. Though it is entered as function arguments, you're still responsible for making it easy. For example, using structures may be the most convenient way to represent data in your program. However, you should not ask the user to make and input them - instead, your input format should be a list or something else that is easy to type in, and you should write a function that converts the lists to structures - usually it is an easy task in LISP. The way to think about it is the format should be such that it can be quickly and easily entered in a text file and read from there.