Skip to content

Commit

Permalink
Terminology change from homework to assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
stasel committed Nov 2, 2023
1 parent f8276e9 commit 91cf773
Show file tree
Hide file tree
Showing 67 changed files with 97 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module.exports = {
{
selector: "MemberExpression[property.name='innerText']",
message:
'The homework tests do not support `innerText`. Please replace with `textContent`.',
'The assignment tests do not support `innerText`. Please replace with `textContent`.',
},
{
selector: "MemberExpression[property.name='innerHTML']",
message:
'Please do not use `innerHTML` in the homework. Use `textContent` and/or `document.createElement()` instead.',
'Please do not use `innerHTML` in the assignment. Use `textContent` and/or `document.createElement()` instead.',
},
{
selector: 'ForInStatement',
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ dist
# test-runner
.recent.json
.disclaimer
@homework*
@assignment*
4 changes: 2 additions & 2 deletions .tours/test-runner.tour
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"file": "test-runner/test-runner-helpers.js",
"description": "Exercise files and folders must reside in a folder named **homework** and match a pattern that starts with the letters **ex** followed by a number and a dash. Each **homework** folder is a subfolder of a **Week𝑛** folder, which itself is a subfolder of a module specific top-level folder. For instance:\n\n```console\n1-JavaScript/\n Week3/\n homework/\n ex1-giveCompliment.js\n ...\n```\n\nNote that Windows paths contain back slashes that must be replaced with forward slashes as required by `fast-glob`.",
"description": "Exercise files and folders must reside in a folder named **assignment** and match a pattern that starts with the letters **ex** followed by a number and a dash. Each **assignment** folder is a subfolder of a **Week𝑛** folder, which itself is a subfolder of a module specific top-level folder. For instance:\n\n```console\n1-JavaScript/\n Week3/\n assignment/\n ex1-giveCompliment.js\n ...\n```\n\nNote that Windows paths contain back slashes that must be replaced with forward slashes as required by `fast-glob`.",
"line": 26,
"selection": {
"start": {
Expand Down Expand Up @@ -80,7 +80,7 @@
},
{
"file": "test-runner/index.js",
"description": "The students' exercises are in subfolders of the **homework** folder. For testing the \"happy path\" of the unit tests completed exercises can be placed in an alternate folder, the name of whhich can be defined through the `HOMEWORK_FOLDER` environment variable. The recommended folder for this purpose is **@homework** (git-ignored). The npm script **npm run testalt** sets the `HOMEWORK_FOLDER` environment variable to **@homework** before running the test.",
"description": "The students' exercises are in subfolders of the **assignment** folder. For testing the \"happy path\" of the unit tests completed exercises can be placed in an alternate folder, the name of whhich can be defined through the `ASSIGNMENT_FOLDER` environment variable. The recommended folder for this purpose is **@assignment** (git-ignored). The npm script **npm run testalt** sets the `ASSIGNMENT_FOLDER` environment variable to **@assignment** before running the test.",
"line": 198
},
{
Expand Down
6 changes: 3 additions & 3 deletions 1-JavaScript/Week2/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Homework Javascript Week 2
# Assignment Javascript Week 2

The homework for this week can be found in the `homework` folder.
The assignment for this week can be found in the `assignment` folder.

## Exercises

Starter code for all exercises is located in the `homework` folder. Modify the starter code so that the requirements of the exercise are met. At the bottom of some of the exercise files you will see a code snippet similar to:
Starter code for all exercises is located in the `assignment` folder. Modify the starter code so that the requirements of the exercise are met. At the bottom of some of the exercise files you will see a code snippet similar to:

```js
// ! Do not change or remove the code below
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-2-dog-years
Full description at: https://github.com/HackYourFuture/Assignment/tree/main/1-JavaScript/Week3#exercise-2-dog-years
You know how old your dog is in human years, but what about dog years? Let's
calculate it!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-3-be-your-own-fortune-teller
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week3#exercise-3-be-your-own-fortune-teller
Why pay a fortune teller when you can just program your fortune yourself?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-4-shopping-at-the-supermarket
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week3#exercise-4-shopping-at-the-supermarket
Let's do some grocery shopping! We're going to get some things to cook dinner
with. However, you like to spend money and always buy too many things. So when
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-5-improved-shopping-at-the-supermarket
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week3#exercise-5-improved-shopping-at-the-supermarket
In the current exercise we will rewrite the `addToShoppingCart` function to make
it pure. Do the following:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-6-total-cost-is
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week3#exercise-6-total-cost-is
You want to buy a couple of things from the supermarket to prepare for a party.
After scanning all the items the cashier wants to give you the total price, but
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week3#exercise-7-mind-the-privacy
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week3#exercise-7-mind-the-privacy
1. Complete the `filterPrivateData()` function. It should take a single
parameter: the array of employee records.
Expand Down
14 changes: 7 additions & 7 deletions 1-JavaScript/Week3/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Homework Javascript Week 3
# Assignment Javascript Week 3

## Exercises

The homework for this week can be found in the `homework` folder.
The assignment for this week can be found in the `assignment` folder.

> In this week we will be using a test library called [Jest](https://jestjs.io/) rather than using plain vanilla JavaScript as we did last week.
>
Expand Down Expand Up @@ -57,7 +57,7 @@ Your task in this assignment is to rewrite the function body so that it uses the
Expected output from a successful unit test:

```console
PASS 1-JavaScript/Week4/homework/ex1-doubleEvenNumbers.test.js
PASS 1-JavaScript/Week4/assignment/ex1-doubleEvenNumbers.test.js
✓ doubleEvenNumbers should take the even numbers and double them (2 ms)

Test Suites: 1 passed, 1 total
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('computeEarnings', () => {
1. Use the `npm test` command on the unmodified exercise and observe that both unit tests fail. (A green check mark indicates a _passed_ test, a red cross indicates a _failed_ test.)

```console
FAIL 1-JavaScript/Week4/homework/ex2-mondaysWorth.test.js
FAIL 1-JavaScript/Week4/assignment/ex2-mondaysWorth.test.js
computeEarnings
✕ should take two parameters (3 ms)
✕ should compute the earnings as a formatted Euro amount (1 ms)
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('computeEarnings', () => {
3. Run `npm test` again and observe that the first test now passes while the second one still fails.

```console
FAIL 1-JavaScript/Week4/homework/ex2-mondaysWorth.test.js
FAIL 1-JavaScript/Week4/assignment/ex2-mondaysWorth.test.js
computeEarnings
✓ should take two parameters (2 ms)
✕ should compute the earnings as a formatted Euro amount (1 ms)
Expand All @@ -185,7 +185,7 @@ describe('computeEarnings', () => {
5. Run `npm test` again and check whether the second unit test now passes. If not, fix the problem and try again.

```console
PASS 1-JavaScript/Week4/homework/ex2-mondaysWorth.test.js
PASS 1-JavaScript/Week4/assignment/ex2-mondaysWorth.test.js
computeEarnings
✓ should take two parameters (1 ms)
✓ should compute the earnings as a formatted Euro amount (1 ms)
Expand Down Expand Up @@ -491,7 +491,7 @@ Let's run the exercise using our convenience command `npm run it`:
```console
npm run it

> [email protected] it C:\Users\jimcr\dev\hackyourfuture\homework
> [email protected] it C:\Users\jimcr\dev\hackyourfuture\assignments
> node ./test-runner/run-it

? Rerun last test (1-Javascript, Week4, ex5-wallet)? No
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week4#exercise-1-the-odd-ones-out
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week4#exercise-1-the-odd-ones-out
The `doubleEvenNumbers` function returns only the even numbers in the array
passed as the `numbers` parameter and doubles them.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description atL https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week4#exercise-2-whats-your-monday-worth
Full description atL https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week4#exercise-2-whats-your-monday-worth
- Complete the function names `computeEarnings`. It should take an array of
tasks and an hourly rate as arguments and return a formatted Euro amount
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week4#exercise-3-lemon-allergy
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week4#exercise-3-lemon-allergy
Your mom bought you a basket of fruit, because you're doing so well in
HackYourFuture. How sweet of her!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/1-JavaScript/Week4#exercise-4-observable
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/1-JavaScript/Week4#exercise-4-observable
Complete the `createObservable()` function as follows:
Expand Down
6 changes: 3 additions & 3 deletions 2-Browsers/Week1/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Homework Browsers Week 1
# Assignment Browsers Week 1

## Deliverable Exercises

The homework for this week can be found in the `homework` folder.
The assignment for this week can be found in the `assignment` folder.

> :collision: **Important**
>
> In this homework you are not allowed to use `.innerHTML`. To create HTML elements, use `document.createElement()`. To set the text content of an element, use `.textContent`. The homework tests currently do not support `.innerText`.
> In this assignment you are not allowed to use `.innerHTML`. To create HTML elements, use `document.createElement()`. To set the text content of an element, use `.textContent`. The assignment tests currently do not support `.innerText`.
## Exercise 1: The book list

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//cspell: disable
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-1-the-book-list
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-1-the-book-list
I'd like to display my three favorite books inside a nice webpage!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-2-about-me
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-2-about-me
1. Using JavaScript, replace each of the spans (`nickname`, fav-food`,
`hometown`) with your own information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-3-the-logo-hijack
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-3-the-logo-hijack
1. Find out how to select the element that contains the Google logo, and store
it in a variable.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-4-whats-the-time
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-4-whats-the-time
1. Inside the `index.js`, complete the `addCurrentTime` to add the current time
to the webpage. Make sure it's written in the HH:MM:SS notation (hour, minute,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-5-the-cat-walk
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-5-the-cat-walk
1. Create a variable to store a reference to the `<img>` element.
2. Change the style of the `<img>` to have a `left` of `0px`, so that it starts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/2-Browsers/Week1#exercise-6-conways-game-of-life
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-6-conways-game-of-life
THIS IS A PREP EXERCISE FOR THE Q&A SESSION, IT SHOULD NOT BE PART OF THE HOMEWORK
THIS IS A PREP EXERCISE FOR THE Q&A SESSION, IT SHOULD NOT BE PART OF THE ASSIGNMENT
Adapted from: https://spicyyoghurt.com/tutorials/javascript/conways-game-of-life-canvas
Refactored from ES6 Class syntax to regular functions
Expand Down
6 changes: 3 additions & 3 deletions 3-UsingAPIs/Week1/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Homework Using APIs Week 1
# Assignment Using APIs Week 1

## Exercises

The homework for this week can be found in the `homework` folder.
The assignment for this week can be found in the `assignment` folder.

### Exercise 1: John who?

Expand Down Expand Up @@ -145,7 +145,7 @@ Since we want to practice with promises anyway, let's see what happens when we r

#### Bonus: Event Loop Experiments

> The event loop in JavaScript is not that easy to comprehend. But having a good grasp of how it works is vital for you to better understand how asynchronous code works. We will examine the event loop in the experiment below. If you are still left puzzled, we invite you to discuss it with your class mates on Slack and see if you can work it out together.
> The event loop in JavaScript is not that easy to comprehend. But having a good grasp of how it works is vital for you to better understand how asynchronous code works. We will examine the event loop in the experiment below. If you are still left puzzled, we invite you to discuss it with your cohort mates on Slack and see if you can work it out together.
So what do you think the JavaScript engine is doing while it is waiting for a `setTimeout()` to fire? Well, since it has nothing else waiting for it to do on its call stack, it is just sitting idle.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/3-UsingAPIs/Week1#exercise-1-john-who
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/3-UsingAPIs/Week1#exercise-1-john-who
Rewrite this function, but replace the callback syntax with the Promise syntax:
- Have the `getAnonName` function return a `new Promise`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/3-UsingAPIs/Week1#exercise-2-is-it-a-double-digit-number
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/3-UsingAPIs/Week1#exercise-2-is-it-a-double-digit-number
Complete the function called `checkDoubleDigits` such that:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/3-UsingAPIs/Week1#exercise-3-roll-a-die
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/3-UsingAPIs/Week1#exercise-3-roll-a-die
- Run the unmodified program and confirm that problem described occurs.
- Refactor the `rollDie()` function from callback-based to returning a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/3-UsingAPIs/Week1#exercise-4-throw-the-dice-for-a-poker-dice-game
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/3-UsingAPIs/Week1#exercise-4-throw-the-dice-for-a-poker-dice-game
For this exercise you should do the following:
- Refactor the `rollDice()` function to throw five dice in one go, by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/tree/main/3-UsingAPIs/Week1#exercise-5-throw-dice-sequentially
Full description at: https://github.com/HackYourFuture/Assignments/tree/main/3-UsingAPIs/Week1#exercise-5-throw-dice-sequentially
In the previous exercise we used `Promise.all()` to throw five dice in one go.
In the current exercise we will be throwing five dice one at a time, waiting
Expand Down
4 changes: 2 additions & 2 deletions 3-UsingAPIs/Week2/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Homework Using APIs Week 2
# Assignment Using APIs Week 2

## Exercises

The homework for this week can be found in the `homework` folder.
The assignment for this week can be found in the `assignment` folder.

### Exercise 1: Programmer Fun

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/blob/main/3-UsingAPIs/Week2/README.md#exercise-1-programmer-fun
Full description at: https://github.com/HackYourFuture/Assignments/blob/main/3-UsingAPIs/Week2/README.md#exercise-1-programmer-fun
1. Complete the function `requestData()` using `fetch()` to make a request to
the url passed to it as an argument. The function should return a promise.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
/*------------------------------------------------------------------------------
Full description at: https://github.com/HackYourFuture/Homework/blob/main/3-UsingAPIs/Week2/README.md#exercise-2-gotta-catch-em-all
Full description at: https://github.com/HackYourFuture/Assignments/blob/main/3-UsingAPIs/Week2/README.md#exercise-2-gotta-catch-em-all
Complete the four functions provided in the starter `index.js` file:
Expand Down
Loading

0 comments on commit 91cf773

Please sign in to comment.