Step 1. Prepare Your Code for Submission
- Create a
README.mdin the directory for each assignment.
- Suppress all debug messages (remove any
cerrstatements or other debug output).
- Ensure that all assignment files are in the correct directory with the proper names, as specified on the assignment page.
- Make sure your code compiles with no warnings and no errors, and throws no exceptions. Unless specified otherwise, we will compile your code with the parameters
g++ -g -Wall -std=c++11, so your code should compile with those setting.
- If there are any specific actions and/or commands necessary to compile or run your code, or to access any required documentation for your assignment, include instructions in your
- Your grader will grade the assignment in the course VM. Hence, your grader will use the same compiler as you will in the course VM.
Acceptable Document Formats
In many assignments, you will be required to submit documentation and/or textual answers. Your documentation should be in the base directory of the assignment.
The following document formats are accepted:
- Plain text
No other formats are accepted unless explicitly stated. These include, but are not limited to, Microsoft Word documents (e.g.
.docx) and Rich Text Format (RTF) files.
Step 2. Push your commits to GitHub
After you have verified that your assignment is ready to be submitted, push your source code and all relevant files. Do not push binary files or "garbage" files. (Use the
.gitignore file to make this as easy as possible on yourself.) Run
git status on your repository and make sure that there are no files listed as:
- Changes to be committed,
- Changes not staged for commit, or
- Untracked files
git status on your master branch must return:
# On branch master nothing to commit, working directory clean
Step 3. Verify your commit before the Deadline
Before the deadline and after pushing your submission to GitHub, you must ( MUST ) clone your code in a separate directory, i.e., a new location. For example:
cd git clone email@example.com:usc-csci104-fall2017/hw-ttrojan.git test_assignment cd test_assignment
Then, compile, run and test your code using the instructions you wrote in your
README.md file to ensure that it works as expected. We cannot emphasize enough how many bugs you will discover (and how many points you can avoid losing) by doing this simple 5-minute step.
Our reference grading environment is the Virtual Machine we provide for the course. You should test your code on the VM to ensure that it works properly in the environment we will test it in.
Step 4. Fill out the Homework Submission Form
The submission form is available at the end of each homework. The link will be different for each assignment, so make sure you are using the proper link. To complete the form, you will need to get the (long) SHA from your commit. You can get the SHA from your repository's commit page as shown in the following screenshot:
Make sure to use the long SHA (about 20+ digits/letters), not the short one (less than 10 digits)! If you use the short SHA, the submission script may work, but the actual scraping script in the background likely will not. This will make it appear as though you hadn't submitted the assignment, which would be pretty bad.
When you submit your assignments, our script will perform a few quick checks to make sure your submission is valid. For instance, it will alert you to (some) missing files, and might also catch some compilation errors. (Of course, it cannot read your
README.txt, so if compilation requires special instructions, it will not follow those.) You can resubmit as often as you want -- we will grade the submission with the most recently submitted SHA.
You can make a late submission even if you previously submitted on time. The late submission will then replace the on-time submission. After completing your (late) assignment, follow steps 1-4 from above. When you get to step 4, before you can successfully submit your homework, you will be prompted to confirm your late submission. Doing so will use a late day (unless you have already made other arrangements with your professor). Remember that you can only use one late day per assignment. If you have no late days remaining, then you will get a 0 for the assignment. Emails to Professors, TAs or CPs are not considered as a notice for late submissions.
Q1. How do I check out a specific commit?
If you want to check out a specific version of your code, such as the commit used in grading your assignment, you first need to locate the SHA of that commit. As an example, to check out commit
d8da410b19cf0a9f5a3003120204a114b8496942 from ttrojan's repository, you would use:
cd git clone firstname.lastname@example.org:usc-csci104-fall2017/hw-ttrojan.git test_assignment cd test_assignment git checkout d8da410b19cf0a9f5a3003120204a114b8496942
This creates a new directory with the specific version of your code. While there are ways to make edits to this version and then merge those edits suitably, we recommend a more pedestrian version (unless you are a git expert, in which case feel free to do what you want - just don't expect us to be able to fix things if you really screw them up). We recommend that you carefully go through your edits and your old version, and copy whatever you wanted to recover from the old version into the version that is in the most recent state. Once you've produced the new version you want, commit it, and simply delete the
test_assignment directory you created.