forked from DeNepo/welcome-to-js
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5cbf93
commit 627e516
Showing
85 changed files
with
6,492 additions
and
3,260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
/* What are Lenses? | ||
at HYF you will learn to code by studying code | ||
lenses help you study the same code in different ways | ||
each lens is a new way to see the same code | ||
each way of seeing helps you learn something new | ||
try out some lenses on the program below to see how lenses work | ||
you don't need to understand the code! | ||
right now focus on using lenses, you'll cover the JS later on | ||
type these words one at a time in the input field above: | ||
highlight, variables, flowchart, pseudo | ||
you can also combine lenses, try these combinations: | ||
pseudo highlight, pseudo parsons | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict'; | ||
|
||
/* Dynamic Study | ||
dynamic analysis is studying how a program behaves when you run it | ||
this includes things like: | ||
- using the program yourself | ||
- checking the console for helpful information | ||
- stepping through your code in a debugger or memory visualization tool | ||
- manually tracing the code like the computer would | ||
this helps you understand what happens in memory and the user's experience | ||
open your browser's console and try these dynamic lenses: | ||
run, trace | ||
(you'll learn how to understand the console output later) | ||
you'll explore dynamic study in depth later on | ||
including more lenses to help you visualize program memory | ||
for now just focus on the difference between STATIC and DYNAMIC | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict'; | ||
|
||
/* Static Study | ||
static analysis is when you study code WITHOUT running the program | ||
this includes things like: | ||
- reading the code (out loud) | ||
- discussing the code in groups | ||
- finding how the variables are used | ||
- understanding comments and variable names | ||
- studying the code's syntax | ||
- making sure you know each language feature used | ||
try out these different static-study lenses on this code: | ||
highlight, variables, flowchart, parsons, | ||
ask, blanks, pseudo highlight, pseudo parsons | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
/* The Study Lens | ||
the study lens is your home base for most examples and exercises | ||
it has an editor just like the one in VSCode (shortcuts, autocomplete, ...) | ||
from here you can edit the code, save your changes, and use other lenses | ||
try selecting a few lines of code and clicking a lens | ||
see >> OPTIONS << up top? explore it a bit | ||
this lets you configure the ?study environment | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
|
||
/* Local Configurations | ||
you may have noticed a lot of files named /study.json in this repository | ||
this is how you set default study configurations for each folder of code | ||
when you use the ?--defaults option, a file will open using the local configurations | ||
you can think of this like the suggested way to study each file | ||
but you can always change lenses if you want to | ||
and you can edit the study.json files to set your own defaults! | ||
most of the time exercises will open with ?--defaults | ||
which lens is the default for this folder? | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
/* URL Parameters | ||
most of the time you will be studying exercises in a separate tab | ||
to change lenses in a new tab you change the URL params and refresh | ||
try it out: | ||
find the URL bar at the top of this page | ||
find where it says "?--defaults" | ||
replace "?--defaults" with another lense like "?variables" | ||
press enter | ||
to combine lenses use "&": | ||
"?--defaults" -> "?pseudo&highlight" | ||
you can use your browser's navigation to go forwards and backwards | ||
just like a normal web page | ||
*/ | ||
|
||
let backwards = null; | ||
while (backwards === null) { | ||
backwards = prompt("enter something backwards, we'll reverse it"); | ||
console.log(backwards); | ||
} | ||
|
||
let fixed = ''; | ||
for (let character of backwards) { | ||
fixed = character + fixed; | ||
} | ||
console.log(fixed); | ||
|
||
let processed = '"' + backwards + '" -> "' + fixed + '"'; | ||
alert(processed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Study Lenses | ||
|
||
> Study code, not explanations. | ||
This folder is a short guide to using Study Lenses. Study Lenses are designed | ||
for exploring code at your own pace, so once you get how lenses work move on to | ||
the next chapters and study some code! | ||
|
||
Psst. This guide is best if you [open the README](./README.md?slides) | ||
|
||
--- | ||
|
||
<a class="study-lens" href="./1-what-are-lenses.js" target="_blank">1. What are | ||
Lenses?</a> | ||
|
||
--- | ||
|
||
<a class="study-lens" href="./2-dynamic-study.js" target="_blank">3. Dynamic | ||
Study</a> | ||
|
||
--- | ||
|
||
<a class="study-lens" href="./3-static-study.js" target="_blank">2. Static | ||
Study</a> | ||
|
||
--- | ||
|
||
<a class="study-lens" href="./4-the-study-lens.js?study" target="_blank">4. The | ||
Study Lens</a> | ||
|
||
--- | ||
|
||
<a class="study-lens" href="./5-local-configurations.js?--defaults" target="_blank">6. | ||
Local Configurations</a> | ||
|
||
--- | ||
|
||
<a class='study-lens' href="./6-url-parameters.js?--defaults" target="_blank">5. | ||
URL Parameters</a> | ||
|
||
--- | ||
|
||
<a class='study-lens' href="./?--defaults" target="_blank">Folders of Files</a> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"--defaults": { | ||
".md": "slides" | ||
} | ||
} |
2,954 changes: 0 additions & 2,954 deletions
2,954
1-what-is-programming/.assets/rhetorical-situation.svg
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
/* Mirror | ||
Data In: | ||
|
@@ -12,6 +10,7 @@ | |
Test Cases: | ||
*/ | ||
|
||
/* --- gather user input --- */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
/* Remove Spaces | ||
Data In: | ||
|
@@ -12,6 +10,7 @@ | |
Test Cases: | ||
*/ | ||
|
||
/* --- gather user input --- */ | ||
|
Oops, something went wrong.