Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
Points to Ponder in fundamentals-2, and some proofreading
Browse files Browse the repository at this point in the history
  • Loading branch information
ks927 committed Nov 16, 2017
1 parent 001aaaf commit 6f388ef
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 17 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All of our planned lessons have empty, or nearly empty "stub" files in the appro

Of course, we need people to volunteer to write the actual lessons, but there are other less involved ways you can contribute. Our main method of teaching is by linking to the _best_ external resources for each topic, so having a small army of contributors that are researching each topic and finding amazing free resources is incredibly valuable to the people who are actually going to write the lessons.

To help us out here, please pick a topic and start googling, narrow down the results by previewing them and picking the _best_ documentation, articles, youtube videos or tutorials on each topic and then leaving the resources \(with a small blurb or review\) in the comments of each lesson issue. We will be having great resources in multiple formats, so even if people have already found things, the more the better.
To help us out here, please pick a topic and start googling. Narrow down the results by previewing and picking the _best_ documentation, articles, youtube videos or tutorials on each topic. Then leave the resources \(with a small blurb or review\) in the comments of each lesson issue. We will have many great resources in multiple formats, so even if people have already found things, the more the better.

## Proofreading

Expand All @@ -20,13 +20,13 @@ Simply reading through the content we have already written and proofreading is v

One of the hardest parts of writing useful lessons is coming up with fun and relevant projects that hit the appropriate skills from the lesson and are not too difficult considering the level of the students at the time they reach the lesson! Projects should be a challenge, but the student should be able to envision a path to completion after finishing the lesson. Projects should also take into account both the lessons that students have already encountered and the lessons they have not! For example: we cannot ask students to manipulate the DOM in our earlier lessons before teaching them how to do it!

If you think you have a good idea for a project for a topic please either leave a comment on that lesson's issue or write the project specifications and do a Pull Request to that Lesson's stub file. Projects will eventually be separated into their own files \(they will be on a separate page when they make it to the website!\) but for ease of organization and planning we're leaving them inside the Lesson file for now.
If you think you have a good project idea for a topic, please either leave a comment on that lesson's issue or write the project specifications and do a Pull Request to that Lesson's stub file. Projects will eventually be separated into their own files \(they will be on a separate page when they make it to the website!\) but for ease of organization and planning we're leaving them inside the Lesson file for now.

We also are using this ever-growing repo of JavaScript exercises: https://github.com/TheOdinProject/javascript-exercises and could use help brainstorming more exercises that would be appropriate. Comment or create an issue on that repo if you have any bright ideas.

## Lesson Authoring

If you fancy yourself a good writer and want to write a lesson, please comment on an issue. Take a little time to read through a few of our other lessons to get a feel for the format and tone we use. Larger, longer lessons may eventually be split up into multiple parts \(i.e. multiple pages on our website\) but for now we are keeping everything consolidated into one file for ease of organization and planning.

Obviously writing can take some time because you will need to research and review plenty of resources, but if you accept an issue and then disappear it is hard to know whether we should find someone else to write or if you are just taking your time. If we do not hear from you at least every 5 days we will assume you have abandoned the project and look for someone else to complete it. We do not mean to disrespect, but we need to keep our project going!
Obviously writing can take some time because you will need to research and review plenty of resources. But if you accept an issue and then disappear, it is hard to know whether we should find someone else to write it or if you are just taking your time. If we do not hear from you at least every 5 days, we will assume you have abandoned the project and look for someone else to complete it. We do not mean to disrespect, but we need to keep our project going!

4 changes: 2 additions & 2 deletions JS101/fundamentals-1-project.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Let's practice.

Now it's time to slow down a little bit with the information overload and practice some of the things you've been learning. It is perfectly okay if you don't remember how to do any or all of it as you go.. in fact that is to be expected at this point! When you encounter something you can't remember just go back to the previous lessons and look it up. If you get stuck drop by the chatrooms and ask for help. Try not to get frustrated and be patient.
Now it's time to slow down a little bit with the information overload and practice some of the things you've been learning. It is perfectly okay if you don't remember how to do any or all of it as you go.. in fact that is to be expected at this point! When you encounter something you can't remember, just go back to the previous lessons and look it up. If you get stuck, drop by the chatrooms and ask for help. Try not to get frustrated and be patient.

## Your assignment

To give you a good bit of practice we have created an online classroom on repl.it. In general we believe that it's best to work on programming on your _own_ computer rather than in an online environment.. but we'll get to that soon enough.
To give you a good bit of practice, we have created an online classroom on repl.it. In general we believe that it's best to work on programming on your _own_ computer rather than in an online environment.. but we'll get to that soon enough.

