Part 1: Setting up a Jammy Jellyfish Environment

For this class we are developing our code in a Ubuntu 22.04 Jammy Jellyfish environment. This is the environment that our autograder uses and you are required to use. There are many ways to install such an environment on your computer, but we just want to make clear that no matter what you use, it should be a Jammy Jellyfish environment.

Caution: do not develop on macOS directly or other UNIX environments directly (e.g. other versions of Linux). There can be significant differences in how your C code is compiled and the behaviour of the systems. In the past students have thought they got a working solution only to realize after submitting that their code doesn’t compile in the grading environment. If you still use one of these environments, we urge you to at least compile and test in the course supported environments frequently to ensure your program is behaving as expected.

1a: Choosing a “host”

How exactly you get an ubuntu environment will vary depend on which operating system your computer is. We provide two solutions that will work for almost everyone. However there is some disatisfaction towards using these as people find them to at times be some combination of:

  • Inconvenient/slow everytime you want to “login” to do work
  • Heavy on your computer’s resources, thus slowing down other things running on your computer more than desired.

These two solutions are known to work and the course staff is most expereinced with supporting these (with an exception being WSL, some of our course staff knows this tool well). We provide the other hosts as an option to you would like, but we make no garuntee as to how well they work. Though if you learn something new about them, let us know and we can update this page!

Docker

Docker is the primary development enviroments that will work no matter what operating system you are using.

If you want to use docker, follow the setup instructions here: Docker Setup Instructions

Speclab

Speclab is another development environemnt that will work regardless of your operating system. However, we recommned you only use it if you can’t get docker working.

Instructions for using speclab can be found here: https://cets.engineering.upenn.edu/answers/speclab.html. Note that you do not need to install Docker on speclab, speclab is already a linux session that you can develop in.

WSL (Windows)

WSL stands for Windows Subsystem for Linux. It is something built into windows that allows you to have a “native” linux environment. You can use WSL to setup an environment for this course if you like!

This is actually the environment that Travis’ uses for almost everything.

WSL Setup Instructions

Orbstack (MacOS)

Orbstack is an alternative way to run docker containers on mac. People who have tried it often find it to be faster and easier to use. Note that even if we are using orbstack, it still uses docker engine. You can sort of think of orbstack as being a nicer “front end” compared to docker desktop, but both are still front ends to the docker engine.

Orbstack Setup Instructions

Others (MacOS)

There are other MacOS tools that can be used that are quite popular Colima and Podman. Travis (who is writing this right now) doesn’t have a Mac and so can’t test these, but have seen others use them. Feel free to use these, just make sure it is an Ubuntu Jammy Jellyfish container.

Everything Else (Windows/Macos/Linunx)

If you want to use something else, then you are on your own for this! If you already have a linux setup, then we somewhat trust you can figure it out yourselves.

If you want to have whatever setup you use be as close to the autograder and the rest of the class, then you should use an Ubuntu 22.04 Jammy Jellyfish container.

You will need to install various tools like clang-19, clang-format-19, clang-tidy-19 and others. This is part of what we use to configure our docker containers: env-setup.sh. You should try and have all of those packages installed on your machine.

Part 2: GitHub Repository Setup

Before completing the steps below, you will need your course-assigned GitHub repository. Though if the github repo creation is not setup yet, you can skip this part and come back to it later. Look here for more info: git_creation.

The naming convention of the repository is <YY><Semester>-cis5480-<Account>. The <Semester> could be sp, su, and fa, which stands for the spring, summer, and fall semesters respectively. For instance, in Summer 2022, a student with a GitHub account as xyz will be assigned to a repository named 22su-cis5480-xyz.

If you know how to clone a GitHub Repository already, you can skip this entire part.

Please Note: If you have previously been enrolled in this class, you can use the same GitHub ID that you have already created to submit to the autograder, then you will have a new repository for this semester. Please use the new repository to organize your code.

All following commands are executed inside your environemnt, whether that is Docker Desktop or something else.

Step 1. Create an SSH key for GitHub

Follow the instruction Generating a new SSH key and adding it to the ssh-agent - GitHub Docs to create an SSH key for your GitHub account.

Make sure to select Linux tab, as your Ubuntu environment is linux..

You should skip Generating a new SSH key for a hardware security key section in the docs.

Step 2. Add the SSH key to your GitHub account

Follow the instruction Adding a new SSH key to your GitHub account - GitHub Docs to add the SSH key to your GitHub account.

Make sure to select Linux - Web browser tabs, as you are using Linux when you are in your development environment, and web browser configuration is more intuitive.

You can skip Prerequisites section as you should have already done it during Step 1.

Step 3. Pull repository from GitHub

Open your Project 0 repository in GitHub and click the green Code button. Select the SSH tab and copy the provided link. You will be able to use this link to clone your repository.

Clone Repo

In the terminal running in your ubuntu environment, make sure you are in your home directory. You can make sure this is true by runnig the cd ~ command.

Then run the git clone command, with the link copied from GitHub:

git clone <copied url>

For example, if cloning the GitHub repo in the above screenshot, the command would be:

git clone git@github.com:facebook/react.git

After cloning, use ls to see the newly created directory, which should contain the same files as on GitHub.

Part 3: Choose a text editor

You are welcome to use any text editor or Integrated Development Environment (IDE) for projects in this course. Here, we provide two recommended ways to edit your files.

Prelude

To test that you have setup the container correctly and see how the text editors interact with them, you need to complete the steps above to clone your repository for project 0. It contains some files you can use to check that you set things up correctly.

Vim

This the lightweight terminal only editor that Travis uses. Some people prefer a more “typical” editor, but there is a reason vim has been around for so long.

vim instructions

Visual Studio Code

Visual Studio Code is a more typical progrqamming editor that is one of the most used editors in the world. Most students choose to use this editor.

Note that there are two different sets of instructions, one for if you are using docker or orbstack and one for if you are using WSL:


Table of contents