---
# System prepended metadata

title: 'CS0020 Lab 0 2023, Getting Started'

---

# CS2 Lab 0 2024, Getting Started 🎰

[<<< Back to main site](https://cs.brown.edu/courses/csci0020/)
<img src="https://hackmd.io/_uploads/H1NagEAT3.png" width=200>

> **Due Date: TBD**
> Complete this lab before Lab 1. 

> **Need help?** Remember to check out Edstem and our Website for TA help assistance.


## Background 🎰

> Be sure to read all background notes, as they are vital to do the assignment.

Welcome to CS2! We're so glad you've decided to join us on this journey through the Digital World.

Computer Scientists and Programmers alike manage **many** files on their computers, and it's important to have proper organization! Let's review the basic structures of a computer:

- a **file** is the smallest component. It is a container in a computer system for storing information. It can be a file of text, of code, or even images. All files have a tag at the end of their name, such as *.png*, *.txt*, *.doc*, etc.
- a **folder** is like the bucket that holds groups of files. These can contain files and even other folders. Unlike files, they do not have a tag at the end. 

:::warning    
**Important Note:** In CS2 we will refer to a folder as a "**directory**". Directories are the more common nomenclature that computer scientists use. 
:::

Directories and files are often written out in text, like so:

```
~/mycomputer/desktop/cs2/gettingstarted.txt
```

Think about what this might represent... Let's break it down. Every `/` character (`\` on windows) represents a sub-directory (a folder!). So, we are looking at a text file called "gettingstarted" in the `cs2` directory. The `cs2` directory is in the `desktop` directory, which is on our computer drive!

> This written out representation of a file's place on a computer is called a **file path.**

The last thing to know for this class when it comes to directories is **absolute file path** vs **relative file paths**.

Say we are editing a file called `javascript.txt` in a folder `cs2` that contains one other file, called `my_image.png`.

![](https://hackmd.io/_uploads/H1fiuBunh.png)

In programming, files like to talk to each other. In this example, `javascript.txt` wants to know about `my_image.png`. We can tell `javascript.txt` about `my_image` two different ways.

In the `javascript.txt` file, we can put:

```
~/donstanford/desktop/cs2/my_image.png
```

or

```
/my_image.png
```

The first example is called an **absolute file path**, and it's the exact representation of a file from the `root` of my computer. 

The second example is called a **relative file path**. 

:::warning
**Important Note**: In CS2 we **ONLY** use **relative file paths**.
:::

There are two reasons why: 
1. All projects in CS2 must be anonymous. If we see your name in a file path, that anonymity is gone, and we have to dock points!
2. Absolute file paths won't work on the TA computers- think about it, will our computer be able to find a file under a folder that only exists on your computer? (like, your name!). 

You're ready for the next part of the lab! Great job :)

<hr />

## Project/Lab Description 🎰
It's time to set up your **CS2 directory**! Throughout this course, you'll put everything into this directory, and keep a tidy organization. 🧽

This lab will handle most of the set up you will need for the rest of the course! 
<hr />

## Tasks 🍦

:::info
**Task 0**: Before proceeding, please be sure to fill out our [`Course Collaboration Policy`](https://forms.gle/BndKX4MQz1XrvaUi9)!
:::

To get started, you will need a **text editor** to write your code throughout the semester. A text editor lets you easily edit and create files in different programming languages.


:::info
**Task 1** Download the text editor [`Visual Studio Code`](https://code.visualstudio.com/). Follow all the instructions on the website to download the editor for your specific machine.
> Be sure to download "Visual Studio Code" **not** "Visual Studio"!
:::

Now we need to set up your file system for the course. Use the instructions for your particular machine.

:::info
**Task 2** Create the basic file structure on your computer, with a folder called `CS2` on your desktop, and a folder inside it named `Excel`.
:::
:::spoiler Mac Instructions
  1. Right click your desktop. Click "New Folder" from the dropdown. This should create the folder, and outline the name for editing.
  2. Name the folder "CS2", click `enter` on your keyboard.
  3. Double-click the newly created folder to open it.
  4. Inside this new folder, right click anywhere and click "New Folder" from the dropdown.
  5. Name this new sub-folder "Excel"
:::
:::spoiler Windows Instructions
 1. Minimize your windows so you can see your desktop.
 2. Right click your desktop and click "New" -> "Folder"
 3. Rename this newly recreated folder "CS2" (it should already be highlighted to edit, if not right click the folder). Click `enter` on the keyboard.
 4. Double click the newly created folder to open it. 
 5. Inside this new folder, right click anywhere and click "New" -> "Folder" from the dropdown.
 6. Name this new sub-folder "Excel".
:::
<hr />

## Hand-In 🎰

:::success
**To Hand-In Lab 0**:
Come to hours and show your TA three things for checkoff:
1. Email verifying your completed the collaboration policy
2. The downloaded Visual Studio Code.
3. Your CS2 File System.

Congrats! You just finished your first CS2 lab! :icecream:
:::

:::warning
If you have any issues with completing this assignment, please reach out to the course HTAs: cs0020headtas@lists.brown.edu

If you need to request an extension, contact Professor Stanford directly: don.stanford@gmail.com

:::

<hr />
