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

When I clone my assignment, can I put the folder anywhere on my computer?

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 21, 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 21.0.x. For example, in Mac OS systems: /Library/Java/JavaVirtualMachines/jdk-21.0.x.jdk/Contents/Home.

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

java version "21.0.x" 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 21.0.x+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 21.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




When I clone my assignment, can I put the folder anywhere on my computer?

Yes, you can clone the GitHub repository anywhere on your computer. However, it is recommended to keep all your assignments in a single folder. This will make it easier to find your assignments later on related to the course.

With that said, make sure you take the following precautions:

  • As you will likely be using the command line to run Maven commands, and your IDE will also likely run other tools, it is recommended to keep the assignment folder in a location where:
    • There are no spaces in the path (for example, avoid putting the assignment folder in a folder called My Documents or My SOFTENG 281 Assignments). In place of spaces, you can use underscores or hyphens (for example, My-SOFTENG-281-Assignments). You should therefore avoid putting your assignments in a path with spaces along the way, and where you cannot control the path (for example, avoid putting the assignment anywhere under My Documents).
    • There are no special characters in the path (avoid using characters like &, #, @, ', ;, :, etc.).
  • Do not put the assignment folder inside another Git repository. This may cause problems with the version control system.




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?

In this course, all of the main programming assignments will be automatically extracted from GitHub. There will be no separate submission on Canvas. You’ll find all the necessary instructions in the respective assignment handout.




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?

Not all assignments can be submitted late. The ones that can be submitted late will have a specific section in the assignment instructions that explains the late submission policy.

If you submit an assignment late (and late submissions are accepted for that assignment), you will incur a penalty.

Please plan ahead to submit your assignments on time, as we will be penalising even 1 minute late. While this may seem harsh, it is necessary to ensure fairness to all students. If we let you off by 1 minute, then we have to let everyone off by 1 minute, and then it becomes 2 minutes, and so on. This becomes a slippery slope—we have to draw the line somewhere and be fair to everyone.




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.