Assignment 0: Getting set up
Due date
This assignment has no due date, and isn't graded.
Overview
This pseudo-assignment covers the steps you need to go through so that you can start working on the real assignments (starting with assignment 1). It has these steps:
-
Choose a partner. All homework will be done collectively by groups of two students.
-
Get OCaml installed. Also install all necessary supporting packages.
-
Create a private Github repository. Add both partners to the repository. Add the instructor (Mike Vanier, Github name
mvanier
) to the repo. -
Add your TA/grader to the repository. (This doesn't need to be done until your group has been assigned a grader.)
Once this is done, you are ready to start working on compilers! The next sections go through the steps in more detail.
If you have any problems completing any of the steps, let the instructor and/or the TAs know.
Choosing a partner
We will leave this step up to you. We can discuss it in class. If necessary, we can assign students into groups.
Getting OCaml installed
See the document Installing OCaml.
Creating a Github repository
Learning Git
We expect that most of you have used the Git version control system before. If
you haven't, don't worry: you only need to learn a handful of Git commands in
order to work with Git. The primary ones are git commit
, git pull
and
git push
. If necessary, you should read some online tutorials. There are
also books you can read, such as
Learn Enough Git To Be Dangerous.1
Learning Git is likely to be one of the most useful things you ever do as a programmer, so don't feel like this is a waste of time! All code you write should always be stored in a version control system. This protects you from accidentally deleting your files, misplacing them, etc. and also allows you to precisely track changes to your code (and revert to earlier versions in case you made a change that broke everything!).
Warning
We very strongly recommend that you do not try to use advanced Git
commands (such as git rebase
) unless you know exactly what you are doing.
Even though Git is a source code repository system, it is possible to mess
up a repo through incorrect use, and in extreme cases you might have to
recreate the repository from scratch. Be conservative!
Getting a Github account
You also need to have an account with Github, which is a website that offers free hosting for Github repositories. It's free to set up an account.
Note
You may prefer other code hosting services like Bitbucket or GitLab, but for this course, please use Github.
Setting up the repository
You should give your repository a name that includes the names of both
partners (not necessarily their full names).
For instance, if "John Smith" and "Jane Doe" were partners,
a good name for the repo might be e.g. CS164_John_Smith_Jane_Doe
.
Just CS164
isn't good, because your grader will probably keep
all of their gradees' repositories in one directory,
and they need to have distinct names that indicate which group
they correspond to.
We require that your repository be private, so other students (and future students!) will not be able to look at your code — Honor Code rules apply. Newly-created Github repositories normally default to public access, and you need to change that. (Ask us if you don't know how.)
Do not write any code for the assignments
until your Github repo is set up
and until you have added the instructor (Mike, Github name mvanier
)
as a full contributor to the repo.
Once you know who your grader is going to be, add them too.
Finally, create a README.md
file for the repository
in which you state who the two members of your team are.
Include both the name and email addresses of both members.
(You can put more information there as well.)
-
The author of this book (Michael Hartl) is a Caltech graduate and a friend of the instructor. There are a number of other "Learn Enough" books in the series, many of which you may find useful. ↩