Don't know how to install and use SSH on Windows? Follow the instructions here.
A video tutorial can be found on YouTube. (Credits to our student Christopher Holley, thank you Chris!)
If you barely used Linux before, you can get a simple hands-on tutorial here.
You can also take a look at the command-line argument and script file parser if you don't know how to do it.
Prerequisite Material
How we grade your homework
1. We first copy your homework and the grading test cases to a folder name like "hw1-archive", then we grade your homework in the archive folder. The grading test cases are unknown for you.
2. We use g++ -std=c++11 *.cpp -o programe_name to compile your homework, where the programe_name is specified in the homework
3. We use diff -iEBwu 1.stdout 1.ans to determine whether you pass the test case 1 or not, where 1.stdout is your output, 1.ans is the standard output. The command will ignore the spaces and blank lines. Generally, you will get 10 points for each test case, 90 in total
4. If your code can compile, then you get 10 points, otherwise you will get 0 for the homework.
How to test your programe
We will provide a script grade.sh for you. ./grade.sh and you will see the success or failure of sample test cases.
How to submit your homework
1. Create a folder named exactly the same as hw1, hw2, hw3...
2. There should not be any folders inside the homework folder hw1, hw2, hw3...
3. It's mandatory to upload your .cpp and .h files to the homework folder.
4. You can create practice folders on Linux server with any name except for hw0~hw5.
How to check your grade There are two methods.
cd hw1-archive
cat GRADE
cat COMPILE.err #display the compile error if GRADE is 0, otherwise the file COMPILE.err will not exist.
cat 1.out # display your program output of test case 1
cat 1.ans # display the standard answer of test case 1
cat 1.diff # display the difference between the 1.stdout and 1.ans
Or you can use the following commands to check the grading (This way is easier)
cp -r hw1-archive hw1-check # you do not have write access to the archive folders, that's why you need to copy.
cd hw1-check
./grade.sh
Frequently used linux commands
ssh username@program.cs.uh.edu to login. The initial password contains 9 digits, PSID + Captital Initial Last name + Capital Initial First name. It's recommended to use passwd to modify the initial passwd. You must remember the password. If you forget the password, you have to go to PGH527 to ask the adminisrtator to reset it. Again, please remember your password.
scp -r file_or_folder username@program.cs.uh.edu:~/hw1/ to upload a file or a folder to hw1 folder on the server
cp 1.txt 2.txt to copy a file 1.txt to 2.txt
mv 1.txt folder to move a filename 1.txt to folder
cat 1.txt to display the content of 1.txt
ls to list all files and folders in the current directory
cd hw1 to change directory to folder hw1
cd .. to change directory to the parent folder
cd ~ to change directory to the home directory
nano main.cpp to edit the file main.cpp
chmod +rx grade.sh to make grade.sh readable and executable
programming rules
Do always follow the homework specification. Do not using some cheating skills. For example your bubble sort and selection sort are the same. Once detected, 0 for the homework.
Do not use int main() or void main(). Do use int main(int argc, char* argv[]).
Do not use hard coding. For example, file.open("1.txt");
Do not halt or wait user's interaction. For example, system("pause");
Do not submit your homework in the blackboard
Do test your program in the Linux server before you submit the homework
Do design and test testcases as many as possible. Your program may pass easy testcases but fail for hard testcases
Your code will probably reuse in the next homework.
Do not share and copy code. If you use some code in the internet or book, disclose it in your code, otherwise you are cheating! Once detected, F for the course grade, at least.
All the extras should under the root of your Linux server, each extra in a separated folder.
The folder's name of your extras should be extra_m_w_n. (m means the month when the extra was given, should between 8-11 for fall semester; 1-5 for spring semester. w means the week of the extra was given, should between 1-5. n means the number of the extra, if only one extra was given in that week, use 1, if two were given, use 1, 2, like extra_2_1_1 and extra_2_1_2. The order is important. n should between 1-5)
Grading policy
When homework turned in later than the due day but less than 2 days, the full grade will be 80%, later than that but less than 4 days, the full grade will be 50%, after that would be treated as give up, the grade would be 0.
If you want to regrade your homework after the first deadline, you may modify your code and upload them again to the same hw folder. Wait 2 days more until the date for late submission, all the homeworks will be regrade at each deadline. If you got 50 for the first grading, you got 80 for the second grading, your final grade would be 50 + (80-50)*80% = 74. if the last time you got 100, your grade would be 50 + (80-50)*80% + (100-80)*50%=84. The final grade only incremental.
How to regrade?
Update new version of your source files to the hw1 to hw5 folder (depends on the homework you are working), wait to the regrading time. The regrading time is the same time of the first grading. Like 10:00 pm will always 10:00 pm.
This demo shows how to read and write a file, and how to use stl.
denselmult.cpp: Load a dense matrix A from a file. Calculate C=A*A. Output C to a file
ArgumentManager.h is a command line parser. I strongly recommend all students use it in your homework
Homework summary
According to syllabus, there will be 5 homework and 1 final regrade in this spring session. Normally, the difficulty of homework is incremantal. But none of them are related.
When the due date was decided and posted to this website, you will have at least one week to do it. It's your obligation to refresh this website frequently to keep on track of the requirements of the homework. Based on the feedback of the students, the requirements may have minor change after the first release, you should always download the new requirements when you encounter some typos or errors in the requirements
Homework requirements and deadline
[hw1]: deadline: January 27th, 2020 at 10:00 AM. Created by TA Kunpeng
[hw2]: deadline: February 10th, 2020 at 10:00 AM. Created by TA Kunpeng
[hw3]: deadline: Marth 2nd, 2020 at 10:00 AM. Created By TA Kunpeng
[hw4]: deadline: March 17th, 2020 at 11:59 PM. Created By TA Kyle
[hw5]: deadline: April 13th, 2020 at 10:00 AM. Created By TA Kunpeng
[final resubmit]: deadline: April 30th, 2020 at 10:10AM.
FAQ:
1. Will we have only a regrade on one of the homework?
1. No, all 5 of your homework will be regraded, but only one grade will be updated to your BB, the one which helps you improve your grade most.
2. How does the final resubmission work?
2. You modify your solutions of your previous homework, upload the new solutions to the correspond folders, e.g., homework 1 still upload to the hw1 folder. The rest of the work will be ours.
3. How many regrading do we have for the final regrading?
3. Only once, it's final, you don't have any more regrading after this time.
[ga1]: deadline: February 5th, 2020 at 11:59 PM. Created by TA Salah.
[ga2]: deadline: February 19th, 2020 at 11:59 PM. Created by TA Salah.
[ga3]: deadline: March 6th, 2020. You must show your solution to any TAs for grading before deadline.
[ga4]: deadline: April 16th, 2020. Created by TA Salah.