This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2020:common:projects:ntr0 [2021/01/27 14:45] – [Clone your Lab46 Mercurial Repository on your raspberry pi] wedge | haas:fall2020:common:projects:ntr0 [2021/01/28 12:41] (current) – wedge | ||
---|---|---|---|
Line 20: | Line 20: | ||
* read through this document, starting at its very top, and working your way down, line by line to the bottom (it is generally linear, with contextual clues sprinkled in) | * read through this document, starting at its very top, and working your way down, line by line to the bottom (it is generally linear, with contextual clues sprinkled in) | ||
- | * as you read through, comprehend and strive to understand what is happening. The supporting text, often surrounding any example or model commands to run, will tend to fill in the crucial backstory and connections. If further clarification is needed, please ask questions! Just running the commands in this document and having | + | * as you read through, comprehend and strive to understand what is happening. The supporting text, often surrounding any example or model commands to run, will tend to fill in the crucial backstory and connections. If further clarification is needed, please ask questions! Just running the commands in this document and have ZERO clue of what you are doing isn't going to help you in the long run. |
* have a contextual/ | * have a contextual/ | ||
* we will be making heavy use of abstraction in this course. We start off with some simple exercises, providing you with model commands you need to adjust to fit your reality (ie commands that won't work as literally shown, but when pertinent meanings are substituted in and followed, will result in success: this is a common theme throughout the course). | * we will be making heavy use of abstraction in this course. We start off with some simple exercises, providing you with model commands you need to adjust to fit your reality (ie commands that won't work as literally shown, but when pertinent meanings are substituted in and followed, will result in success: this is a common theme throughout the course). | ||
Line 28: | Line 28: | ||
As many of my graduated and subsequently employed alumni have relayed to me, many of these activities and behaviours I have highlighted have been quite influential in their success at their various jobs. | As many of my graduated and subsequently employed alumni have relayed to me, many of these activities and behaviours I have highlighted have been quite influential in their success at their various jobs. | ||
- | Say some of my former students now employed: " | + | Say some of my former students now employed |
=====Abstraction===== | =====Abstraction===== | ||
- | {{page> | + | {{page> |
=====Locational Awareness===== | =====Locational Awareness===== | ||
- | {{page> | + | {{page> |
=====Part 1: Getting started with course resources===== | =====Part 1: Getting started with course resources===== | ||
Line 70: | Line 69: | ||
====Clone your Lab46 Mercurial Repository on lab46==== | ====Clone your Lab46 Mercurial Repository on lab46==== | ||
- | **__NOTE: | + | **__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 semester | + | 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. | ||
Line 84: | Line 83: | ||
</ | </ | ||
- | NOTE: you ONLY want to run ' | + | NOTE: you ONLY want to run ' |
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: | 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: | ||
Line 90: | Line 89: | ||
<cli> | <cli> | ||
lab46:~$ cd src | lab46:~$ cd src | ||
- | lab46:~/src$ ls | + | lab46: |
- | SEMESTER | + | |
- | lab46: | + | |
- | lab46: | + | |
A .hgignore | A .hgignore | ||
- | lab46:~/src/SEMESTER$ | + | lab46: |
</ | </ | ||
- | Once cloned (to your ~/src/ | + | Once cloned (to your ~/src directory), you will be able to add, commit, and push changes made: |
<cli> | <cli> | ||
- | lab46:~/src/SEMESTER$ hg add | + | lab46: |
- | lab46:~/src/SEMESTER$ hg commit -m "brief message describing the changes" | + | lab46: |
- | lab46:~/src/SEMESTER$ hg push | + | lab46: |
</ | </ | ||
Line 217: | Line 213: | ||
====Clone your Lab46 Mercurial Repository on your raspberry pi==== | ====Clone your Lab46 Mercurial Repository on your raspberry pi==== | ||
- | **__NOTE: | + | **__NOTE: |
- | Because we will be juggling our activities between lab46 and your raspberry pi (ideally doing the bulk of the work on the pi, then transferring it to lab46 to submit), you will also want to clone your repository on your pi. | + | Because we will be juggling our activities between lab46 and your raspberry pi (ideally doing the bulk of the work on the pi, then transferring it to lab46 to submit), you will also want to clone your repository on your pi: |
- | I have created a script that will facilitate this, all you have to do is log onto your pi, download | + | * make sure you have the " |
+ | * my example will have you cloning | ||
+ | * be sure to replace " | ||
+ | * do NOT change tokens of " | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
- | yourpi:~$ bash ./piph | + | |
</ | </ | ||
Line 231: | Line 229: | ||
You may be prompted for authentication. It is your lab46 account and password. | You may be prompted for authentication. It is your lab46 account and password. | ||
+ | |||
+ | Next, we will configure the repository (using nano to edit the appropriate file): | ||
+ | |||
+ | <cli> | ||
+ | yourpi:~$ nano ~/ | ||
+ | </ | ||
+ | |||
+ | And you will want to input the following (any existing, default content can be eliminated): | ||
+ | |||
+ | < | ||
+ | [paths] | ||
+ | default = https:// | ||
+ | |||
+ | [ui] | ||
+ | username = yourusername < | ||
+ | |||
+ | [web] | ||
+ | push_ssl = False | ||
+ | allow_push = * | ||
+ | |||
+ | [auth] | ||
+ | lab46.prefix = https:// | ||
+ | lab46.username = yourusername | ||
+ | lab46.schemes = https | ||
+ | </ | ||
+ | |||
====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 256: | Line 280: | ||
<cli> | <cli> | ||
- | yourpi:~$ mkdir -p ~/src/SEMESTER/ | + | yourpi:~$ mkdir -p ~/src/desig/ntr0 |
- | yourpi:~$ cd ~/src/SEMESTER/ | + | yourpi:~$ cd ~/src/desig/ntr0 |
- | yourpi: | + | yourpi: |
</ | </ | ||
- | NOTE: "DESIG" is your class designation (" | + | NOTE: "desig" is your class designation (" |
You may want to use the **nano** text editor for this: | You may want to use the **nano** text editor for this: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 280: | Line 304: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 286: | Line 310: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 292: | Line 316: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 298: | Line 322: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 309: | Line 333: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
Hello, World! | Hello, World! | ||
- | yourpi: | + | yourpi: |
</ | </ | ||
Line 390: | Line 414: | ||
<cli> | <cli> | ||
- | lab46:~/src/SEMESTER$ hg pull; hg update | + | lab46: |
</ | </ | ||