CS2030S Lab Guide
GitHub Classroom
We will use GitHub Classroom for our lab release and submission for CS2030S.
Here are what you need to do for every lab assignment:
1. Accept the Lab Assignment
Make sure that you have logged into GitHub.
If you have multiple GitHub accounts, make sure you use the one with the same GitHub username you have submitted to us.
Click on the given URL to accept the lab.
A repo will be created automatically for you.
WARNING
Do not interact with the lab repo directory using GitHub or other git
commands.
2. Get a Copy on PE Hosts
For your first-ever lab, you will need to create a configuration file (see the "One-Time Setup" section below). After that, proceed as per normal below.
Run the command ~cs2030s/get-labXX
(where X is the lab number) to clone a copy of the lab on your home directory. You will see a new lab directory named something like labX-username
created, with the skeleton files and questions inside.
You can edit the code, compile, test, etc, on the PE hosts.
WARNING
Do not edit your code directly on GitHub.
3. Submit a Copy
When you are ready to submit, run ~cs2030s/submit-labX
(where X is the lab number). This will submit a copy to GitHub. You can submit multiple times, but only the last copy will be graded.
WARNING
Do not use git push
or other git
commands to submit your code to GitHub.
4. Receiving Feedback
The tutors will grade and comment on your submission on Github after the deadline. You can reply to their comment, etc, on GitHub as well. Communicate with your grader via Piazza (or directly if they preferred) if you think the grading is unfair.r
WARNING
Do not change your code on GitHub after the deadline (by either re-running submit-labX
or using git
commands directly). If you wish to improve upon your code after feedback from the tutors, replicate it in your own personal repo.
5. Receiving Final Grades
A file named feedback.md
summarizing your marks will be placed into your GitHub repo. Your marks will be posted on Luminus Gradebook.
One-Time Setup
The first time you use PE hosts to accept your lab, you need to do a one-time setup of your account on PE. You need to create a file called .gitconfig
in your home directory with the following content:
1 2 3 4 5 |
|
Your email should be whatever you used to sign up Github.
For example, a sample .gitconfig
looks like this:
1 2 3 4 5 |
|
After saving this file, run:
1 |
|
It should return your GitHub username.
It should print your GitHub username as already set. If there is a typo, you need to edit .gitconfig
again and reload it by repeating the command above.
Warning
If it is not clear to you by now, let us repeat: You should only interact with your lab submissions on GitHub using the provided scripts get-labX
and submit-labX
. Failure to do so will break our workflow and will not be appreciated.
If you accidentally break your repo by running git
commands on it or edit it directly on GitHub, you should save a copy of your code elsewhere, then reset your lab directory, by (i) deleting requesting your tutor to delete the repo on GitHub, (ii) deleting the corrupted lab directory on PE nodes, (iii) go through Steps 1 and 2 again, then copy back your edited code into the lab directory.
Grace Period
You have until Lab 2 to get familiarize with the procedure above. From Lab 3 onwards, we will not entertain requests or appeals for students who failed to follow the procedure (e.g., forgot to run the submit
command, submitted the wrong lab, wrong password).
Authenticating to GitHub with SSH
By default, GitHub uses password for authentication. So, upon running get-labX
or submit-labX
, you will be prompted for your GitHub password. An alternative is to use SSH to connect to GitHub. You can refer to this GitHub help page for setup instructions.
If your GitHub account has 2FA enabled, SSH is the recommended method for authenticating yourself to GitHub.
Lab Timeline
The lab assignment is released before every Thursday at 8 am, with a deadline (usually one week five days after released) given. You must submit each lab assignment before the deadline.
General Advice
You are advised to (i) spend some time thinking before you begin coding, (ii) practice incremental coding, and (iii) test your programs thoroughly.
Remember to spend some time thinking about the design and approach to solving each question.
Incremental coding means do NOT type in the whole long program in a single session and then compile it. Instead, type your program in bits and pieces and compile it incrementally. Try to maintain a compilable program even while you are working on it. Submitting a compilable program that partially works is better than submitting an un-compilable one; this is especially important for your practical exams.
You should test your program thoroughly with your test data before submission.
Please note that:
-
You may assume that all input data are correct unless otherwise stated. Hence you do NOT need to do input data validation. This is to allow you to focus on getting the program right, instead of worrying about making your program fool-proof.
-
Copying others' programs or relying on others to help you with these assignments will only offer a short-term reprieve. When Practical Exam (PE) time comes, your inadequacy will be exposed and the consequence would be dire.
Late Submission
All lab assignments must be submitted on time. If you need an extension, please ask for one and provide a justification for approval. Only academic reasons and compassionate reasons can be considered (e.g., representing NUS for a sports event is OK; Attending a wedding is not.)
For late submission, there is a 1% penalty (of the total awarded marks for that particular assignment) for every 5-minute after the deadline, capped at 80%. For example, if an assignment is awarded 40 marks, and it is submitted 100 minutes after the deadline, the student will get 32 marks instead (20% penalty). If it is submitted 10 hours after the deadline, the student will get 8 marks (as it has hit the cap of 80% penalty).
Identifying Yourself
In every Java file that you submit, you need to identify yourself by writing your name and lab group. Marks will be deducted if you fail to do so. You need to edit the line:
1 |
|
and change it to something like:
1 |
|
Method of Submission
Please follow the instructions above to submit your homework. Programs submitted through other means, such as emails, will NOT be accepted.
Use of Piazza
If you have doubts about the problem statements of an assignment, you may raise them on Piazza. But before that, please read through the problem statements carefully first, and check if the same questions have been asked and answered on the forum.
Please exercise discretion when posting to Piazza. Before the deadline, you are NOT to post the solution to the assignment, complete or partial, on Piazza (or any publicly accessible online site).
Disallowed Syntax
Some lab assignments may explicitly disallow the use of certain syntax. If the objective of the assignment is undermined due to the use of forbidden syntax, the penalty will be heavy. If in doubt, please ask for clarification on Piazza.
Plagiarism
You are NOT to copy from others or allow others to copy your programs. We take plagiarism seriously. See the module policy posted on Luminus for details. We also want to highlight that NUS is applying a heavier than usual penalty this semester -- you get an F straightaway for the module, instead of the usual 0 for the plagiarized lab.
This means that you should also guard your solution carefully, not posting them to publicly accessible places, or change the permissions of the files on the PE hosts so that it is accessible by others.