Skip to content

Commit 8fa097a

Browse files
committed
rearrenged homework and added deadlines
1 parent d52c44e commit 8fa097a

5 files changed

Lines changed: 74 additions & 76 deletions

File tree

Week6/MAKEME.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Give feedback on `step 2` of `week 5` to one of your fellow students (do this by
1717

1818
## Step 2: Git Homework
1919

20+
_Deadline Saturday_
21+
2022
[Make these assignments](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md). For handing in homework follow the Forking workflow that is described in our lecture-3.md file of HackYourFuture’s Git repository (there is also a video that explains this).
2123

2224
## Step 3: Read
@@ -36,15 +38,17 @@ _Deadline Wednesday_
3638

3739
1\.We saw that we can pass functions as arguments to other functions. Your task is to write a function that takes another function as an argument and runs it.
3840

39-
function foo(func) {
41+
```js
42+
function foo(func) {
4043
// What to do here?
41-
}
44+
}
4245

43-
function bar() {
44-
console.log('Hello, I am bar!');
45-
}
46+
function bar() {
47+
console.log('Hello, I am bar!');
48+
}
49+
```
4650

47-
foo(bar);
51+
foo(bar);
4852

4953
2\.We learned a little bit about callbacks in JS. A callback is simply a function passed to another function that gets executed (run) after a potentially long running operation has completed. There is another function called `setTimeout` that will wait a specified period of time and then execute a function. For example:
5054

@@ -127,6 +131,8 @@ If you are confused please run the code and then consult the Google for "javaScr
127131

128132
## Step 5: Scope and Closures
129133

134+
_Deadline Saturday_
135+
130136
> Let's continue to learn a little more about scope and Closures.
131137
132138

Week6/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ In week seven we will discuss the following topics:
88
• apply
99
• bind
1010
• Code flow (order of execution)
11-
• Async VS Sync
11+
1212
```
1313

1414
### Here are resources that we like you to read as a preparation for the coming lecture:
1515

16-
#### Async VS Sync
17-
- Read about Asynchronous vs. Synchronous programming: http://www.hongkiat.com/blog/synchronous-asynchronous-javascript/
18-
1916
#### Closures and async code
2017
- [Why closures are helpful with async code](http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript)
2118

Week7/MAKEME.md

Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,99 +8,47 @@ Topics discussed this week:
88
• apply
99
• bind
1010
• Code flow (order of execution)
11-
• Async VS Sync
1211
```
1312

1413
>[Here](/Week7/README.md) you find the readings you have to complete before the eighth lecture.
1514
16-
## Step 1: Give feedback on Step 3 and 4 of last weeks homework.
15+
## Step 1: Give feedback on Step 4 and 5 of last weeks homework.
1716

1817
_Deadline Monday_
1918

2019
Give feedback on the SPA (Github API) and git branching homework of one of you fellow students. Please provide the feedback in an issue.
2120

2221
## Step 2: Issues
2322

23+
_Deadline Monday_
24+
2425
- Solve all your Git issues. DO NO CLOSE AN ISSUE WITHOUT AN EXPLANATION OR CODE COMMIT REFERENCING THAT ISSUE.
2526

2627

27-
## Step 3: Fix issues and API
28+
## Step 3: Fix issues
29+
30+
_Deadline Thursday_
2831

29-
- Fix the issues from the last week and make sure you explain how you fixed the issue in a comment (or commit message)
32+
- Fix the issues from the last weeks and make sure you explain how you fixed the issue in a comment (or commit message)
3033

3134
## Step 4: Some Challenges
3235

3336
_Deadline Saturday_
3437

3538
Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
3639

37-
## Step 5: Async challenge
38-
39-
1. Rewrite the code below to Async:
40-
41-
```js
42-
1.
43-
44-
let sum = calculateSum(2, 6);
45-
console.log(sum);
46-
47-
2.
48-
49-
let results = $.getJSON('http://myapi.com');
50-
showResults(results);
51-
52-
3.
53-
54-
let sum = calculateSum(2, 6);
55-
if (sum > 8) {
56-
console.log('larger than 8');
57-
}
58-
59-
4.
60-
61-
let data = $.getJSON('http://myapi.com');
62-
data = data.map(function (x) { return x * 8; });
63-
64-
writeDataToFile(data);
65-
```
66-
67-
68-
## Step 6: Some more JavaScript
69-
70-
_Deadline Saturday_
71-
72-
Make a website that fetches (= to get) data asynchronously.
73-
74-
1. Create a new website with external js file
75-
76-
2. Add a button (e.g. 'click me') that when clicked `console.logs` 'you clicked me!'
77-
78-
3. Create a function that fetches from [The Github API](https://developer.github.com/v3/). For example from [this page] (https://api.github.com/orgs/HackYourFuture/repos) (the one we used last week). For help on this check this [SO post](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)
79-
80-
4. Display the data that you get from the Github API on your web page.
81-
82-
5. Now link the two together: When you click the button -> get the data from the Github API and display it on your website
83-
84-
6. Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
85-
86-
7. BONUS: if you look at this:
87-
88-
```js
89-
https://api.github.com/repos/HackYourFuture/CommandLine
90-
```
91-
92-
You can see `CommandLine` in the URL. These are called "query parameters" and let us specify in detail what we want from the API. Play around with this. For example you can make two buttons that either get data for a specific repository, JavaScript or Node.js. Or go even more crazy and make users type in a search box 'JavaScript' and then send that to the API by changing the repository.
93-
94-
95-
## Step 7: **Some freeCodeCamp challenges:**
40+
Also make:
9641

9742
1. [Comparisons with the Logical And Operator](https://www.freecodecamp.com/challenges/comparisons-with-the-logical-and-operator)
9843

9944
2. [Record Collection](https://www.freecodecamp.com/challenges/record-collection)
10045

10146
3. [Iterate over Arrays with map](https://www.freecodecamp.com/challenges/iterate-over-arrays-with-map)
10247

103-
## Step 8: Read before next lecture
48+
## Step 5: TBA after hangout session.
49+
50+
51+
## Step 6: Read before next lecture
10452

10553
_Deadline Sunday morning_
10654

Week7/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ In week eight we will discuss the following topics:
55
• Structure for a basic SPA
66
• XMLHttpRequests
77
• API calls
8+
• Async VS Sync
89
```
910

1011
### Here are resources that we like you to read as a preparation for the coming lecture:
1112

13+
#### Async VS Sync
14+
- Read about Asynchronous vs. Synchronous programming: http://www.hongkiat.com/blog/synchronous-asynchronous-javascript/
15+
1216
#### APIs
1317
- Read about APIS: https://www.programmableweb.com/api-university/what-are-apis-and-how-do-they-work
1418

Week8/MAKEME.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,64 @@ Topics discussed this week:
55
• Structure for a basic SPA
66
• XMLHttpRequests
77
• API calls
8+
• Async VS Sync
89
```
910

1011

1112
>[Here](/Week8/README.md) you find the readings you have to complete before the ninth lecture.
1213
13-
## Step 1: Feedback step 4 and 6 week 7
14+
## Step 1: Feedback
1415

15-
Give feedback on the SPA (Github API) and git branching homework of one of you fellow students. Please provide the feedback in an issue.
16+
_Deadline Monday_
17+
18+
Please provide feedback in an issue.
19+
20+
_Deadline Monday_
1621

1722
## Step 2: FINISH ALL YOUR JAVASCRIPT HOMEWORK
1823

24+
_Deadline Saturday_
25+
1926
:point_up:
2027

28+
## Step 3: Async challenge
29+
30+
_Deadline Saturday_
31+
32+
1. Rewrite the code below to Async:
33+
34+
```js
35+
1.
36+
37+
let sum = calculateSum(2, 6);
38+
console.log(sum);
39+
40+
2.
41+
42+
let results = $.getJSON('http://myapi.com');
43+
showResults(results);
44+
45+
3.
46+
47+
let sum = calculateSum(2, 6);
48+
if (sum > 8) {
49+
console.log('larger than 8');
50+
}
51+
52+
4.
53+
54+
let data = $.getJSON('http://myapi.com');
55+
data = data.map(function (x) { return x * 8; });
56+
57+
writeDataToFile(data);
58+
```
59+
60+
2161

2262
## Step 4: SPA :sweat_drops:
63+
64+
_Deadline Saturday_
65+
2366
You are going to write a SPA (Single Page Application) that uses the [Github API](https://developer.github.com/guides/getting-started/). Make sure that your app uses a logical pattern just like [this codepen](http://codepen.io/Razpudding/pen/MmVpeW).
2467

2568
Just like last week:

0 commit comments

Comments
 (0)