The classroom and lessons can be found [here](https://repl.it/community/classrooms/34425). Do the lessons in order. You do not have to sign up or login to repl.it to do the course, but doing so makes the user experience a little nicer.. you can submit your answers to check them and see 'model solutions' on a couple of the lessons.

8 changes: 4 additions & 4 deletions JS101/fundamentals-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ The very first steps of learning any programming language are destined to be a l

### Step One

1. [This tutorial](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/A_first_splash) throws you into the deep end 🔥. The point of it is to give you a good feel of what you're going to be able to do with your Javascript skills, and how to think about breaking down a problem. You'll also get a good idea for what your code is going to end up looking like. You will not, however really learn a lot here because most of it will be over your head at this point. Don't sweat it. It's _just fine_ if you don't really understand what you're doing just yet. You'll get there.
1. [This tutorial](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/A_first_splash) throws you into the deep end 🔥. The point of it is to give you a good feel of what you're going to be able to do with your Javascript skills, and how to think about breaking down a problem. You'll also get a good idea for what your code is going to end up looking like. You will not, however, really learn a lot here because most of it will be over your head at this point. Don't sweat it. It's _just fine_ if you don't really understand what you're doing just yet. You'll get there.

### Variables
You can think of variables simply as "storage containers" for data in your code. Until recently there was only one way to declare and use a variable in Javascript (the `var` keyword) but the latest versions of Javascript include 2 more keywords that can be used depending on the situation. The following resources will tell you what you need to know!
You can think of variables simply as "storage containers" for data in your code. Until recently there was only one way to declare and use a variable in Javascript (the `var` keyword), but the latest versions of Javascript include 2 more keywords that can be used depending on the situation. The following resources will tell you what you need to know!

1. Read through [this variable tutorial](http://javascript.info/variables) as well. It covers the other methods of variable creation. __Be sure to do the Tasks__ at the end of this article! Information won't stick without practice!
2. There is one quirk that you should be aware of when it comes to declaring variables. In many cases, you won't have to worry about this too much at all, but when it comes up it can definitely be a frustrating experience to debug if you don't already know about it. Don't worry too much about it at this point, but read [this short article](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#var_hoisting) about variable hoisting, and keep it in the back of your mind for now.
3. At the risk of giving you too much information [This article](http://wesbos.com/javascript-scoping/) explains the main difference between Javascript's old `var` syntax and the newer `let` and `const`. You shouldn't be trying to internalize these small details yet because frankly, they're describing rules that you haven't encountered yet.
3. At the risk of giving you too much information, [This article](http://wesbos.com/javascript-scoping/) explains the main difference between Javascript's old `var` syntax and the newer `let` and `const`. You shouldn't be trying to internalize these small details yet because frankly, they're describing rules that you haven't encountered yet.

### Data types

Expand All @@ -154,7 +154,7 @@ Strings and numbers may be our building blocks but, as you can probably imagine,
1. [This tutorial](https://www.w3schools.com/js/js_arrays.asp) is a great introduction. Once you've gotten a handle on arrays in general, check out [this article](https://www.w3schools.com/js/js_array_methods.asp) about some of the special methods you can use to manipulate arrays... Don't forget to do the exercises at the end of each lesson! These fundamentals are something you'll use every day, so don't rush too much and miss out!

### Getting Help!
We've learned a lot! As we mentioned above, we don't expect that you will have retained all of this information on the first go through. Your next step then is to _practice_. The more you use this stuff, the better you'll retain it. However, as you begin trying to write some code you'll almost definitely realize that you have forgotten something along the way. Knowing where to look online is a pretty useful skill. Take a few minutes to check out the following sites. Get used to their layout and be ready to come right back to them when you discover you've lost something.
We've learned a lot! As we mentioned above, we don't expect that you will have retained all of this information on the first go through. Your next step then is to _practice_. The more you use this stuff, the better you'll retain it. However, as you begin trying to write some code, you'll almost definitely realize that you have forgotten something along the way. Knowing where to look online is a pretty useful skill. Take a few minutes to check out the following sites. Get used to their layout and be ready to come right back to them when you discover you've lost something.

1. [MDN](https://developer.mozilla.org/en-US/): this one should be familiar to you at this point... it's the same site as most of the tutorials we've directed you to so far. In addition to having great beginner tutorials, MDN also has very thorough and well-organized documentation that even the pros use from time to time.
2. [http://javascript.info/](http://javascript.info/), the other site we've linked to is another good resource. Most of the content takes the form of tutorials rather than documentation, but they're more concise and good for review... and while looking around, you might learn something else along the way which is never a bad thing.
Expand Down
130 changes: 127 additions & 3 deletions JS101/fundamentals-2.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,133 @@
Let's dive deeper into the fundamentals of JavaScript.

### Points to Ponder

1. Can you define the terms "operand", "unary" and "binary" in a Javascript context?
2. \(expand me please!\)
<details>
<summary>Can you define the terms "operand", "unary" and "binary" in a Javascript context?</summary>

* An operand is what operators are applied to. You can also call them arguments.
* `5 + 2 // 5 and 2 are operands`
* Unary operators have only one operand.

let x = 1
x = -x // unary "-" reverses the sign

* Binary operators have two operands.

let x = 4, y = 2
(y - x) // 2, binary minus subtracts values

</details>
<details>
<summary>How does the "binary +" affect string concatenation? How is the "unary +" used?</summary>

* Binary + is used to concatenate strings. If one of the two operands is a string, then the other will be converted to a string too.
* `1 + '2' // 12`
* "Unary +" has the same effect as the Number() operator. * `+true // 1`
* `+false // 0`
</details>

<details>
<summary>Why does the expression "let x = 2 * 2 + 1" calculate the numbers before assigning x?</summary>

* The assignment operator has a lower precedence than multiplication and addition.
</details>

<details>
<summary>How are remainders found in JavaScript?</summary>

* Use the `%` modulo operator.
* `25 % 7 // 4`
* `25 % 5 // 0`
</details>

<details>
<summary>How are numbers exponentiated in JavaScript?</summary>

* Use the `**` operator.
* `3 ** 2 // 9 (3*3)`
* `3 ** 3 // 27 (3*3*3)`
</details>

<details>
<summary>How are conditionals used in JavaScript?</summary>

* Use if to specify a block of code to be executed, if a specified condition is true
* Use else to specify a block of code to be executed, if the same condition is false
* Use else if to specify a new condition to test, if the first condition is false
* Use switch to specify many alternative blocks of code to be executed

if (condition) {
// block of code to run if condition is true
} else {
// block of code to run if condition is false
}

</details>

<details>
<summary>How are for loops used in JavaScript?</summary>

* A counter or initializer, which is initialized with a certain value — this is the starting point of the loop
* An exit-condition, which is the criteria under which the loop stops — usually the counter reaching a certain value.
* An iterator or final-expression, which generally increments the counter by a small amount on each successive loop, until it reaches the exit-condition.
* A set of curly braces in which a block of code is run.

for (initializer; exit-condition; final-expression) {
// code to run
}

</details>

<details>
<summary>How are while loops used?</summary>

* The initializer is set before the loop
* The loop runs _while_ the initializer hasn't reached the exit-condition
* The final-expression runs at the end of the code block, and brings the initializer closer to the exit-condition.

initializer
while(exit-condition) {
//code to run

final-expression
}

</details>

<details>
<summary>What is a function and why is it necessary?</summary>

* A function is a place to store a piece of code that does a single task inside a defined code block.
* This code can then be called anywhere by typing out a single command -- rather than retyping the same code multiple times.
</details>

<details>
<summary>What is the difference between a function and a method?</summary>

* They are theoretically the same thing, but built-in browser-functions that are stored inside objects are called methods.
</details>

<details>
<summary>How are functions invoked?</summary>

* By _calling_ the function name somewhere in the code followed by parentheses.
</details>

<details>
<summary>What is an anonymous function? How is it invoked?</summary>

* Anonymous functions are functions with no name.
* They can be invoked a couple of different ways:
* As an event handler -- the function would run when a button is clicked for example.
* By assigning the function to a variable and calling the variable with parentheses.
</details>

<details>
<summary>What is the difference between global scope and local scope?</summary>

* The top level scope outside of all your functions is the global scope. Values defined here are accessible throughout your code.
* Values defined within a function have local scope. They can only be accessed by that specific fuction.
</details>

### Operators and Comparisons

Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The following is a compilation of links, ideas and potential projects to complet
- StockPicker: Quandl is great for beginners who want to use financial information.
#### TDD in JS
- We should not assume that students will have had any exposure to TDD at all because they could be doing the JS only track.
- There are many Testing libraries out there, but I'm partial to `tape` so unless someone gives be a good reason to use something else (I'm open to it!!) that's what we'll go with. I prefer `tape` for it's simplicity.
- There are many Testing libraries out there, but I'm partial to `tape`, so unless someone gives me a good reason to use something else (I'm open to it!!) that's what we'll go with. I prefer `tape` for it's simplicity.
- Projects can be anything really... just focus on TDD.
- I presume these lessons will need to be written by us.
#### ES6
Expand Down
Loading

0 comments on commit 6f388ef

Please sign in to comment.