Homework 1

Due 23.59, Sep/03/2017

Doing a small project using version control

  1. Find a lab-partner.

1. Read the sections on UNIX, Bitbucket, and Git. This means that you have:

  • installed Git on your computer;
  • created a private Bitbucket repository, say math471YOURLASTNAME;
  • cloned the remote repository to your local machine;
  • created a file named test.txt to your new local directory;
  • added, commited (with the message “My 1st commit of test.txt.”), and pushed the new file to your Bitbucket repository;
  1. Now modify your test.txt file by adding two more lines to the test.txt file:

    I am YOUR_NAME. (or We are YOUR_NAMES)
    I am learning version control.
  2. Then add and commit (with a message, e.g. “added two more lines to test.txt.”) the modifed file, and push it to your Bitbucket repository.

  3. Add a sub-directory for the first homework (say HW1) to your repository and move the test.txt file to this sub-directory. Add, commit, and push.

  4. Next, create two README.rst files, one in the top-level directory (i.e. math471YOURLASTNAME), and one in the sub-directory HW1. The extension .rst indicates that this file is written in reStructuredText. A README file contains information about other files in a directory. For example, it may contain instructions where to find your homework report and code, and how to execute your codes, etc. The idea is to generate a top-level README file in the master repository (giving general information about your repository and its sub-directories) and one low-level README file for each homework assignment (describing for instance how to compile and run the programs for a particular homework). For example, a typical low-level README file could contain something like:

    README file for Homework 2, Math 471, Fall 2017, M. Motamed
    - The homework report is in the directory
      HW1/Report and is called homework1.pdf.
    - The code for this homework is located in
      Homework1/Code and is documented in the appendix
      of the report.
    - To reproduce the results in the report do this:
           1. bla bla bla
           2. bla bla bla
           3. ...
           (where this is a description of how to recreate the results).

    Note that in homework 1, there will be no pdf-report and code. But we will have reports and codes in next homework assignments. Once you are done editing your readme files you will first add them to your local Git repository, commit locally and then push your changes to your remote repository on Bitbucket:

    $ git add README.rst
    $ git commit -m "Added a README"
    $ git push
  5. To submit your homework for grading first add me as members to your repository by Settings -> User and group access -> Users. My user name is “motamed”. I will need “write” privileges so that I can add comments. Then, when you are ready to submit (before the due time / date), send me an email with the SHA-1 checksum from the appropriate commit (use git log to get the hexadecimal checksum number). This checksum will identify the version of your repository that you want me to grade. Note that upon grading we will first read the readme files where you will put instructions where we can find the report and code for each homework (a subdirectory, named HW1, containing a test.txt file for this particular homework).