The following is information, tutorials, and help links for tools that we will use in for remote course activites and course work. More course-specific information is available off the CS 63 webpage, and from individual assignment pages.

We will be using a variety of remote tools for class. We will still use the CS lab machines to host content and provide various tools specific to the course. Many of these tools can be replicated on your local machine, but providing tech support for the wide varieties of operating systems and hardware configurations is beyond the scope of this course. It is my hope and goal that a few primary tools can be downloaded to your local machine that can create an environment for successfully completing this course and collaborating with others.

Remote Lecture, Lab, and Office hours

We will primarily using Slack and Zoom for classes, labs, and office hours.

slack

Joining Slack

You will receive an invitation to join the class slack page prior to the start of the semester.

Navigating Slack

Slack breaks up workspace into channels, which are listed in the sidebar on the left. Some channels we will use in this course are:

  • '#general' for general announcements about the class, you can select pinned announcements to find links to the course zoom page

  • '#office-hours' for class office hours. You can send a quick message to the professor here and start a zoom session to which s/he will attach.

  • '#lab-X' we will often move to slack after starting each lab session on the course zoom page. Here you can get individual help on your lab work, and we will check in with each lab group. You can type in short questions, but typically we will have you start a /zoom session to which we will attach.

To start a zoom session in slack:

First choose the slack channel for the type of session (lab or office hours), then you can start a zoom session to which the professor/lab instructor/TA/ninja will attach and help you with your specific question(s) or just check in with you. To start a zoom session just type '/zoom'. If you are working on a partnered lab one of you and your partner can start, and the other can join.

In zoom you can share your screen to display and run your code, or display your homework to your instructor.

Accessibility

The course staff is committed to making all course material accessible to you. To access Slack’s accessibility settings, start by clicking on the workspace name at the top of the navigation pane on a laptop or desktop.

Then from the dropdown menu choose “Preferences”, then select “Accessibility” from the navigation bar on the left.

Options include:

  • Content magnification (“Zoom”). Allows you to enlarge content shown in Slack

  • Animation. Please uncheck this box if you are sensitive to animated images.

  • Keyboard. Options for non-mouse navigation.

To direct message someone:

By default, messages posted on Slack are visible to all members of the workspace. But for smaller conversations, you can use Slack’s direct messaging (DM) feature to start a private conversation with one person or a small group.

Code of Conduct

The course Slack workspace is accessed by a wide variety of people all working in different environments and timezones. We ask that you be respectful of the staff as well as your fellow students. We expect you to follow these general rules:

  • Do not use Slack to harass faculty, staff, or other students.

  • Do not spam any channels or direct messages with garbage. Try to make posts in academic channels concise.

  • Follow channel guidelines. E.g. do not post idle conversations in the #lab-X channel.

  • Respect others’ time. When you are in lab, or in office hours, try to respond promptly to messages directed to you.

  • Note that any messages you post in a channel will be visible to everyone in that channel. Think before you post!

If there is a problem where someone is violating the code of conduct or otherwise failing to respect others, please raise the issue to one of the class professors or instructors.

Slack Links

Here is some documentation on using slack

Here is some documentation on using zoom in slack (scroll past the how to install zoom to "Use Zoom in Slack" part)


zoom

You will receive an email with information about how to find our class zoom link before the start of class.

There are instructions for using zoom off the college’s Working Remotely page.

Try it out:

Set-up and try out a zoom meeting with your lab partner or project group members

  1. one of you should create a zoom meeting for your lab work:

    • Name the meeting something like labXmeeting where X is the number of your lab assignment

    • Make it a Recurring meeting with the Recurrence→No Fixed Time option.

    • Enable join before host in the Meeting options

    • Save and send your lab partner the zoom link (Join URL associated with your meeting or copy the invitation link)

  2. contact each other to find a time for a 10 minute practice zoom meeting.

  3. at the time you arranged to meet, join your zoom meeting (because "join before host" is selected any of you can start the meeting).


Tools for lab work

GitHub

As in most CS courses, we will use github for lab assignments. Here are links to git hub for CS 63:

git

Git and the college’s Enterprise GitHub are used for lab work.

  • using git for CS labs contains some basic (and verbose) git instructions for using git for CS course lab work. It is written using cs31 as an example, but replace with your own course number.

  • git on our system and git help. This is a more complete reference for using git on our system.


