If you wish, you can run your entire project by submitting it to the test server. This has the appeal of simplicity: All you need on your own computer is your preferred editor and git.
But this approach has the disadvantage of being slow. Every submisison takes time, and you will wind up going through the process many times, only to find out you have a syntax error because you mis-typed a variable name or forgot a closing colon. Or you get a runtime error because you mispelled the method for one of the library classes.
It will be a lot faster to run short, initial tests on your own machine, clean out the dumb errors, and only then submit to the test server to see how well your code performs.
To run tests, on your own machine, you’ll need to install on your machine the full software stack that runs on the test server. That can take a lot of time, is specific to your operating system, and is generally annoying. But if you already have all or most of the tools installed, it could be a good approach.
The final approach is to download and use this virtual machine, containing Ubuntu 13.10 Server and all the necessary packages. This approach will require at least 1GB free space on your disk. You still have to do a bit of installation (to install VirtualBox), followed by some configuration, but it’s generally less work than building the entire stack yourself. Once you have the VM installed, you development cycle becomes:
git push submit master
from your regular operating system, to run your code on the test server.If you decide to use the virtual machine, here’s how to set it up.
Download and install Oracle VirtualBox. There are versions for the popular operating systems.
Download the virtual machine Note that the ubuntu-13.10-3GB-disk.ova
file is 430
MB long—you might schedule the download at a time when the network is less congested, such as the morning.
Import the virtual machine file ubuntu-13.10-3GB-disk.ova
into Virtual
Box. Use the File/Import Appliance...
menu entry. Accept all the default settings.
Start the virtual machine (green arrow button) and sign on. Your userid and password are both ‘ubuntu’.
Set your git id and email:
git config --global user.name YOURNAME
git config --global user.email YOUREMAIL
replacing YOURNAME
and YOUREMAIL
with your name and email as single-quoted strings (i.e., 'Hao Ramayanan'
, and 'hr543@sfu.ca'
).
Machine/ACPI Shutdown
—you will probably want to learn the hotkey for this action).For each assignment, you will want to share the directory containing your code on the host machine with a directory in the guest Ubuntu OS in the virtual machine.
Assume that you have cloned the boilerplate repository for your current assignment into directory assign
and are editing code there.
assign
in our example) and select that directory.Your assignment directory will be /media/sf_NAME
, where NAME
is your
assignment (/media/sf_assign
in our example). You can edit files in your
host operating system using your favourite editor, save them, and those updated files will
be visible to the guest Ubuntu system, where you can run your tests.