Many students consider the finishing points of programming to be a trivial matter, but they are very important to the person who is grading your assignment, and to your eventual employer (even if that's you!). Good coding habits cannot be "switched on" when you are hired by a company; it takes effort to learn these programming skills, just as it takes effort to learn the effective use of a given language.
I will talk about style in class constantly; the book uses good style. If you model your code on the code from class or the text, that should take of all your style needs (with the possible exception of comments - because in class I am speaking to you about what I am coding while I'm coding, as is the text).
Accordingly, assignments can lose the following percentages for bad programming style:
10% naming
100% formatting/indenting
20% comments
20% parameter descriptions and/or data examples (if not defined in
assignment)
20% modular structure
and the following deductions may be taken for submission problems:
20% missing or poor testing
20% error checking
10% stapled
Clearly these add up to more than 100 percent. Like most things in life, there are many more ways to do something wrong than to do it right. You will not receive a negative score for a problem.
Most of these things are critical to the job of the TA grading your assignments. Take testing, for example. If you do not include proper testing, your TA must work harder to determine if your assignment is correct, and that isn't fair to a TA grading many assignments. Also, correct code is easier to grade than broken code; if your code doesn't work quite right, SHOW the test that it can't do and circle it, and we'll at least know that you knew something was not quite right. :)
Particularly egregious violations of any style or submission parameter may result in a larger impact on your grade, and not all transgressions will merit the full penalty.