Downloading assignments

When an assignment is released, it will appear in your cs184 website profile, under Assignments. Once you accept the assignment through GitHub Classroom, a private repo will be generated for your assignment. You will want to clone and push to this repository.

$ git clone ???

(where ??? is the https link on the GitHub repository page). 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. Thus, you'll be placing your project writeups as webpages in this /docs folder.

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. If you are running Windows, we have a Windows guide that you should check out. (This is an updated version of the guide from HW0 -- check it out!) It also uses Visual Studio 2017, which you can get for free!.

Command Line

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

  1. mkdir build; cd build to create a build directory and enter it, then

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

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

IDE

To setup the code for your IDE of choice, start in the folder that GitHub made or that was created when you unzipped the download. Run

  1. mkdir build; cd build to create a build directory and enter it, then

  2. cmake -G {IDE Name} .. to have CMake generate the appropriate project files for your selected IDE (fill in "IDE Name" with your desired IDE). Open the project file in your IDE and build the project.

HW0 is provided to walk you through the this build process. Remember that it is highly recommended that you use an IDE such as CLion, Xcode for Mac users, or Visual Studio for Windows users, as it will greatly help with C++ syntax and compiler errors as well as debugging.

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-?.cs.berkeley.edu

where cs184-??? is your WebAcct name and s349-? is the ?-th computer in 349. Unfortunately, OpenGL won't play nice with ssh, so in general, 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?.cs.berkeley.edu 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 command from the base project directory (on your own computer) as follows:

scp -r . cs184-???@s349-?.cs.berkeley.edu:~/destination_folder

After inputting your WebAcct password, all your files should be copied over as when using the normal 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-?.cs.berkeley.edu:~/hw1_folder ~/destination_folder

from your personal computer.

Personal machines: build FAQ

We have tested the CMake/make build process on a couple OS X, Linux, and Windows 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 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, or come to project parties!

Code submission

First commit any work you have and push to the master branch on your remote -- if you're building your GitHub pages off the /docs folder on master (which most of you likely are), and to submit to Gradescope easily.

Both the directory of your code and a PDF version of your writeup must be submitted to Gradescope before the deadline. You should have been added to Gradescope if you are enrolled in the class.

For the code portion, the easiest way is probably to download directly from a GitHub branch to Gradescope, but this is up to you. Regardless, you should upload the entire directory/repository, such that we could build and run your code by simply downloading the folder.

Remember that you have 5 slip days to use as you choose throughout the semester, and you can submit late after those 5 days are used for 10% off, per extra day. Using one slip day or late day extends your time by a full 24 hours, no partial/fractional slip days can be used.

Writeup

Your writeup must be hosted on GitHub Pages, so that we can find it. If you absolutely want to host it somewhere else, please make this very obvious in the body of the PDF, as we will be grading off of your webpage. The PDF submission to Gradescope is simply to help us assign point values to your writeup, and to validate your submission. It is expected that the PDF version matches the live version of your website; i.e. do not edit your webpage after submitting. (Editing grammar or typos is fine, but please do not add entire sentences or images).

Remember that grading starts with your writeup, so make it clear and easy to read!