Homework 0: Welcome To CS 174 / Software Test (12 Points)
Chris Tralie
Learning Objectives
- Practice basic terminal commands and folder navigation in Visual Studio Code
- Practice compiling and running programs in the terminal
- Practice zipping up homework solutions
Description / Overview
We're doing some serious systems programming in the class, and I also want to have fun assignments that deal with multimedia data (images, music, videos, animations). Because of the software configuration to enable this variety of tasks is so complicated, students will all be coding in the same environment I've setup ahead of time using Visual Studio and its terminal. To make sure everyone is setup properly, I have devised a series of tests to verify that everything we need is working. If you get stuck or something unexpected happens at any point while following the instructions below, you should immediately post on Discord. We'll work through it there together
First, click here and follow the instructions to download visual studio code, and setup your account on nimbus.ursinus.edu
. Once you're finished and everything is in place, create a designated directory for everything CS 174 related, open your terminal, and use the cd
command to change into this designated directory (alternatively, you can create the directory in the terminal using mkdir
command). Then, to obtain the test software I've created, type
git clone https://github.com/ursinus-cs174-s2023/HW0_Warmup.git
cd HW0_Warmup
git submodule update --init
This should create a folder called HW0_Warmup
in your current directory and then change into that folder. If you then type ls
, you should see these folders/files
If that all worked, proceed to the following tests. Take note of what you see, and submit the results to this link on Canvas
Audio Test (3 Points)
Change into the sound
directory
then type
Now run the generated program
If everything is working properly, this should generate a file called mysterysound.wav
. Open this file in visual studio code (or right click and download it to your computer and listen to it there), and take note on canvas of what number is spoken
Canvas Test (3 Points)
Now go back up a directory and into the directory canvas
then compile the program there by typing
Now run the generated program
If everything is working properly, this should generate an image called mystery.png
. Open this file, and take note on canvas of what shape you see
Web-Based Live Animation Test (3 Points)
Now go back up a directory and into the directory animation
Open up the file mystery.cpp
and change the parameter on line 89 to be the port number you were assigned at the beginning of the course. Then, compile the program by typing
Run the program by typing
Then open up the index.html
file in that folder using the live server launcher in VSCode. Once the web page launches, type in your port number and click Connect!
. You should see an animation of a letter bouncing up and down.
Zipping It Up (3 Points)
Now you will practice zipping up all files in a folder and uploading to canvas. Go one directory above HW0, and then type
zip -r HW0_Warmup.zip HW0_Warmup
This will create a file called HW0_Warmup.zip
that contains all of the files in the HW0_Warmup
directory. Download this file to your computer using the VSCode file browser, and submit it on canvas.