Unix Basics

For course work you should set up a course-specific subdirectory in your home directory. First read the resource about ssh about remotely connction to the CS system, then create ssh into our system and create a subdirectory for cs63:

# from home ssh into a cs lab machine:
ssh <yourusername>@labs.cs.swarthmore.edu

# on the CS system:
$  cd                 # change current working directory to your home directory
$  pwd                # print current working directory
$  mkdir cs63         # create a new subdirectory named cs63
$  ls                 # list contents of current working directory (your home directory)
$  cd cs63            # change current working directory to cs63
$  pwd                # print current working directory

Using Unix and Useful Commands and Resources:


vim (and vi)

The vi (and vim) editor is available on every Unix system. It is a very efficient and lightweight text editor that is easy to use after learning a few basic commands, which that you can learn by running though the vimtutor tutorial.

vim is particularly useful when working remotely, ssh’ed into a machine.

Vi (vim) also has a lot of advanced features that are very nice, and is very configurable, often through the use of a .vimrc file. However, just a few basic commands is enough to use vim to edit files on our system.

Learning vim (and vi)

Vim operates in two modes:

  1. insert mode: keystrokes are interpreted as inserts into the file contents at the point of the cursor.

  2. command or escape mode: keystrokes are insterpreted as vim commands, which allow a user to do such things as saving, exiting, searching, or moving around in the file.

In insert mode to switch to command mode by hit the ESC key. In comand mode there are many ways to switch to insert mode, one is to hit the i key.

To learn the vim editor, run vimtutor:

  1. ssh into our system and run vimtutor ( more info on remote access, and more info on ssh):

    home$  ssh yourusername@lab.cs.swarthmore.edu
    
    cs$  cd cs63
    cs$  pwd
    cs$  vimtutor           # start the vim tutorial
  2. Go through the sections listed below of vimtutor (the other sections cover more obscure features that are not necessary). It will take about 30 minutes to run through these lessons.

    • all of Lesson 1 (moving around, x, i, A, :wq)

    • Lesson 2.6 (dd)

    • Lesson 2.7 (undo)

    • Lesson 3.1 (p) and 3.2 (r)

    • Lesson 4.1 (G) and 4.2 (searching)

    • Lesson 6.2 (a), 6.3 ( R ), and 6.4 (y and p)

Configuring vim

You do not need to configure vim in any way to use it on our system. However, you may want to based on foreground and background terminal colors, and set some other options

In your home directory you can add a configuration file for vim, named .vimrc. On start-up, vim examines this file to set different configuration options for the vim session, including setting a color scheme, and default window size.

To see if you have one already, run ls -a in your home directory to list all your dot files:

cd
ls -a

If so, you can open it in vim and edit it like any other file:

vim .vimrc

If not, it is often easiest to start with someone else’s .vimrc file and then edit what you want. From your home directory, you can copy someone else’s. Here is one you can copy over into your home directory that uses a color scheme that shows up well on dark background windows:

cd
cp ~newhall/.vimrc .

At the bottom of this .vimrc file are some settings to give you a visual cue about not line wrapping source code in files. One sets the widowsize to 80 (or 81) chars when you start vim, others can be used to set visual reminders when a line exceeds 80 chars:

tail -20 .vimrc   # dump the last 20 lines of the file .vimrc
                  # note lines that start with double quote are comments

set colorcolumn=80
highlight ColorColumn ctermbg=darkblue
" resize to 81 to more easily see colorcolumn (set to 80 if don't use colorcolumn)
set columns=81
autocmd VimResized * if (&columns > 81) | set columns=81 | endif
set wrap
set linebreak
" visually shows +++ when go past columns limit
set showbreak=+++

You can copy this into your .vimrc file if you’d like this functionality

Vim Resources and Links


LaTeX


LaTeX is the standard tool for scientific writing and typesetting. Here is a sample LaTex file. LaTeX is a markup language, which means that you provide text along with commands to typeset or markup that text. You then need to compile a LaTeX document.

Compiling LaTeX

The easiest and most direct way to compile is via pdflatex. Here’s an example:

pdflatex LearningLaTeX.tex

