|
Homework Submission Requirements
CS 3540
Programming Languages and Paradigms
|
Introduction
This document outlines the rules you should follow when submitting
a homework assignment for grading. These rules will simplify the
grader's job by standardizing the form and appearance of submissions.
Any of these rules can be overridden by a particular assignment but,
if the assignment doesn't say otherwise, follow each of them.
Forms of Submission
When you are asked to submit a set of files, you will be required
to submit them in one or two forms: electronically and (rarely)
hard copy.
- electronic submission
- Log in to the CS 3540 section of the department's
electronic submission system
using your CatID username and password.
- Select the desired assignment.
- Follow the instructions given to upload the required
files and, if allowed for that assignment, any
optional files.
Electronic submissions will generally be due at 11:59 PM, the
end of the day before a class day.
- hard copy
I will rarely ask you to submit a print-out of a file
from an assignment. When I do:
- Print a hard copy of the file specified by the
assignment.
- Staple the pages.
- Bring the hardcopy to your next class period.
If hardcopy is required, it will generally be due at the
beginning of our next class meeting.
Your hardcopy should have a professional appearance.
- Your print-out should fit on standard 8-1/2"x11" paper
printed upright, with no line wrap.
- If you would like to save paper, you may print your
files "2-up".
- Paper clips, folded corners, and nothing at all are
not acceptable.
Documentation
Source Code
- Any Racket source files that you submit should be loadable and
executable by Dr. Racket.
I should be able to open a source file in the IDE, hit the
Run button, and begin using your functions.
This means that your functions must be syntactically correct and
that any non-Racket text in the file must be in comments.
- Place any check-equal? tests for a problem
after the code for your solution. Unless otherwise specified
in the assignment, you should have at least three
check-equal? expressions for each problem.
- Put any helper functions you write for a problem between the
main function in your solution and the tests for the main
function.
Style
I do not require you to follow a lot of specific style rules, but I
do ask you to follow several basic guidelines to improve the
readability of your code.
- Indent your code in the standard Racket way.
Racket's style indicates that one expression is subordinate
to another. This is essential when programming in Racket.
For example, write this:
(define factorial
(lambda (n)
(letrec ((accumulate
(lambda (n answer)
(if (zero? n)
answer
(accumulate (- n 1) (* n answer))))))
(accumulate n 1))))
not this:
(define factorial (lambda (n)
(letrec ((accumulate
(lambda (n answer)
(if (zero? n)
answer
(accumulate (- n 1)
(* n answer))))))
(accumulate n 1))))
You will see proper style in all the code I give and in
all the code you see in our course reading. Learn from
these examples.
When you use Dr. Racket, it will indent your code in the
standard way. If your indentation ever gets out of whack,
you can use the "Reindent" or "Reindent All" options on the
Racket menu to re-indent your code.
- Use names that say what they name.
For example, num-scores is a better name
than n, and number-of-scores
is better yet.
Racket lets you use names that say just about anything
you need to say. Take advantage of that! If you have a list
of the numbers from 4 to 10, name it 4-to-10
. If a procedure converts characters to pairs, name it
char->pair .
- Use hyphens to create compound names.
Racket symbols are case-sensitive, but it comes from a culture
in which names are case-insensitive. Do not use CamelCase
for your procedure and parameter names. Instead of
numberofscores, as you might in Java or
Python, use number-of-scores instead.
Eugene Wallingford .....
wallingf@cs.uni.edu