Here you will find the Frequently Asked Questions (FAQ) about the technologies and assignments.


Technologies

What kind of computer can I use to code in?

What do I need to install?

Why VS Code? Can I use another IDE like Eclipse or IntelliJ?

Why use Git from the command line? Can I use GUI clients or IDE plug-ins/extensions instead?

How can I be sure that I have installed everything correctly?


Assignments

How can I be sure that my machine is properly set up for doing the assignments?

How to import an assignment into VS Code?

How to submit an assignment on Canvas?

How often should I commit and push the assignment to the Git repository?

Can I submit an assignment late?

Some of the provided JUnit tests are failing, can I still submit the assignment?

How will the assignment be marked?

Can I use Lambda expressions or Java Streams for the assignment?




Technologies


What kind of computer can I use to code in?

You can use any personal computer that runs one of the main operating systems: Linux (any distribution), Microsoft Windows, or Mac OS. You must have at least 1GB of free disk space and 512MB RAM.


What do I need to install?

You have to install the following, in this suggested order:

  • Git 2.x (any 2.x version is fine) (see installation instructions for MacOs and Windows).
  • Java JDK 17, which can be downloaded here (see installation instructions for MacOs or Windows).
  • VS Code IDE, which can be downloaded here (see installation instructions for MacOs or Windows).


How can I be sure that I have installed everything correctly?

You can do the following checks:

  1. Open your terminal and run the command git --version. If you see something like git version 2.35.1, then you have Git properly installed.

  2. You should make sure that the environmental variable JAVA_HOME is properly set. From the command line type:

    echo $JAVA_HOME for Unix/Mac OS or echo %JAVA_HOME% for Windows

    You should see a path containing the JDK 17.0.x. For example, in Mac OS systems: /Library/Java/JavaVirtualMachines/jdk-17.0.x.jdk/Contents/Home.

  3. Open your terminal and run the command java -version, and make sure your system is using JDK 17.0.x For example:

java version "17.0.x" 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.x+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.x+8-LTS-86, mixed mode, sharing)

If your Java environment is not properly set, please refer to the instructions on the resource page.


Why VS Code? Can I use another IDE like Eclipse or IntelliJ?

There are very good and popular IDEs for Java (e.g., IntelliJ). We suggest using VS Code because it will be the IDE that you will see instructors and TAs using in class and during the lab sessions. Also, if you encounter any problems with IntelliJ or Eclipse (or any other IDE), you might not receive support from us. Once you are familiar with course content and feel like exploring other IDEs, you are more than welcome to do so.


Why use Git from the command line? Can I use GUI clients or IDE plug-ins/extensions instead?

GUI clients and IDE extensions/plug-ins can sometimes make coding (a bit) faster, but in exchange, they might limit your understanding of the Git concepts and commands. For example, they might add files automatically to the repository or combine commit and push commands together. For novice Git users, it’s better to start with the command line to understand what the Git commands are doing. For this reason, we strongly encourage you to use Git via the command line! You are not alone! Many senior developers use Git via the command line for everyday Git tasks. Once you get the hang of it, you will never want to consider GUI clients as the command line will be more useful and you’ll find more help on places like Stack Overflow for the Git command line.




Assignments


How can I be sure that my machine is properly set up for doing the assignments?

Download the following file, and be sure not to change any of the included files:

Download sample assignment setup

Open the terminal and navigate inside the folder sample-assignment-for-testing-setup, then run:

./mvnw clean test for Unix/Mac OS or .\mvnw.cmd clean test for Windows

If you see the following, you are good to go!

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 s - in nz.ac.auckland.se281.MainTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.418 s
[INFO] Finished at: 2023-02-25T19:12:10+13:00
[INFO] ------------------------------------------------------------------------

If you see a BUILD FAILURE, this means that you did not install Java properly. See the related page in Resources.


How to import an assignment into VS Code?

  • Open VS Code
  • Click File > Open Folder
  • Navigate to the folder that contains the assignment. The folder to open (your “root folder”) should contain files such as pom.xml, mvnw, mvnw.cmd, etc.
  • Click Open

Alternatively, you can open VS Code from the command line by running the command code . from the root folder of the assignment. This tends to be faster, especially if your assignment is in a folder that is deep in your file system and you already have the file explorer open.


How to submit an assignment on Canvas?

Final Submission on GitHub

In this course, all your assignments will be automatically extracted from GitHub. There will be no separate submission on Canvas.

