Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
910db56
revamped bash aliases instructions, modified vi cheat sheet
goodwid Jan 26, 2017
3a2005b
Really fixed the vi cheat sheet this time
goodwid Jan 26, 2017
25564d9
Added an actual worksheet with tasks to complete
goodwid Jan 27, 2017
b36849a
Updates to cheat sheet
goodwid Jan 27, 2017
b5bc5da
Add link to bash aliases tutorial
bethadele Apr 18, 2017
dc0d5be
Merge pull request #3 from codefellowspdx/bethadele-patch-1
bethadele Apr 18, 2017
5fc1f90
Add instructions for working with Atom
bethadele Apr 18, 2017
7d7e973
Add link to new Atom instructions
bethadele Apr 18, 2017
e798c68
Repair formatting glitches
bethadele Apr 18, 2017
972293c
Add file for monday notes
Apr 18, 2017
4549128
Add changes to monday file
Apr 18, 2017
d4aec3b
Add notes
Apr 18, 2017
814bc66
Remove line from monday notes
Apr 18, 2017
4901635
Modify line in monday notes
Apr 18, 2017
8b8678c
Change README with some different text
Jan 28, 2017
02e04d7
Add more conflicts
Jan 28, 2017
70b7279
Rearrange schedule
Apr 19, 2017
fe21d26
Add link to vi cheat sheet
bethadele Apr 19, 2017
bf895eb
Fine-tune bash instructions
bethadele Apr 19, 2017
3c81390
Change branch name
bethadele Apr 19, 2017
cbff9bb
Add notes file for Tuesday evening
Apr 19, 2017
378e8d3
Add changes to tuesday notes
Apr 19, 2017
f868ac5
Remove feature/ from branch name
bethadele Apr 20, 2017
0fe1855
Merge remote-tracking branch 'upstream/master'
Apr 20, 2017
5defc26
Remove feature/ from thurs, fri branches
Apr 21, 2017
4df36a5
Merge branch 'master' of github.com:bethadele/code102
Jul 17, 2017
3edf68c
Revise content for July 2017 course
Jul 17, 2017
29662b6
Remove random text from merge conflict lesson
Jul 17, 2017
c038e54
Merge pull request #6 from codefellowspdx/july2017
bethadele Jul 17, 2017
1782a09
Repair formatting
bethadele Jul 17, 2017
cf9858c
Tweak Developer tools formatting
bethadele Jul 18, 2017
f29bf75
add monday notes
FranklynTS Jul 18, 2017
0fa2e4a
add monday notes
FranklynTS Jul 18, 2017
e89c8dc
Repair typos
bethadele Jul 19, 2017
b25fd23
add tuesday notes
jenniferelton Jul 19, 2017
2305bbd
Add Tuesday's questions
Jul 19, 2017
77be2cb
add changes for tuesday class
FranklynTS Jul 19, 2017
87e2e85
adding changes
FranklynTS Jul 20, 2017
079562b
Add Wednesdaynotes
FranklynTS Jul 20, 2017
9333e67
Wednesday changes
FranklynTS Jul 20, 2017
7aca50a
notes/wednesday.md
jenniferelton Jul 20, 2017
c729293
Add notes for Thursday class
Jul 21, 2017
b784cae
add thursday note file
FranklynTS Jul 21, 2017
39f1e29
Merge branch 'master' into thursday
FranklynTS Jul 21, 2017
4ded819
Add Thursday code snippets
Jul 21, 2017
ef237f6
add thursday notes
jenniferelton Jul 21, 2017
f9c1198
Merge branch 'thursday' into thursday-july2017
bethadele Jul 21, 2017
50da861
Merge pull request #1 from bethadele/thursday-july2017
FranklynTS Jul 21, 2017
a835080
Merge branch 'thursday' into thursday
FranklynTS Jul 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Welcome to Code 102! We're going to spend five nights covering the essentials of

