Skip to content
This repository was archived by the owner on Oct 26, 2020. It is now read-only.

Commit 087464c

Browse files
committed
Inital commit
0 parents  commit 087464c

File tree

107 files changed

+3246
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3246
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/pull_request_template.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Your Details
2+
3+
Your Name:
4+
Your City:
5+
Your Slack Name:
6+
7+
# Homework Details
8+
9+
Module:
10+
Week:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
package.json
3+
package-lock.json

BEFORE_YOU_START.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Instructions
2+
3+
Before you start your homework you should make sure you have created a branch for your work.
4+
5+
You can find instructions for submitting your homework here.
6+
7+
- Github Desktop: https://docs.codeyourfuture.io/students/guides/submitting-homework
8+
- Command Line: https://docs.codeyourfuture.io/students/guides/making-a-pull-request
9+
10+
You should create a new branch for each week of your homework

MENTORS.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Guidelines
2+
3+
## Week Mapping
4+
5+
This repository has an unusual numbering system compared to the weeks we teach
6+
7+
- JavaScript Core 1 Week 1 -> `Week 1`
8+
- JavaScript Core 1 Week 2 -> `Week 2`
9+
- JavaScript Core 1 Week 3 -> `Week 3`
10+
- JavaScript Core 2 Week 1 -> `Week 4`
11+
- JavaScript Core 2 Week 2 -> `Week 5`
12+
- JavaScript Core 2 Week 3 -> `Week 6`
13+
- JavaScript Core 3 Week 1 -> `Week 7`
14+
- JavaScript Core 3 Week 2 -> `Week 8`
15+
- JavaScript Core 3 Week 3 -> `Week 9`
16+
17+
TO DO - Move each of these into their own folder corresponding to their module number and rename to be more sensible. This must be done while students are not working on the repo to avoid conflicts.
18+
19+
## Reviewing students homework
20+
21+
1. Go to https://github.com/CodeYourFuture/js-exercises/pulls
22+
2. Find the PR opened by the student you are designated to help
23+
3. If your student has not opened a PR, ask them to open a PR following the instructions in the README
24+
4. Assign yourself to your student's PR so that other mentors know that your student has a reviewer
25+
5. Go to the files tab in the PR and start a review. The review should contain:
26+
27+
- Inline comments that:
28+
- Praise the student for showing initiative or creativity beyond the lesson
29+
- Point out mistakes or bad practises
30+
- Explain problems that could be caused by bad code
31+
- Ask why a solution might not work
32+
- Offer pointers or tips for a better solution
33+
- An overall comment (when you click the review changes button) that:
34+
- Praises the student for their effort/progress
35+
- Let's them know if you've asked them to make changes
36+
- Highlights any themes that need particular attention, if necessary
37+
38+
6. Submit the review. As long as the student has attempted the homework, choose the option to accept changes so that they get a nice green tick (even if you are suggesting changes).
39+
7. Add a label to the PR saying `reviewed`
40+
41+
Example PR review: https://github.com/CodeYourFuture/js-exercises/pull/23#pullrequestreview-100326735
42+
43+
Note: this review was written for a student who was advancing quickly so the comments and suggestions to learn additional language features are tailored accordingly.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# JavaScript exercises
2+
3+
1. Fork this repo
4+
2. Clone it to your machine
5+
3. Open it in your code editor.
6+
4. In the terminal, run this command to add CodeYourFuture as an `upstream` remote.
7+
`git remote add upstream git@github.com:CodeYourFuture/js-exercises.git`
8+
5. Run the command `git remote -v`. You should have two remotes:
9+
10+
* `origin` pointing to your github repo, and
11+
* `upstream` pointing to CodeYourFuture
12+
13+
During the class (and for homework), we will go through each folder, reading the README and completing the exercises.
14+
15+
For **homework**, we expect you to `add` and `commit` your changes, and `push` them to your own repo (`origin`). You will then need to open a `pull request` so we can review your code.
16+
17+
### Opening a pull request
18+
19+
A pull request is a request to merge one branch into another. In this case you will request to have the `master` branch of your repo, merged into the `master` branch of this (`upstream`) repo.
20+
21+
We won't actually merge your branch, but the pull request will allow us to view and comment on your work.
22+
23+
1. Add the files you have changed using `git add .`
24+
2. Commit your changes using `git commit` (you can add and commit changes multiple times as you complete exercises)
25+
3. Push your changes to your own repo using `git push` (this automatically pushes to the `origin` remote)
26+
4. Go to https://github.com/CodeYourFuture/js-exercises and click the **New pull request** button (this create a request to merge your `origin/master` to our `remote/master`)
27+
5. Give your pull request a title e.g. `Daniel's homework`
28+
6. Click **Create pull request**