The following instructions are very important. Make sure you double check everything, otherwise your assignment will not be marked:

  • You must use the GitHub Classroom link provided in the assignment instructions to create your GitHub repository.
  • You must have frequent commits and pushes to GitHub. This will help you to track your progress and also to ensure that you have a backup of your work. It also makes it easier for us to see that you have not been copying from someone else.
  • It is not enough that you were doing git add and git commit commands! This only tracks the changes on your local machine!
  • Unfortunately, it is not a good look for us to hack into your machine in order to take your local repo (even for the good intentions of marking it). Therefore, it is absolutely important you have (correctly) executed a git push so that all your commits and changes are sent to the remote GitHub repository.
  • To make sure you submitted your code, simply go to https://github.com and check the “commits” tab of your assignment repository. Do you see the latest changes there? If so, you are good. If no, something went wrong and you need to sort it out so that it appears in the remote repository before the deadline.
  • As an extra (strongly recommended) precaution, you should clone your GitHub remote repo to your machine (e.g., to a temporary folder), and check it works correctly by compiling it and running it all over again (in a “fresh” directory). This is to protect you if you didn’t correctly include all the changed files (in which case, the assignment runs correctly on your local repo but you didn’t push everything to the remote repo).
  • If you want to submit late, review the Late Submissions section to understand how it works with your GitHub repository.

If you don’t want zero…

It is your responsibility to make sure all your changes are correctly visible on your remote GitHub repository. Read all the submission instructions carefully. It is not enough that you did commits and they appear in your local repository. Even if you pushed them to the remote repository later on (with timestamps before the deadline), it is not enough! The changes must appear in the remote repository before the deadline to be considered for marking. No exceptions.

You must double check that you have uploaded the correct code for marking! There will be no exceptions if you accidentally submitted the wrong files, regardless of whether you can prove you did not modify them since the deadline. No exceptions. Get into the habit of downloading them again, and double-checking all is there.



How often should I commit and push the assignment to the Git repository?

As you work on your assignment, you must make frequent Git commits. If you only commit your final code, it will look suspicious and you will be penalised. In the case of assignments, you should aim to commit your changes to GitHub maybe every time you pass a few test cases, or in general when you’ve progressed a bit and don’t want to lose your work! You can check your commits in your GitHub account to make sure the frequent commits are being recorded. Using GitHub to frequently commit your changes is mandatory in this course.


Can I submit an assignment late?

Late Submissions

We will clone your remote repository three times to determine if it was late or not.

If you intend to submit before the deadline (and not utilise the late penalty allowance), then make sure you do not push any new commits to your remote GitHub repository after the deadline. If we see that no changes have been made after the first time we cloned your assignment, it means you did not change anything (and therefore no penalties will be applied).

If you would like more time and submit late (with penalties), then simply keep working on your assignment and make sure you push the latest commits to the remote repository either 24 hours late or 48 hours late. We will notice the changes either when we clone your repo the second time (24 hours late) or third time (48 hours late) and find that changes were made. This means you will incur the 24-hour or 48-hour late penalty depending on when changes were detected in the remote repository. Any changes made to the remote repository more than 48 hours late will be ignored—even if they were timed before 48 hours late.

Remember: they need to be pushed and in the remote repository within the 48 hours, not only timestamped!.

Late submissions will incur the following penalties:

  • 15% penalty for zero to 24 hours late (changes detected since the first remote repository clone).
  • 30% penalty for 25 to 48 hours late (changes detected since the first or second remote repository clone).
  • 100% penalty for over 48 hours late (changes detected after the second remote repository clone).

Given the way this works, it means 1 hour late will incur the same penalty as 23 hours late, and 25 hours late will incur the same penalty as 48 hours late. It is up to you if you want to risk working on your assignment up until the deadline. If you don’t successfully push to the remote repository before the above deadlines, then it will be late. Don’t risk it.

We will stick by these clearly-specified rules. We have to be fair to everyone, and we will not be able to make exceptions to these rules due to mistakes or misunderstandings. If you are unsure about anything, please ask us in the Ed Discussion forum.



Some of the provided JUnit tests are failing, can I still submit the assignment?

Yes, it is fine (don’t worry). You can submit even if there is a BUILD FAILURE when running the test command. You will be given marks for the passing tests. However, make sure that your assignment compiles without error by observing BUILD SUCCESS when running ./mvnw clean compile for Unix/Mac OS or .\mvnw.cmd clean compile for Windows.


How will the assignment be marked?

The assignment will be marked automatically by running the provided test cases and additional ones not visible to students. The “hidden” tests will be shared when the marks are released.

We will also check for code style, and give you feedback on this.

We will also manually inspect the assignments flagged “suspicious by our automated tools” (for example, many unused classes, or flagged as being similar to another student’s submission).

Note that any tests that run for longer than 10 seconds will be terminated and will be recorded as failed. So make sure you don’t have any infinite loops or anything similar.


Can I use Lambda expressions for the assignment?

No, Lambda expressions are related to Functional Programming. Instead, SOFTENG 281 focuses on Object-Oriented Programming. We will deduct marks if you use Lambda expressions in the assignments. If you are not sure what a Lambda expression is, just be sure that you don’t write anything in the form of lambda operator -> body, where -> is the a special keyword of the Java language (since JDK 8). This also applies for Java streams.