COMPSCI220 Course Materials
This is the repository for COMPSCI 220 (Fall 2014 -- Spring 2018), which was taught in Scala. The course is no longer offered, so all materials are now available.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
- LaTeX (at least TeXLive 2015)
OLD DOCUMENTATION BELOW
This repository holds all course materials for CMPSCI220. The root directory holds a Vagrant environment that you should use for any course development, from updating the website to hacking on code.
The Vagrant environment has the same GUI (Lubuntu), JVM, and Scala that students use in the course, but excludes utilities such as text editors. The Vagrant environment mounts this repository at
/home/vagrant/src. So, you can use a text editor on the host to edit files.
I strongly recommend using VMWare instead of VirtualBox to run the development environment. VirtualBox has terrible disk performance when working with host-mounted volumes (i.e., the
host$ vagrant up --provider virtualbox
This will take several minutes. If the
Vagrantfile changes, you can either manually apply the update or run
host$ vagrant destroy
and start again.
There are two ways to build the system:
sbt compileLibbuilds the library and
scala220executable so that they can be used locally. But, Docker-based testing does not work.
sbt compileDockerbuilds the library and testing system. This creates fat JARs and the Docker sandbox, which can take some time. This mode is almost identical to the setup that students have.
Have a public/secret keypair in the
gnupgdirectory that is recognized by the Launchpad CS220 PPA:
Login to the Docker registry (
vm$ docker login) and have permission to update to this image:
Add a new entry at the top of
ppa/debian/changelog. You have to:
a. Increment the version number,
b. set a well-formatted date, and
c. have two blank lines between each entry.
See that file for several examples.
sbt release. This command will first push the Docker image to Docker and then pushes the package to LaunchPad PPA. It takes forever for Launchpad to build. You receive errors over email.
If the Docker image is updated, you need to write a post-install script.
Creating a new course VM for students
The course VM is configured to install software from the Ubuntu PPA. If you need to build a new course VM, ensure that the PPA is up-to-date, as described above.
Updating the website
sbt compileWeb to build the website. This also rebuilds the API documentation. Run
sbt publishWeb to update the website.
Releasing open-source software
We publish the
submission directories as open source software. To do so, we use Subtree merging.
First time setup:
git remote add -f submission email@example.com:cmpsci220/submission.git git remote add -f support-code firstname.lastname@example.org:cmpsci220/support-code.git
To push code to the open source repositories:
$ git subtree push --prefix=submission submission master $ git subtree push --prefix=support-code support-code master
To pull code:
git fetch --all $ git subtree pull --prefix=submission submission master $ git subtree pull --prefix=support-code support-code master
Writing a new homework assignment