This will either produce a pdf document you can read with a standard pdf reader such as Acroread, or will print out error(s) encountered during the LaTeX compilation process.

Working with LaTeX remotely.

If you are working with LaTeX remotely, you might not have LaTeX installed on your local machine. In this case, you have a couple of options:

  • Edit/Compile your LaTeX file on lab machines. To this, you’ll need to ssh into a lab machine, and edit/compile your LaTeX file from there. Then, you can use scp to copy your compiled pdf to a local machine to read it.

  • Use an online LaTeX editor such as Overleaf. In past years, several students have used overleaf to write their LaTeX. It is convenient for writing partered assignments. Warning: Overleaf tends to ignore compilation errors and give you the best pdf it can render. Before submitting a LaTeX file, make sure you can compile it using pdflatex and it looks the way you’d like.

  • Install pdflatex on your home machine.

The basic structure of a LaTeX file

It is likely that you will modify an existing LaTeX template file (e.g. this template) rather than starting from scratch. However, if you do start from scratch, the following snippet of LaTeX illustrates the minimal code needed to get started.

\documentclass{article}
\usepackage{amsmath} % Math notation from the American Mathematical Society.
\usepackage{amssymb} % Typographical symbols from the same.
\begin{document}
  Hello!
\end{document}

Brief explanations of each line lie below:

  • The line \documentclass{article} tells LaTeX you want to write an "article" document. LaTeX documents start with this line.

  • The next few lines add LaTeX packages, which are similar in spirit to #include lines in C++ or import in Python.

  • \begin{document} and \end{document} specify where the content of your document starts and stops.

Formatting

LaTeX has several formatting commands that make your file look nicer. A few are listed below:

  • \textit{this is italicized.} renders 'this text' in italic. Here is what gets produced \(\textit{this is italicized.}\)

  • \textbf{this is boldface.} gets rendered as \(\textbf{this is boldface.}\)

LaTeX has environments for bullet lists and numbered lists.

  • The itemize environment gives unordered bullet-lists.

Here is an unordered list.
\begin{itemize}
  \item Your first item is here.
  \item This is your second item.
  \item This is the third item.
\end{itemize}

Here is the compiled LaTeX.

Here is an ordered list.
\begin{enumerate}
  \item Item One.
  \item Item Two.
  \item Item Three.
\end{enumerate}

Here is the compiled LaTeX.

Math

One of the real strengths of LaTeX is its ability to easily typeset mathematical notation. To render mathematics in LaTeX, enclose the math in dollar signs e.g.

The quadratic equation is $ax^2 + bx + c = 0.$

Which gets rendered as: \(\text{The quadratic equation is }ax^2 + bx +c.\)

Sometimes, it’s nicer to put the math on its own line, cenetered in the page. Do this using double dollar signs:

The quadratic equation lies below: $$ax^2 + bx + c=0\ .$$

Here is the compiled LaTeX.

The align* Environment

If your LaTeX math runs across multiple lines of text, LaTeX provides an elegant way of typesetting this nicely called the align\* environment. Here is some sample LaTeX code:

\begin{align*}
  (n+1)(n-1) &= n^2 + n - n -1 \\
  &= n^2-1
\end{align*}

which gets rendered as:

\(\begin{align*} (n+1)(n-1) &= n^2 + n - n -1 \\ &= n^2-1\end{align*}\)

Make sure to put a double backslash '\\' to denote the end of each line of your math equations. (no double-backslash is needed after the last line). The ampersand '&' is a control character that specifies vertical alignment. When this LaTeX is compiled, it will line up each line where the ampersands are. In this example, the equal sign in the second line of math will line up immediately below the equal sign in the first line.

Subscripts and Superscripts

In math mode, it is common to use subscripts and superscripts. You can do this in LaTeX using '_' and '^'. For example:

$a_0 = x^2 + 4$

gets rendered as \(a_0 = x^2 + 4\)

Summations

If you want to write summations, use the \sum command. For example,

$\sum_{i=1}^n i = \frac{n(n+1)}{2}.$

is rendered as \(\sum_{i=1}^n i = \frac{n(n+1)}{2}.\)

Including Images

To include an image, use the graphicsx package and the \includegraphics command.

