Skip to content

Commit 6dcd21b

Browse files
committed
homework class8
1 parent d67e341 commit 6dcd21b

4 files changed

Lines changed: 48 additions & 1 deletion

File tree

Extra module class8/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Homework for the extra JavaScript module Class8
2+
3+
## What we did in lecture 1:
4+
Code Kata Race
5+
6+
- Problem 1 https://www.codewars.com/kata/keep-up-the-hoop
7+
- Problem 2 https://www.codewars.com/kata/find-the-first-non-consecutive-number
8+
- Problem 3 https://www.codewars.com/kata/negation-of-a-value
9+
10+
11+
## Homework week 1: (I EXPECT ALL OF YOU TO AT LEAST ATTEMPT PROBLEMS 1-5):
12+
- https://www.codewars.com/collections/hyf-homework-1
13+
- https://www.codewars.com/collections/hyf-homework-1-bonus-credit
14+
15+
Remember the person with the most kata points gets a prize from Gijs (and you can do exercises on this website without me telling you to - anything kyu 7 or kyu 8 you can try to do - kyu 6 or lower is probably too hard)
16+
17+
- Hint for Q1: split your code into two parts, one part for the case that one of the two strings has an extra letter at the start or the end but is otherwise identical & one part for the case that the strings are the same length but one character is different in one of the strings
18+
- Also for Q1 this function on strings might be useful https://www.w3schools.com/jsref/jsref_slice_string.asp
19+
- Also potentially useful
20+
https://www.w3schools.com/jsref/jsref_charat.asp
21+
- Hint for Q2: https://www.w3schools.com/jsref/jsref_sort.asp Also there are no sample tests, you need to use submit
22+
23+
## To watch before second lecture:
24+
(watch in this order)
25+
26+
1. Stacks/Queues https://www.youtube.com/watch?v=wjI1WNcIntg (5 mins)
27+
2. JS Event Loops https://www.youtube.com/watch?v=8aGhZQkoFbQ (26 mins, watch this one twice or until you understand it)
28+
29+
## The tools we used in the second lecture
30+
- [metajs](http://int3.github.io/metajs/)
31+
- [latentflip](http://latentflip.com/loupe/?code=Y29uc3QgcCA9IG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCl7CiAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgY29uc3QgZGljZVJvbGwgPSBNYXRoLmNlaWwoTWF0aC5yYW5kb20oKSAqIDYpOwogICAgICAgIGNvbnNvbGUubG9nKGRpY2VSb2xsKTsKICAgICAgICBpZihkaWNlUm9sbCA9PT0gNikKICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcigncm9sbGVkIGEgc2l4JykpCiAgICAgICAgZWxzZQogICAgICAgICAgICByZXNvbHZlKGRpY2VSb2xsKQogICAgfSwgNTAwMCk7Cn0pOwoKCnAKICAgIC50aGVuKGZ1bmN0aW9uKHJvbGwpewogICAgICAgIGNvbnNvbGUubG9nKCdkaWNlIHJvbGxlZCBhICcgKyByb2xsKQogICAgfSkKICAgIC5jYXRjaChmdW5jdGlvbihlcnIpewogICAgICAgIAogICAgfSk7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D)
32+
33+
## Homework Week 2
34+
- https://www.codewars.com/collections/hyf-homework-number-2
35+
- If you need to refresh your memory on es6 classes: https://ponyfoo.com/articles/es6-classes-in-depth
36+
- Also read this article on scopes & closures: https://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/

Week6/MAKEME.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fetchReposFromOrganization('hackyourfuture')
1616
```
1717

1818
Make sure you authenticate the request with a **token**, [Create a new token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).
19-
You should be able to achieve with somenthing like:
19+
You should be able to achieve with something like:
2020
```
2121
request.setRequestHeader("Authorization", "token " + TOKEN);
2222
```
@@ -28,3 +28,5 @@ You've to make sure that you **never publish your TOKEN** openly!*
2828
*Tip:*
2929
A way of solving, could be, creating an input where I to fill the personal token. Maybe use [Local Storage](https://developer.mozilla.org/en/docs/Web/API/Window/localStorage) so when we come back is already set.
3030
You can find also start to look at stuff like: [How to get value from input](http://stackoverflow.com/questions/11563638/javascript-how-to-get-value-of-text-input-field).. etc...
31+
32+
rewatch the Hangouts lecture here: https://www.youtube.com/watch?v=bC7Ih5nxBCk

Week8/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Homework week 8
2+
3+
Code to the sort function source from today's first half of the lesson: https://github.com/davidfurlong/sort-function-TDD

Week9/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
README.md
2+
3+
https://github.com/HackYourFuture/TicTacToeTDD
4+
https://github.com/HackYourFuture/OOP-Student-and-Teacher
5+
6+
rewatch the Hangouts session here: https://www.youtube.com/watch?v=oc9ogCJz9rYs

0 commit comments

Comments
 (0)