This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2020:cprog:projects:cci0 [2020/01/19 14:32] – [Class Chat (IRC)] wedge | haas:spring2020:cprog:projects:cci0 [2020/01/19 14:45] (current) – [Personal/Per-User Lab46 Mercurial Repository] wedge | ||
---|---|---|---|
Line 81: | Line 81: | ||
====Personal/ | ====Personal/ | ||
+ | **__NOTE: | ||
- | To both aid you and help you develop better development skills, I'd like for you to make regular commits and pushes to your [[/ | + | To both aid you and help you develop better development skills, I'd like for you to make regular commits and pushes to your Lab46 mercurial repository. |
This way, you can have a regular snapshot of your work as you go along, plus have the ability to grab an older copy should something go wrong. | This way, you can have a regular snapshot of your work as you go along, plus have the ability to grab an older copy should something go wrong. | ||
- | Like the Journal, I will be looking for a minimal amount of repository-related activity PER WEEK (for example, I will be looking for AT LEAST 1 commit in relation to your program for week 1). Note that for participation, | + | Like the Journal, I will be looking for a minimal amount of repository-related activity PER WEEK. |
+ | To set up your repository, run the " | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ fixrepo | ||
+ | </ | ||
+ | |||
+ | For basic repository operation, when you make new files you'd like to track, or see the status of any tracked files that have changed: | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ cd src | ||
+ | lab46: | ||
+ | A .hgignore | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | Once cloned (to your ~/src directory), you will be able to add, commit, and push changes made: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | lab46: | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | On the push, you will be prompted to provide your lab46 password. | ||
+ | |||
+ | And that's it! Repeat this process (NOT the ' | ||
====Program to Implement==== | ====Program to Implement==== | ||
As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World** | As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World** | ||
Line 109: | Line 136: | ||
Your task will be to transcribe this code (sans line numbers), into a source file (call it **hello.c** for simplicity), | Your task will be to transcribe this code (sans line numbers), into a source file (call it **hello.c** for simplicity), | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ mkdir src/ | ||
+ | lab46:~$ cd src/ | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | You may want to use the **nano** text editor for this: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | The **nano** text editor is a simple editor that provides basic functionality (commands listed at the bottom of the screen. You press the CONTROL key in combination with whatever letter invokes the desired functionality). | ||
+ | |||
+ | To save the file: CTRL+o | ||
+ | |||
+ | To save and exit (or exit if there are no changes made): CTRL+x | ||
+ | |||
+ | Note that if there are any changes, you will be prompted whether or not you'd like to save them (the changes are in memory (aka the buffer), and nano will prompt if you'd like to save the modified buffer). You will then be prompted for the filename (filling in the current filename, if there is one). Just press enter to accept these changes. | ||
Verify you typed in everything correctly by compiling it; you want no warnings or errors: | Verify you typed in everything correctly by compiling it; you want no warnings or errors: | ||
Line 174: | Line 221: | ||
< | < | ||
- | 39:cci0:final tally of results (39/39) | + | 13:cci0:final tally of results (13/13) |
- | *: | + | *: |
- | *: | + | |
- | *: | + | |
*: | *: | ||
- | *: | + | *: |
- | *: | + | |
*: | *: | ||
- | *: | ||
- | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
- | *: | + | *: |
*: | *: | ||
*:cci0:no compiler warnings for hello.c [1/1] | *:cci0:no compiler warnings for hello.c [1/1] |