Home
Contact Information
Announcements
LMS
Syllabus
Learning Outcomes
Prerequistites
Grading Criteria
References
Optional Textbooks
Web Resources
C++ Development
Misc. Programming Info
Memory Debugging
Getting Help
Tutoring
Advice from TAs
Advice from Students
2007 Course Review
Calendar
Lecture notes
Lab materials
Homework
Test reviews
Weekly Schedule
Office Hours
Lab Times
Academic Integrity
Homework
Due Date and Time
Late Day Policy
Compilers
Electronic Submission
|
Programming Advice from Current & Former TAs
- Read over the assignment in full before you begin coding.
- Only code once you have at least a general idea of what your plan
of action is, and preferably only once you're sure of your data
structures and algorithms.
- Once you start coding, make sure you compile after every 3 or 4
lines of code you write. This way, if there is a compilation error,
you know exactly where it is occurring.
- When you write a piece of functionality, test it fully
before you move on to the next one. Make sure every small piece of
code you write does what you want it to, and that way when things
aren't working later in your code you can assume the error is not in
the functionality you've already written, but rather in something new.
- When compiling, always look at the first error, fix it, and
recompile. Oftentimes the first error causes several more.
- Learn what the more common errors mean. Nine times out of ten,
the same error is caused by the same mistake.
- Comment the top of every function, because:
- commenting is worth points, and
- it will help you remember what you were thinking when
you wrote that function when you have to edit it.
- Break code into logical small pieces; this allows easier debugging
and code re-use.
- Learn how to use a debugger and take advantage of this tool.
- Do not come to Thursday's (due date) office hours, download the
assignment in front of the TA, and expect help. Start early, and come to
office hours with specific questions.
- Do not submit code that does not compile. If incomplete, submit
code that compiles with limited functionality. (See earlier point
about compiling often.)
- Read over the assignment in full after you have finished coding.
- Backup of your work before adding functionality or making major changes.
- Proper formatting will make your code much more readable. Get a
design environment that you're comfortable with that formats and
colors your code for you.
- Use the compiler that the submission server uses.
- Get to know your TAs and Tutors ... they are invaluable resources.
- When sending email to your TA or professor, be thorough and polite
and remember that we receive hundreds of emails each semester from
students.
See also Advice from the Fall 2011 Data Structures students
and Review of CSCI-1200 Computer Science II, Fall 2007.
More Information about Homework Grading
Points for programming assignments are awarded for error-free
compilation, correct program output, and overall program
structure. The program structure grade is an evaluation of the
quality of your code. This includes the following:
- Your code should have a clear, logical organization. Functions
should be written as appropriate to break up the program. Don't put
all of your code in the main function. In general, each function
should easily fit on a single screen.
- Variable names should be intuitive and meaningful. For example, if
you need a variable to represent an employee's salary, use the name
salary, not x.
- Use comments to describe functions and significant sections of
code. These don't have to be long and involved. Keep them short and
clear.
- Use a consistent, logical method of indentation to make your
program easy to read. For example, code inside a loop or if-else
condition should be indented all at the same level (until reaching the
inside of a nested loop or nested if-else construct).
- Don't type lines of text that are too wide to fit the
screen. Break statements cleanly across multiple lines as needed.
- Avoid the use of global variables. Global constants are generally
fine.
Use the example code given in class, in lab, and in the textbooks
as guidelines. Programs that are unclear and do not compile will earn
little or no credit.
Program correctness will be determined by evaluating your program on a
series of test data sets. We will make available some but not all of
this data, along with sample output, prior to the assignment due
date. This will help you judge the quality of your program, but will
not guarantee correct results on all data. You will need to ensure
this on your own by creating additional test cases.
|