Documenting Your Work

In CS, the value of a program is not mostly the compiled executable you can run, but what you learned from developing it. (This is not just true for students, but for professors, researchers, and even professional software engineers—if you wanted to make a new web browser, would you rather have a copy of Chrome, or the programmers who figured out how to make it?)

In order to emphasize the process of developing code, a significant part of programming assignments in Chemeketa CS classes is to record and submit a work history. You will generate this history using the version control software ‘git’.

Easy Way With VS Code

If you followed the software installation instructions, and are using the provided project templates, generating the work history should happen automatically. This video demonstrates how it works and how to view the work history.

Note: The GitDoc extension we use is now title "Chemeketa Worklog". Other than the name change, it works exactly the same as described in the video.

Manual Approach

If you choose not to use VS Code or our templates, you will need to generate your own work history using git directly. You should have installed git as part of the software installation. If you did not, do at least that part now, including configuring git with your name and email address.

If you use the provided templates, even if you choose not to use the recommended VS Code setup, your projects will start out initialized properly as git repositories.

If you do not use the provided templates, you will need to initialize each new project properly before you start writing any code. Open a command line window and navigate to the folder with your new project. Then run the following command.

git init

Either way, as you work, you will need to record your progress by making commits. You can do this from the command line with the following:

git add -A && git commit -m 'checkpoint'

The 'checkpoint' part of the example above is a descriptive message about what you have changed. The recommended VS Code setup doesn't know why you change things, so it generates fairly generic commit messages; you can feel free to be generic too, but you can also type a brief description of what you've changed.

You should make commits every time you save the code. You will likely want to automate this process with a tool to watch for changes and make commits for you. If you are not able to figure out how to do this, seek help or use the recommended VS Code setup.

A valid worklog must have frequent commits. The goal is not to show just the final product, but the messy churn of getting there.

At any time, you can look through your commit history with the following.

git --no-pager log