-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sdc-tools-sprint3and4
- Loading branch information
Showing
34 changed files
with
920 additions
and
266 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
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
43 changes: 43 additions & 0 deletions
43
common-content/en/module/js3/synchronous-execution/index.md
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 @@ | ||
+++ | ||
title = 'Synchronous execution' | ||
|
||
time = 10 | ||
emoji= '⏳' | ||
[objectives] | ||
1="Define asynchrony" | ||
2="Explain how synchronous execution works" | ||
[build] | ||
render = 'never' | ||
list = 'local' | ||
publishResources = false | ||
+++ | ||
|
||
We can handle latency using {{<tooltip title="asynchronous execution">}}Asynchronous execution is running code in a different order than it was written.{{</tooltip>}} To understand asynchrony we first need to be clear about {{<tooltip title="synchronous execution">}}Synchronous execution is running code in the order it is written.{{</tooltip>}}. | ||
|
||
We have written a lot of JavaScript programs that execute sequentially. This means that each line of code is run in order, one after the other. | ||
{{<columns>}} | ||
|
||
#### For example: | ||
|
||
```js | ||
console.log("first"); | ||
console.log("second"); | ||
console.log("third"); | ||
``` | ||
|
||
<---> | ||
|
||
#### Outputs: | ||
|
||
```console | ||
first | ||
second | ||
third | ||
``` | ||
|
||
{{</columns>}} | ||
Each line of code is run in order. This is synchronous execution. We do this because JavaScript is {{<tooltip title="single threaded">}} | ||
A single thread can do one thing at a time. JavaScript is a single threaded language. | ||
{{</tooltip>}}. | ||
|
||
When we call a function, the function will run to completion before the next line of code is executed. But what if we need to wait for something to happen? What if we need to wait for our data to arrive before we can show it? In this case, we can use **asynchronous execution**. |
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
56 changes: 56 additions & 0 deletions
56
common-content/en/module/piscine/practice-break-down/index.md
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,56 @@ | ||
+++ | ||
title = "Practice breaking down a requirement" | ||
time = 60 | ||
objectives = [ | ||
"Break down a requirement into approachable tasks.", | ||
"Coordinate multiple team members in executing tasks in parallel.", | ||
] | ||
[build] | ||
render = "never" | ||
list = "local" | ||
publishResources = false | ||
+++ | ||
|
||
In team projects, it's important that we break large tasks down into small tasks. | ||
|
||
It's also important that we can coordinate across our team. This requires having shared understanding of who will do what, and how the work we do will interact. | ||
|
||
Finally, it's important that we arrange tasks so your team isn't blocking yourselves, so you'll want to find ways of working on tasks in parallel. | ||
|
||
We will practice this together on the two of the requirements of the project: | ||
|
||
- Selecting a user must display the agenda for the relevant user (see manual testing below) | ||
- Submitting the form adds a new topic to revise for the relevant user only | ||
|
||
To complete these requirements we'd need to build most of the project! So we'll focus on simplified versions of these requirements: | ||
|
||
- When the page loads, display one revision date for one topic from in User 1's stored agenda | ||
- When clicking a button, store {{<tooltip title="hard-coded">}}Hard-coding refers to when developers directly write values or data into code, often replacing variables or user input with static values.{{</tooltip>}} data for User 1's agenda | ||
|
||
To complete the full requirements, you can build on the tasks we decide on today. | ||
|
||
{{<note type="exercise" title="Breaking down tasks">}} | ||
|
||
1. Set a timer for {{<timer>}}5{{</timer>}} | ||
2. Individually, write down all the tasks that would be needed to complete the simplified requirements above | ||
3. After the timer is up, go around the group and discuss the tasks you came up with. One of the volunteers should write the tasks on a whiteboard | ||
4. Volunteers, discuss any that you think might be missing or that might need breaking down further | ||
|
||
{{</note>}} | ||
|
||
Looking ahead to your coursework for the next week, one of your tasks will be to [Refine a ticket](https://github.com/CodeYourFuture/The-Piscine/issues/6). | ||
|
||
{{<note type="exercise" title="Refining tickets">}} | ||
|
||
1. Everyone read the [Refine a ticket coursework task](https://github.com/CodeYourFuture/The-Piscine/issues/6), for {{<timer>}}3{{</timer>}} minutes. | ||
2. Get into pairs. Each pair should then pick 2 of the tasks from the whiteboard (it doesn't matter if multiple pairs do the same task). Spend {{<timer>}}10{{</timer>}} minutes refining your tickets in your pairs. Make sure you work through **all** of the workflow points. | ||
3. Go around each pair in the group. The pair should pick 1 of their tasks and say what they think the priority, estimate, schedule and type of work the task is, and if there is anything they would need to know before starting the ticket. (Hint: the last point is **important**! Don't skip it!) | ||
4. As a group, pick a task (or two, depending on time) that needs more information. Spend {{<timer>}}10{{</timer>}} minutes discussing what actions you could take to ensure everyone has what they need to complete this task? | ||
|
||
{{</note>}} | ||
|
||
{{/* | ||
TODO: The Piscine is meant to be pure evaluation with no teaching. | ||
Ideally ITP would provide this experience so we wouldn't need to teach it in the Piscine. | ||
But right now ITP doesn't teach these skills, so we fill that gap so we're not testing people on things they don't know. | ||
*/}} |
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
Oops, something went wrong.