...
\usepackage{graphicsx}
...
\includegraphics{bunny.jpg}
...

Remote Access and Code Envirnoment Tools:

ssh and scp

ssh is useful for remotely logging into the CS lab machines. scp is useful for copying files between your local system and the CS system.

ssh

You can remotely connect to any machine by sshing in as you to lab.cs.swarthmore.edu or to a particular machine by logging in as you to a specific machinename.cs.swarthmore.edu. For example:

# log into some lab machine:
ssh yourusername@cslab.cs.swarthmore.edu
# log into owl:
ssh yourusername@owl.cs.swarthmore.edu

You can find the names of lab machines here: cs lab machines

scp

scp is like the cp command, but for copying files between two different machines.

# copy a file named "bio.txt" from the "cs63/labs/lab01" directory on a lab machine to your machine
scp yourusername@cs.swarthmore.edu:cs63/labs/lab01/bio.txt .
# copy a file named "bio2.txt" from current directory on your machine onto a lab machine
# Note: by default, this will place the file in your home directory; i.e.,  "/home/yourusername"
scp bio2.txt yourusername@cs.swarthmore.edu:
# copy a file named "bio3.txt" from current directory on your machine onto a lab machine in the "cs63/labs/lab01" directory
scp bio3.txt yourusername@cs.swarthmore.edu:cs63/labs/lab01

ssh and scp links


tmux

tmux (and screen) are used to start sessions on a machine that you can detach from and keep running when you log out and then re-attach to later.

tmux is particularly useful for setting up an environment for remote lab work on a particular CS lab machine. You can then detach from the tmux session and logout, and later ssh back into the machine, re-attach to the tmux session and continue from where you left off.

tmux is also handy in that it allows you to create multi-panned windows in a single tmux session. For code development is it nice to have at least two panes: one for editing the file, and another for compiling and running. The CS department help pages has some information for getting started using tmux: CS help tmux page. Here, also, are a few basics:

## tmux commands from bash shell

$ tmux        # create a tmux session
$ tmux attach # attach to an existing tmux session
$ tmux ls     # list existing tmux sessions
$ tmux attach -t sessionname # attach to tmux session named sessionname
$ tmux kill-session -t sessionname # kill tmux session named sessionname


## tmux commands from within a session CNTRL-b initiates these
## first type CNTRL-b then one of the following keys to do:

CNTRL-b d             # detach from the current session
CNTRL-b an_arrow_key  # to move to a different pane within a session
CNTRL-b :             # get tmux prompt to enter all kinds of commands
                      # (ex. to create and configure panes)

Scrolling and copy/paste within a pane is a bit weird. Here are some commands for doing both:

