Autolab

Details on Autolab, which will be used for all homework submissions in CSE 331.

The main link

You can access Autolab via https://autograder.cse.buffalo.edu/ . We will be using Autolab for submission and (auto)grading of CSE 331 homeworks.

Signing up

Follow these steps to setup an account on Autolab (unless you already have one in which case you'll use your existing account):

  1. Go to this page and click on the Sign in with MyUB link . A new account will automatically be created for you.
  2. By default, AutoLab will use your official UB first and last name. If you have a different preferred name, please let us know ASAP.
  3. We will have leader boards for all the programming assignments. For anonymity, all students are identified by their chosen nicknames. So please make sure you pick an appropriate one (you can change your nickname at any point of time).
  4. After you have done the above steps, you wait.

What happens next

Here are the steps that we need to take at our end:

  1. We will upload a list of UB emails of students registered in the course (students cannot register themselves in a course). After that, you can just login into AutoLab using MyUB and you should see the CSE 331 course.
  2. If you successfully completed your syllabus quiz, you will be added to the Y section. Otherwise you will be added to the N section.
  3. Once you have successfully completed your syllabus quiz, you should be moved to the Y section: if this does not happen within two days of you completing the syllabus quiz, you should send us a reminder.
  4. We will only release the grades for section Y.

In the steady state

Here are the various things to keep in mind once you are successfully added to the course on Autolab:

  1. Once you log in to the system (after creating your account), you will see all the courses for which you have been registered. CSE 331 should appear with the description CSE331: Algorithms and Complexity (s20).
  2. Once you go to the course web page for CSE 331, you will see a list of pending homeworks. To begin with you should one box for Homework 0 and one link each for Question 1 part (a), another for Question 1 part(b) and another for Question 3. (You will need to click on each Question and submit your solution on the corresponding page.) As you move along in the semester, you will also see completed assignments/homeworks.
  3. For each homework, there will be five submissions/questions for each homework.
  4. The interface is reasonably intuitive but make sure you explore and make yourself comfortable with the interface- you will be spending quality time with it this semester!
  5. For the autograded question, to see the feedback you will need to click on any of your scores.

Autolab Walkthrough

An Old walkthrough video

The walkthrough video is from last year and has some comments (e.g. C++ submission only becoming available from HW 1 onwards) that would not be valid for you this year. However, the rest is still fine and it should be enough to get you started with submitting on Autolab.

Version of programming languages on Autolab

Java

openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)

Python

Python 3.6.5

C++

g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0

If you plan to use C++

Use Java or Python if you are just as comfortable

We recommend that you use Java or Python if you are as comfortable with any of those languages as C++. We are not passing any judgment on the merits or demerits of any of the languages here but our recommendation is based on the fact that the compilers/interpreters of Java and Python are standardized across various platforms. In particular, if your Java or Python code runs fine on your machine, then it should work fine on Autolab as well as long as the version on your machine is compatible with the versions used on Autolab (see above). Unfortunately, there is no such guarantee with C++.

If on the other hand, you have a strong preference for C++, then read on!

What is the issue with C++ compilers?

The main issue as alluded to above is that there is no notion of standardized C++ compiler across all platforms: i.e. two different C++ compiler can behave completely differently on the same code (e.g. in one case it won't compile and in other it would complie and it would run without any issues). The issue is compounded by the fact that even if one is using g++, which is what we recommend, you might not get what you want. E.g. if you run g++ on mac, it will actually run clang, which is a different compiler.

What this mean unfortunately is that we cannot really provide support for C++ across all compilers. You can use your own C++ compiler but then you have to deal with making sure your code runs fine on Autolab too.

Our recommendation

Use a VM with g++ installed for Ubuntu

We recommend that you install a VM that runs g++ on Ubuntu. In particular, we recommend that you use Jaric Zola's VM system that he created for his CSE 250 course . If you have questions on Jaric's setup, please do NOT contact him: email cse-331-staff@buffalo.edu instead.

If you still prefer using your own system, we would still recommend that you test your code in the VM system above before submitting to Autolab.

Some comments on the instructions in Jaric's setup

Below are some comments that are hopefully helpful:

If you plan to use Java

Use the terminal

We recommend you use the instructions for compiling and running your program in the terminal. If you would like to use an IDE, attached below are setup instructions for IntelliJ IDEA. In addition, there is some information about Eclipse in the FAQs.

Instructions for setting up your project for IntelliJ: (If you are on a mobile device you may have to scroll right, down, or both on the images)

  1. Select Add Configuration.

  2. Press the tiny + on the top left to add a new configuration. Select Application from the dropdown.

  3. Select the Project SDK in Project Structure, make sure it is version 12.

  4. Select the output path, ideally the same as your root source directory.

  5. In Modules, mark your working directory as a source.

  6. Select the ... in the choose main class field, and double click on the presumably auto-detected main Driver class.

  7. Don't forget to add the testcases/inputx.txt in the program arguments field.

  8. Happy coding!

Dealing with Errors

Description of Thresholds

Your solution times out if it crosses a certain threshold as noted in the Autolab feedback. The way it works is as follows: we run our code and multiply our time with the corresponding threshold factor for the input to get the final threshold. Thus your solution will be within the threshold if it is slower relative to the optimal solution by at most the corresponding factor. For example, a threshold factor of 40 for input 1 means your code can be atmost 40 times slower than our optimal solution. These threshold factors tend to be used for pretty much all the programming questions, though sometimes, we end up changing them depending on the problem etc.

Frequently Asked Questions

Java Specific