COMP 206 - Fall 2025 - Homework 1

Instructors: Mona ElSaadawy & Jacob Errington

Soft due date: Monday, 13 September 2025 Hard due date: the date of midterm 1

Prerequisites

You must have already set up your School of Computer Science (SoCS) account on our server called mimi. On McGill wifi (or after connecting to the McGill VPN) visit this page to set up your SoCS account.

Part 0: setting up your SSH key

ssh is a very versatile program that we use to log into a remote computer. To log into a computer, we need to provide a username (to specify as who we would like to act as) and some kind of password (to prove that we have the authority to act as that user.)

You're already used to ordinary passwords, that you type in when you want to log in. But ssh has an alternative mechanism for providing a password. That alternative mechanism is called an ssh key.

An ssh key will have been emailed to you by IT. Download it to your computer. Assuming your name is Jane Smith, the file you downloaded should be named something like jsmith13-key.

You will next need to transfer this key into your SoCS account.

This will depend on what OS is running on your computer. We won't give detailed instructions on how to do this; you will need to do some research.

Our recommendation is to find a way to install the rsync program on your computer. This is a command-line program for copying files via ssh.

To learn how to use rsync, check out this guide

You can alternatively install on your computer a graphical program, such as Cyberduck, Filezilla, or WinSCP. (Just be careful with the Filezilla installer: I think you need to uncheck a box during installation somewhere to prevent it from also installing some kind of garbage alongside Filezilla.)

Using whatever program you decided to go with, copy the ssh key you downloaded (e.g. jsmith13-key) into the home directory of your SoCS account.

Next, log into mimi and do the following: - Run this command mkdir -p .ssh -- create a hidden directory called .ssh inside your home directory - Run this command: chmod 400 jsmith13-key -- this makes the key read-only, as required by ssh. - Run this command: mv jsmith13-key .ssh -- move the key into the .ssh directory - Follow the instructions from the email you received from IT to create the file named config inside the .ssh directory.

Congratulations, you set up your ssh key. You will now be able to obtain and submit the homework via git on mimi.

Part 1: creating directories and getting homework instructions

Check you did it right: ls ~/comp-206/homework/hw1/.git should succeed and show a listing of some strange, internal git files.

Next, get the lecture notes, which we are also distributing via git:

Check you did it right: ls ~/comp-206/notes/.git should succeed and similarly show a listing of strange, internal git files.

Part 2: transferring files to and from mimi

Next:

Submission instructions

To recap, your hw1 directory should contain at this point:

Then,

If you need to revise your solution and resubmit it, repeat the three steps in this section: git add ., git commit -m "a message describing the changes", git push.

You can run the autograder via git push as many times as you like!

(In practice when doing software development, running git push won't run an autograder, but it will typically run some scripts to run a test suite on your code, compile your code, and deploy your program, i.e. make it accessible to users!)

Evaluation scheme

This assignment is graded simply on completion, and the main point of it is to familiarize you with the mechanism by which you'll be doing and submitting your homework throughout the semester.

Simply pushing with the required files present and of the correct types will earn full marks.