week-1/Homework/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Homework
2+
3+
Like learning a musical instrument, programming requires daily practise.
4+
5+
The exercises are split into two folders: `mandatory` and `extra`. All homework in the `mandatory` section **must** be completed for homework by the following Sunday. The `extra` folder contains exercises that you can complete to challenge yourself, but are not required for the following Sunday.
6+
7+
## Instructions for submission
8+
9+
For your homework, we'll be using **test driven development** to check your answers. Test driven development (or TDD) is the practice of writing tests for your code first, and then write your code to pass those tests. This is a very useful way of writing good quality code and is used in a lot of industries. You don't have to worry about knowing how this works, but if you're curious, engage with a volunteer to find out more! :)
10+
11+
1. Complete the challenges in each file and save it once you're happy with your changes
12+
2. Run the script to check the results against the tests - all tests should read PASSED if you completed the challenges correctly. If a test reads FAILED, find the associated test to identify which function failed and fix it.
13+
3. Raise a PR once you're happy with the quality of your code.
14+
- You can find out how to do this [here](https://docs.codeyourfuture.io/students/guides/submitting-homework)
15+
16+
## Reading List
17+
18+
To challenge yourself even further, you can get ahead for next week's class by reading some of the below documentation:
19+
20+
- [ ] Loops in JS: https://javascript.info/while-for
21+
- [ ] Switch statements: https://javascript.info/switch
22+
- [ ] Comparisons in JS: https://javascript.info/comparison
23+
- [ ] Logical operators in JS: https://javascript.info/logical-operators
24+
- [ ] More on operators: https://javascript.info/operators
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
There are some tools that will help you to write code. One of these, [Prettier](https://prettier.io/), formats your code, making it easier for you and others to read.
2+
3+
### 1. Install prettier
4+
5+
* In Visual Studio open the extensions panel (see https://code.visualstudio.com/docs/editor/extension-gallery#_browse-and-install-extensions)
6+
* Search for `Prettier - Code formatter`
7+
* Click install on the top result
8+
9+
### 2. Enable formatting on save
10+
11+
* In Visual Studio open the settings file (see https://code.visualstudio.com/docs/getstarted/settings#_creating-user-and-workspace-settings)
12+
* Search for `editor format`
13+
* Set `editor.formatOnSave` and `editor.formatOnPaste` to true
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
It is programming tradition that the first thing you do in any language is make it output 'Hello world!'.
2+
3+
We'll do this in JavaScript, using something called `console.log()`.
4+
5+
Inside of `exercise.js` there's a line of code that will print "Hello world!".
6+
7+
### 1. Run the program
8+
9+
* Open a terminal window
10+
* Change directory to this folder (`cd week-1/C-hello-world`)
11+
* Run the program using node (`node exercise.js`)
12+
13+
### 2. Experiment
14+
15+
* Try to `console.log()` something different. For example, 'Hello World. I just started learning JavaScript!'.
16+
* Try to console.log() several things at once.
17+
* What happens when you get rid of the quote marks?
18+
* What happens when you console.log() just a number without quotes?
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello world");

0 commit comments

Comments
 (0)