## Resources
* Keyboard Shortcuts
* [Mac](http://www.danrodney.com/mac/)
* [Windows](http://www.hongkiat.com/blog/100-keyboard-shortcuts-windows/)
* [Mac](http://www.danrodney.com/mac/)
* [Windows](http://www.hongkiat.com/blog/100-keyboard-shortcuts-windows/)
* Text Editors
* [The Basics of vi](http://www.bsdguides.org/2004/the-basics-of-vi/)
* [The Basics of nano](https://wiki.gentoo.org/wiki/Nano/Basics_Guide)
* [The Basics of vi](http://www.bsdguides.org/2004/the-basics-of-vi/)
* [The Basics of nano](https://wiki.gentoo.org/wiki/Nano/Basics_Guide)
* Visual Studio Code
* [The Basics of Visual Studio Code](https://code.visualstudio.com/Docs/editor/codebasics)
* [VS Code Key Bindings](http://www.hongkiat.com/blog/key-binding-management-visual-studio-code/)
Expand Down
6 changes: 3 additions & 3 deletions code/friday.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// After each TODO, once you get the code working, stop and add/commit
// your changes to your repository.

// TODO: Copy in your completed code from Wednesday.
// TODO: Copy in your completed code from Thursday.

// TODO: Refactor all the code into a single big function
// called dayApp().
// called dayApp(). Be sure to work incrementally!

// TODO: What happens if you reload the page now?

Expand All @@ -15,7 +15,7 @@
// TODO: Refactor the math that gets a random day number
// into a function called getDayNumber().

// TODO: Refactor the if/elseif/else block that comments
// TODO: Refactor the if/else if/else block that comments
// on each day into this function:
function remarkOnDay(day) {

Expand Down
104 changes: 61 additions & 43 deletions code/thursday.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
var day = 'Thursday',
thursday = 'thursday';

// How many equals signs does it take to screw your code?
if (day = 'thursday') {
console.log('Test 1: Well lookee there, it\'s ' + day);
}

// The case of the failing "if" statement
if (day == 'Thursday') {
console.log('Test 2: Lo and behold, it\'s ' + day);
}

// Equals thrice, test once
if (day === 'Thursday') {
console.log('Test 3: Huh. It\'s ' + day);
}

// TODO: After commenting out the 3 conditionals above,
// uncomment this code and run it.
// var day = 'Thursday';
// var thursday = 'thursday';
//
// // How many equals signs does it take to muck up your code?
// // if (day = 'thursday') {
// // console.log('Test 1: Well lookee there, it\'s ' + day);
// // }
//
// // The case of the failing "if" statement
// if (day == 'Thursday') {
// console.log('Test 2: Lo and behold, it\'s ' + day);
// }
//
// // Equals thrice, test once
// if (day === 'Thursday') {
// console.log('Is it Friday yet?');
// } else {
// console.log('Whistle while you work!')
// console.log('Test 3: Huh. It\'s ' + day);
// }

// TODO: Add an "else if" block to check whether it's Saturday
// and console.log() a different statement for the weekend.



// TODO: Modify the conditional for Saturday to check whether
// the day is Saturday OR Sunday.



// TODO: Add an "else if" block to check whether it's Monday
// and console.log() a different statement for Monday.



// TODO: Change the string that's assigned into the day
// variable and run the code several times.
//
// // TODO: After commenting out the 3 conditionals above,
// // uncomment this code and run it.
// // if (day === 'Thursday') {
// // console.log('Is it Friday yet?');
// // } else {
// // console.log('Whistle while you work!')
// // }
//
// // TODO: Add an "else if" block to check whether it's Saturday
// // and console.log() a different statement for the weekend.
//
//
//
// // TODO: Modify the conditional for Saturday to check whether
// // the day is Saturday OR Sunday.
//
//
//
// // TODO: Add an "else if" block to check whether it's Monday
// // and console.log() a different statement for Monday.
//
//
//
// // TODO: Change the string that's assigned into the day
// // variable and run the code several times.



var days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];

// console.log('index 0: ' + days[0]);
// console.log('index ' + i + ': ' + days[i]);
// console.log('index 1: ' + days[1]);
// console.log('index 2: ' + days[2]);
// console.log('index 3: ' + days[3]);
// console.log('index 4: ' + days[4]);
// console.log('index 5: ' + days[5]);
// console.log('index 6: ' + days[6]);
//
// console.log('index 7: ' + days[7]);
// console.log('index 20: ' + days[20]);

Expand All @@ -58,8 +62,22 @@ var days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday',
// console.log('index ' + i + ': ' + days[i]);
// }


// What if we want to iterate over the Klingon days?
// days = [
// 'DaSjaj',
// 'povjaj',
// 'ghItlhjaj',
// 'loghjaj',
// 'buqjaj',
// 'ghInjaj'
// ];
var times = ['morning', 'noon', 'night'];
// TODO: Replace the "7" in "i < 7" with the length of the array
for (var i = 0; i < days.length; i++) {
for (var j = 0; j < times.length; j++) {
console.log('It is ' + times[j] + ' on ' + days[i]);
}
}


// TODO: On each iteration, use our randomly generated dayNumber
Expand Down
16 changes: 8 additions & 8 deletions code/tuesday.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ console.log('the day is: ' + day);
var monday = 'monday';
var tuesday = 'tuesday';
var wednesday = 'wednesday';
// console.log('the variable monday contains: ' + monday);
// console.log('the variable tuesday contains: ' + tuesday);
// console.log('the variable wednesday contains: ' + wednesday);
console.log('the variable monday contains: ' + monday);
console.log('the variable tuesday contains: ' + tuesday);
console.log('the variable wednesday contains: ' + wednesday);

monday = tuesday;
tuesday = wednesday;
// console.log('the variable monday contains: ' + monday);
// console.log('the variable tuesday contains: ' + tuesday);
// console.log('the variable wednesday contains: ' + wednesday);
console.log('the variable monday contains: ' + monday);
console.log('the variable tuesday contains: ' + tuesday);
console.log('the variable wednesday contains: ' + wednesday);

var number = 1;
var numberString = '1';
Expand All @@ -33,5 +33,5 @@ var numberString = '1';
// number
// numberString

// console.log('the type of variable number is: ' + typeof number);
// console.log('the type of variable numberString is: ' + typeof numberString);
console.log('the type of variable number is: ' + typeof number);
console.log('the type of variable numberString is: ' + typeof numberString);
21 changes: 21 additions & 0 deletions notes/monday.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

We will get into the habit of uploading everynight!

"add changes"

git status
git add -p

git status
git commit -m "Add Monday notes"

git status
git remote -v

git push origin master

git status
git add -p
git status
git commit -m "add Monday notes"

1 change: 1 addition & 0 deletions notes/thursday-frankseaman.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
3 changes: 3 additions & 0 deletions notes/thursday-jenniferelton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DRY- Don't repeat yourself

Code is always best at it shortest
46 changes: 46 additions & 0 deletions notes/tuesday.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Tuesday notes

var day = 'Monday';
console.log('the day is: ' + day);

day = 'Tuesday';
console.log('the day is: ' + day);

day = 'Thursday';
console.log('the day is: ' + day);

day = 1;
console.log('the day is: ' + day);

var monday = 'monday';
var tuesday = 'tuesday';
var wednesday = 'wednesday';
// console.log('the variable monday contains: ' + monday);
// console.log('the variable tuesday contains: ' + tuesday);
// console.log('the variable wednesday contains: ' + wednesday);

monday = tuesday;
tuesday = wednesday;
// console.log('the variable monday contains: ' + monday);
// console.log('the variable tuesday contains: ' + tuesday);
// console.log('the variable wednesday contains: ' + wednesday);

var number = 1;
var numberString = '1';
// console.log('the variable number contains: ' + number);
// console.log('the variable numberString contains: ' + numberString);

// TODO: What if we look at these in the console?
// In the console, type:
// number
// numberString

// console.log('the type of variable number is: ' + typeof number);
// console.log('the type of variable numberString is: ' + typeof numberString);
=======
* Student questions:
* for loops vs. for/in loops (will discuss Wednesday)
* syntax & resources (Duckett book, MDN)
* case sensitivity in boolean comparisons


24 changes: 24 additions & 0 deletions notes/vi_practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## vi practice worksheet

For a list of commands, view the vi cheat sheet in the resources directory in this reposiorty

After completing each of these tasks, press the `<esc>` key to return to Command mode.

#### Go to a specific line, and add to end of line.
Add your name to the following line. Position the cursor on line `n` by entering `nG` and pressing enter, then type `A`

Hello my name is

#### Insert a line
move your cursor using the `j` and `k` keys to the line with `two`, then press `o` and add the missing list item.

* one
* two
* four

#### Find, delete and add text at cursor
position the cursor at `East` by typing `/East` and pressing enter. Press `n` until you're at the incorrect word. Delete the word by typing `dw`. Then press `i` and enter the proper descriptor.

Code Fellows PDX is located on the East side of the river.

####
21 changes: 21 additions & 0 deletions notes/wednesday.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

When working on a big project, you will not be able to work on the original repository. You CAN fork(clone) a copy to your own computer. You can make the changes or new code to your forked version. When you are done with your changes, you will have to do a "pull" from the original repository.
To do this,
git pull upstream "name of the original repository".
Then finish your code. turn into the powers that be.

to create a branch
git branch 'name of file'
git checkout wednesday
git status

functions
named functions


object constructors
paramenters-how many

this is a change for wednesday
this is getting better

15 changes: 15 additions & 0 deletions resources/atom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Working in Atom

## Getting Started
1. Open your class repo in Atom: **File > Add project folder...**
2. Close extra panes/windows
3. Toggle your file view sidebar with Cmd-M / Ctrl-M
4. Create a file for Monday in the `/notes` folder (call the file `monday.md`)

## Installing a Terminal Plugin
1. **Atom > Preferences** (or Cmd-, / Ctrl-,)
2. Go to **Install** (NOT Packages)
3. In the search box, type: platformio-ide-terminal
4. Install the package
5. Return to your notes file for Monday
6. Open a terminal window by clicking the little terminal icon in the bottom toolbar, or by using Cmd-Shift-T / Ctrl-Shift-T
33 changes: 23 additions & 10 deletions resources/bash_aliases.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@

Copy the following small block to your `.bashrc` file:

``` bash
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
```

Copy the large text block below to your home directory as `.bash_aliases`, then type `source ~/.bashrc` to reload the file.
## Setting up aliases in bash


1. open a new terminal window, confirm that it is in your home directory by typing `cd`
1. look for the following two (hidden) files in your home directory: `.bashrc` or `.bash_profile`. If they don't both exist, create them: `touch ~/.bashrc ~/.bash_profile`<sup>2</sup>
1. open the `.bashrc` file with the command `vi ~/.bashrc`
1. press `I` to enter insert mode, and copy the following block into the file:
`[[ -s ~/.bash_aliases ]] && source ~/.bash_aliases`
1. press `esc` to enter command mode, then type `:wq` and press enter to save and exit.
1. open the `.bash_profile` file in the same way: `vi .bash_profile`
1. press `I` to enter insert mode, and copy the following block into the file:
`[[ -s ~/.bashrc ]] && source ~/.bashrc`
1. again, press `esc` to enter command mode, then type `:wq` and press enter to save and exit.
1. create the `.bash_aliases` file with the following command: `touch ~/.bash_aliases`
1. open the file with vi: `vi ~/.bash_aliases`
1. press `I` to enter insert mode, and paste in the large block of text below.
1. save and exit, `<esc> :wq <enter>`
1. finally, type `source .bash_profile` to load all the aliases.
1. confirm the aliases load when you start a terminal by exiting your terminal and restarting. Type `alias` and press enter, and you should see the list below.

``` bash
#
Expand Down Expand Up @@ -44,3 +53,7 @@ alias edbash='vi ~/.bashrc'
alias edal='vi ~/.bash_aliases'
alias newdot='source ~/.bashrc'
```


##### footnotes
1. `touch` is a utility that creates a file if it doesn't exist.
Loading