This is an archive of a past semester of this course. Go to the current semester.
Building and submitting assignments for CS 184

Downloading assignments

You can either download the zipped assignment straight to your computer or clone it from GitHub using the command

$ git clone ???

(where ??? is the https link on the GitHub repository page). The advantage of using git is that you'll be all set to use version control to automatically backup your code, which we highly recommend. If you haven't used git before, there are many quick introductions to it on the web, such as this one.

On your github page, please also enable GitHub Pages for your final report. On your repository page, click the settings tab and scroll down to the GitHub Pages section. Select master branch /docs folder as the source. You should see a message saying "Your site is ready to be published at ..." once done.

Build system

We will be using CMake to build the assignments. If you don't have CMake (version >= 2.8) on your personal computer, you can install it using apt-get on Linux or Macports/Homebrew on OS X. Alternatively, you can download it directly from the CMake website.

To build the code, start in the folder that GitHub made or that was created when you unzipped the download. Run

mkdir build; cd build

to create a build directory and enter it, then

cmake ..

to have CMake generate the appropriate Makefiles for your system, then


to make the executable, which will be deposited in the build directory.

Using the instructional machines

All these steps should run with no issues on the fourteen Soda 349 instructional machines. You can access these machines by ssh-ing in, e.g.

ssh cs184-???@s349-?

where cs184-??? is your WebAcct name and s349-? is the ?-th computer in 349. Unfortunately, OpenGL won't play nice with ssh, so you will only be able to compile your code over ssh, not run it. You will have to physically travel to Soda 349 to verify that your code runs correctly.

We have also installed our dependencies on the hive (Soda 330) machines. You can also access these machines by ssh-ing:

ssh cs184-???@hive?

As before, ? represents the ?-th computer in the lab (notice there is no dash). You can check the availability and usage of the hive machines using hivemind. These machines are also available in person, though be mindful of any labs or classes that may be using the lab.

If you develop on your personal computer and then would like to copy the code over to test it, you can use the scp comment from the base project directory (on your own computer) as follows:

scp -r . cs184-???@s349-?

After inputting your WebAcct password, all your files should be copied over as when using the norm cp command. Note that when you move code between computers, you will probably have to recompile since the binaries are rarely cross-compatible.

If you modify code while working on the instructional machines, you can reverse the scp process to transfer the files back to your own computer by running this command

scp -r cs184-???@s349-? ~/destination_folder

from your personal computer.

Personal machines: build FAQ

  • We have tested the CMake/make build process on a couple OS X and Linux machines. However, it is possible you may have issues building due to different versions of operating systems and various tools.
  • If you are having problems on OS X, you should first try upgrading to the latest version of Xcode and installing command line tools by running the command

    xcode-select --install
  • If you are using Windows, you're welcome to try to modify the CMake files to make the code build, as long as your code also still compiles on the s349-? computers.
  • If the CMake file complains that you are missing packages, do your best to install what you need. StackOverflow and internet forums are your friend: pasting error messages into Google usually yields many other people with the same exact problem. If this fails, then make a Piazza post.

Code submission

Your project code and website write-up will be submitted through github this semester. After accepting an assignment through the assignment link, a private repository will be created for you through github classroom. After you are satisfied with your work, ensure first you have pushed all your code to github. Then create a tag with the name submission on the commit you wish to use as your submission.

First commit any work you have and push to the master branch on your remote (the docs writeup will be built from this branch):

git push origin master

Next, tag your submission commit. If you wish to use your last commit as your submission, run:

git tag submission

You can also use a prior commit with checksum CHECKSUM by running:

git tag submission <CHECKSUM>

After you have tagged your desired commit, push the tag to your repository:

git push origin submission

You can view your tagged submission on github to ensure it is what you meant to submit.

If you make a mistake and wish to change your submission:

  1. Delete the old tag: git push origin :refs/tags/submission
  2. Tag the new desired submission commit: git tag -f submission
  3. Push the tag to the remote: git push origin submission

Again, on your github page, ensure you have enabled GitHub Pages for your final report. On your repository page, click the settings tab and scroll down to the GitHub Pages section. Select master branch /docs folder as the source. You should see a message saying "Your site is ready to be published at ..." once done.

To check if your submission is what you desire:

  1. Check the submission tag by using the branch selector on your repo page. This is the commit we will pull.
  2. Check to see if your report looks the way you desire on the page generated by ghPages.

Academic honesty

Please do not post code to a public GitHub repository, even after the class is finished, since these assignments will be reused both here and at other universities in the future.

The assignments are to be completed individually. You are welcome to discuss the various parts of the assignments with your classmates, but you must implement the algorithms yourself -- you should never look at anyone else's code.