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.

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 probject. Then run the following command.

git init

Either way, as you work, you will periodically need to record your progress. Keep a command window open, and every time you build your program, also run 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.

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

git --no-pager log

If you stop working for a while and go back to the project, you will need to reopen the command prompt window and navigate back to the folder so you can do new commits. You will not have to rerun git init.