# to scroll within a pane:
CNTRL-b [             # then use page-up and page-down to scroll in pane

# to copy from one pane only:
CNTRL-b [             # to copy from a pane:
  space               # start copying from curser
                      # move curser to end of what you want to copy
  enter               # stop copying at curser

# to paste into same or different pane (be in insert mode if pasting in vim):
CNTRL-b ]             # paste

writing and using bash scripts to create custom tmux session:

It is often useful to write a bash script for creating a tmux session with a regularly used tmux set-up. Professor Newhall has an example script (mytmux.sh). that sets up a tmux session with 3 panes. It is designed to be useful for code development and testing, where the left-most pane can be used to run an editor (e.g. vim) to edit a source code file, and the right panes are useful for compiling, running, debugging, and other purposes. The script, when run, produces a tmux session that looks like this:

tmux example with 3 panes

  • you can run the script directly like this to start your own tmux session using this configuration:

    ~newhall/bin/mytmux.sh
  • or you can copy it over into your home directory, and edit as you’d like, and run it to start your own custom tmux session (really 2 panes might be enough and easier to manage):

    cd
    cp ~newhall/bin/mytmux.sh .
    chmod 700 mytmux.sh    # set this to executable
    ./mytmux.sh
    
    # open in an editor (vim, emacs, ...) to edit the file to customize
    # in a different way (we find that 2-3 panes is useful, and more than
    # that starts to make the session more difficult to use):
    vim mytmux.sh
avoid leaving old tmux sessions running

When using tmux (and screen), be careful about not leaving a lot of old sessions of yours running on lab machines. If you ssh into a particular machine each time you run tmux or screen (ssh you@machinename.cs.swarthmore.edu), this is one way to avoid leaving one running on a machine that you forget about.

tmux resources and links:


finding good/idle/undercommitted machines to use in our system

If you are ssh’ed into a lab machine and notice that it is running slowly, not responding well, you will want to find a better machine to use.

Here are few utilities to see what is running on a machine and to help you find another machine that will respond better and ssh into that one instead.

getting usage info on a machine (who, and top (and htop))

First, you can run who to see if there are a lot of other users logged into the same machine as you are:

who

If there are a lot of users logged into a machine, it may be one that could become overloaded. If all the users are idle, however, it will not be.

A better way to see real cpu and memory load on a machine is to run top and htop. htop has nicer output, so I’d recommend that:

htop

htop shows CPU usage on each core, maybe 1-12 on one of the lab machines, Mem usage, and Swp usage. If the CPU and/or Mem usage is high, and particularly if the machine is Swapping (Swap is active), you want to pick another lab machine to use. Here is some more information about using top and htop

tools for finding a good machine(s)

smarterSSH to find a good lab machine to use

smarterSSH can be used to ssh into a machine that has a lot more available RAM and CPU resources, and should perform well. Running it directly will ssh you in to a good machine, but you may want to run using the -i command line option to list the top machines, then exit the slow machine (kiling any tmux sessions on it first), and then directly ssh into it from home.

Here is the way you may want to run smarterSSH:

smarterSSH -i  -v -n 20

This lists the best 20 machines in terms of available RAM and CPU. Choose one of the machines listed to ssh into (you don’t always want to pick the top one, as maybe others are also choosing it, but if you select one in the top 10 or so, it should perform well)

Here are some other sample line options for using smarterSSH:

# directly ssh's you into one of the best machines
smarterSSH

# list the command line options
smarterSSH -h

# lists top 50 machines based on their available RAM
# probably want the default that orders based on a function of RAM and CPU
smarterSSH -i  -v -n 50 -m

# lists top 50 machines based on their available cpu
smarterSSH -i  -v -n 50 -c

autoMPIGen is a tool similar to smarterSSH that automatically generates an MPI host file using PeerMon data to find good hosts. If you are using MPI on our system, this is useful tool for creating a hostfile of good hosts on our system. here is some more information about autoMPIGen.

system dashboard for machine stats

You could also look at the status dashboard off the CS department machines page to try to find a machine that looks less loaded.


sshfs

SSHFS

The secure shell filesystem (SSHFS) client allows you to access remote files on the CS network as if they were on your own computer as long as you have an Internet connection. It will also allow the programs you run on your computer to access those files without those program worrying about ssh or where the files are physically stored.

This document describes how to setup SSHFS on your personal computer to connect to the Swarthmore Computer Science network. Please select the instructions pertaining to your operating system:

Windows Setup

To set up SSHFS under Windows, we will need two pieces of software:

  • SSHFS-Win: communicates with the CS network computers

  • WinFSP: makes the network drive appear within Windows

Once you have installed these two programs, the setup process is fairly simple

Download and Install WinFS

First, we need to download and install WinFSP. This program allows Windows to support a variety of different virtual filesystems; we need it for the SSHFS-Win software to work. Visit the project’s GitHub download page and download the installer.

download winfsp

Once you have downloaded the installer, you should run it. You can reach the file through your browser’s download window or, typically, find the file in your Downloads folder.

winfsp msi

Double-click on the file to run it. You’ll be greeted with a pretty typical software installer window.

winfsp installer

Press "Next" twice and "Install" once. You will then be presented with a pretty typical confirmation dialog. The installer is checking that you understand that WinFSP is capable of changing how Windows accesses files on your computer

winfsp make changes

Press "Yes" and the installation will proceed. It won’t take more than a few seconds.

winfsp install complete

You can then press Finish. WinFSP is now installed. It doesn’t do anything for you by itself, but it lays the groundwork for what we’ll do next.

Download and Install SSHFS-Win

Next, we need to download and install SSHFS-Win. You can download the file from the project’s GitHub download page similar to WinFSP. Note that there are two installers on this page: one is labeled x64 and the other is labeled x86. Unless you know something specific about your computer, you probably want the x64 version.

sshfs win download

Repeat the process from above: run the installer, press "Next" when necessary and agree to make changes to your computer, and then press "Finish".

Using SSHFS-Win

To set up SSHFS access to the CS network, you need to configure SSHFS-Win. Begin by opening any Windows Explorer window and right-clicking on the Network icon on the left.

windows network right click

Choose "Map Network Drive". You will be presented with the following dialog.

windows network dialog empty

You should select S: (for Swarthmore) as the drive letter. You can use any letter you like, but instructions in your classes will probably use S:.

Copy the following text into the "Folder" box.

\\sshfs\username@cs.swarthmore.edu

Then, change username to your Swarthmore username. Make sure that the text is copied exactly otherwise. When you are finished, your dialog box will look something like this:

windows network dialog full

Press "Finish" and you will be presented with a dialog box asking for your password

windows network password

Make sure to enter your CS network password. Note that this isn’t necessarily the same as your Swarthmore password (although you may have set up your CS account with the same password). If you don’t remember your CS network password (or if you haven’t set up your CS network account yet), visit the SwatCS Password Service and then come back to complete this step.

Once you have entered your CS network password, press "OK". After a few seconds, a Windows Explorer window will pop up showing you your CS network home directory! (There are a lot of files already there that begin with a period; these are called "dot files" and usually store program settings and the like. You don’t need to worry about them.)

windows sshfs home

You can also see the CS network under This PC and in several other places. You can create a shortcut to it and interact with it just like any other folder on your computer.

windows sshfs finished

Your SSHFS setup is complete!

Mac OSX Setup

Setting up SSHFS on Mac OS requires a few different pieces of software that are most reliably installed via the terminal. To simplify matters, we have prepared a script which is available via this website which will take care of a lot of the work. This script will install SSHFS, Homebrew (a software package manager), and several MacOS development tools which are necessary to make everything work.

This will take some time. The installation process does not require much interaction from you, but it may take a couple hours to download and install everything and you will occasionally be asked to provide a password to the terminal. You can use your computer for other things while this is happening, but you may have to start over later if you turn your computer off or disconnect it from the Internet during the installation. If using a physical Ethernet cable to connect to the Internet is an option, it may help speed things up and will protect against your connection dropping.

To begin, open a Terminal. One way to do this is to search for the program named "Terminal" with Spotlight, the magnifying glass on the top right of the screen.

"mac spotlight

You can then type "Terminal" and choose the terminal program when it appears.

"mac spotlight terminal

Once you’ve chosen the program, a terminal window will open. This window allows you to enter commands to be executed on your computer and is quite similar to the terminal interface we use on the Computer Science network. If you are unfamiliar with the terminal, don’t worry; you’ll learn how to use it in your courses!

"mac terminal

Once you’ve opened a terminal, copy the following command into it. You are recommended to copy and paste this text rather than typing it yourself to avoid any typographical errors; a mistake in transcription could prevent installation from working.

/bin/bash -c "$(curl -fsSL "https://www.cs.swarthmore.edu/~zpalmer/guides/sshfs/swatcs-sshfs-mac-setup.sh")"

Check that the command appears in your terminal exactly as it appears here and then press enter. You will be prompted for your SwatCS username. You won’t need to give your password yet.

"mac terminal curl

Enter your SwatCS username into the terminal and press enter. The script will then begin the process of installing software. At this point, it will prompt you for your local password: the one you use to log into your own computer. Type your password here and press enter. Do not type your SwatCS password (unless it is the same) here; it won’t work.

"mac terminal homebrew pw

Once you have given your password, the Homebrew installer will tell you want it is about to do and ask you to press enter to continue.

"mac terminal homebrew confirm

Press enter. The Homebrew installer will start doing work — quite a lot of work — and will flood your terminal with a lot of text. After a few seconds, it will start downloading Xcode, Apple’s application development framework (unless you already have Xcode installed).

"mac terminal xcode download

This part takes a while, perhaps ten minutes on a good connection and longer on a slower connection, and, unfortunately, there is no progress bar. You can walk away from the computer and come back later or you can use your computer to do other things. Just don’t turn the computer off or put it on standby — for most users, that means that you shouldn’t close the laptop lid — and don’t disconnect from the Internet.

Eventually, you will be prompted for your system password again to complete the installation of the tool. Until the installation is complete, each of these password prompts requires your local password (the one you use to log in to your computer). You may be prompted more or less than in this guide, depending upon how long installation takes.

"mac terminal xcode pw

Enter your password when you see this prompt and the Homebrew package manager itself will begin downloading. Thankfully, there’s a progress report this time!

"mac terminal homebrew download

The installer will then start downloading additional components that it needs to make Homebrew and SSHFS work. So we get to wait for another (somewhat longer) download. You don’t need to do anything at this point.

"mac terminal homebrew download core

Once that download is complete, the installer will begin downloading SSHFS. Strangely enough, this may involve updating the Homebrew Core that you just downloaded. Again: just wait for the progress meter.

"mac terminal homebrew download core update

Another password prompt will appear when the OSXFUSE component is installed. Again: this is your local password for your computer.

"mac terminal osxfuse pw

From this point onward, the installation is brief and hands-off: the SSHFS software is very small in comparison to the things it needs to work. If you see the "Installation Complete" message, then you’ve finished installing SSHFS. We still need to configure it to make it work, which we will do below.

"mac terminal installation complete

You can now close the terminal window; we won’t need it anymore. To test your SSHFS setup, open Finder and select Documents on the left.

"mac finder documents

It’s likely that you will have many more files in the Documents folder, but the ones we are interested in begin with "SwatCS". One is a folder; the other two are shell scripts. The script we are interested in is the "SwatCS Connect" script.

"mac swatcs connect open

Click on "Open" and the script will run. You will probably be prompted with a dialog window that notifies you that the FUSE system extension was blocked. This is because it is a new piece of software that was not installed through the App store and your operating system does not trust it.

"mac extension blocked

Press the Open System Preferences button. In the bottom of the window that opens, you will see a message like "System software from developer Benjamin Fleischer was blocked from loading."

"mac system preferences allow

Press the "Allow" button and the message will disappear. Then close the System Preferences window and the terminal window which opened when you ran the command. You won’t need to go through this process again.

Open the "SwatCS Connect" script again. If you’ve never connected to the Swarthmore CS network from this computer before, you’ll see a message asking you if you trust the host. If you have connected to SwatCS from this computer, you might not get this message.

"mac swatcs connect ssh key

Type the word "yes" at this prompt to dismiss it. You won’t need to do it again.

You will then be asked for your SwatCS password. This is the password you would use on the Swarthmore Computer Science network. If you do not remember your password or have not yet set it up, please visit the SwatCS Password Service and then come back to complete this step.

"mac swatcs connect password

After you provide your password, the terminal session will end with a message like "Process completed". If something has gone wrong, an error message will appear above that text in the terminal. If the word "logout" appears immediately after the password prompt, then everything is probably fine.

"mac swatcs connect complete

Close the terminal window and look at the Documents folder in Finder once more. If everything worked correctly, you’ll notice that the "SwatCS" folder has disappeared and there is now an item called something like "OSXFUSE Volume".

"mac finder documents connected

If you open that volume, you will see the contents of your home folder on the Swarthmore Computer Science network!

"mac finder swatcs

You can disconnect by either ejecting the "volume" that is your network folder or by running the "SwatCS Disconnect" command in your "Documents" folder.

From now on, you should only need to run the "SwatCS Connect" and "SwatCS Disconnect" commands to gain access to the SwatCS network. Programs on your computer (like your code editor) can access those files as if they were on your own computer. Your SSHFS setup is complete!


VSCode

Setting up Visual Studio Code

Visual Studio Code is a cross-platform IDE/editor that you can use for editing source code. One of the nice features of Visual Studio Code is the ability to easily live share your editing session with your partner.

Installation

You should be able to install Visual Studio Code for your personal computer by visiting the Visual Studio Code, downloading the appropriate package and following the directions.

The live share feature is an optional extension

Once you have opened VS Code, launch quick open (Ctrl+P), and paste the following command to install the extension.

ext install MS-vsliveshare.vsliveshare-pack

To use the extension and share with others, you will need to have a microsoft or github.com (not swarthmore.github.edu) account. You will not need to host your projects on gitub.com to use the extension. You only need the account to authenticate.