Skip to content

Commit fcabb6a

Browse files
committed
Merge branch 'source' into part12-spanish
2 parents b84dc2a + 2fe640f commit fcabb6a

File tree

26 files changed

+32
-34
lines changed

26 files changed

+32
-34
lines changed

src/content/0/en/part0b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ We can try going to the address <https://studies.cs.helsinki.fi/exampleapp/data.
181181

182182
![Raw JSON Data](../../images/0/10e.png)
183183

184-
There we find the notes in [JSON](https://en.wikipedia.org/wiki/JSON) "raw data". By default, Chromium-based browsers are not too good at displaying JSON data. Plugins can be used to handle the formatting. Install, for example, [JSONVue](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc) on Chrome, and reload the page. The data is now nicely formatted:
184+
There we find the notes in [JSON](https://en.wikipedia.org/wiki/JSON) "raw data". By default, Chromium-based browsers are not too good at displaying JSON data. Plugins can be used to handle the formatting. Install, for example, [JSONView](https://chromewebstore.google.com/detail/gmegofmjomhknnokphhckolhcffdaihd) on Chrome, and reload the page. The data is now nicely formatted:
185185

186186
![Formatted JSON output](../../images/0/11e.png)
187187

src/content/0/fi/osa0b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Sivun https://studies.cs.helsinki.fi/exampleapp/ avaaminen selaimessa saa siis a
7070

7171
![](../../images/0/7m.png)
7272

73-
Sekvenssikaavio kuvaa selaimen (browser) ja palvelimen (server) välisen kommunikaation aikajärjestyksessä "ylhäältä alaspäin", eli ylimpänä on ensin selaimen ensin lähettämä pyyntö, jonka jälkeen tulee palvelimen vastaus tähän pyyntöön ja tämän jälkeen selaimen seuraava pyyntö jne.
73+
Sekvenssikaavio kuvaa selaimen (browser) ja palvelimen (server) välisen kommunikaation aikajärjestyksessä "ylhäältä alaspäin", eli ylimpänä on ensin selaimen lähettämä pyyntö, jonka jälkeen tulee palvelimen vastaus tähän pyyntöön ja tämän jälkeen selaimen seuraava pyyntö jne.
7474

7575
Ensin selain tekee palvelimelle HTTP GET ‑pyynnön, jonka avulla se hakee sivun HTML-koodin. HTML-koodissa olevan <i>img</i>-tagin ansiosta selain hakee palvelimelta kuvan <i>kuva.png</i>. Selain renderöi HTML-kielellä muotoillun sivun ja kuvan näytölle. Vaikka käyttäjä ei sitä helposti huomaa, alkaa sivu renderöityä näytölle jo ennen kuvan hakemista.
7676

src/content/1/en/part1a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ The function is then assigned to a constant variable <i>App</i>:
142142
const App = ...
143143
```
144144

145-
There are a few ways to define functions in JavaScript. Here we will use [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), which are described in a newer version of JavaScript known as [ECMAScript 6](http://es6-features.org/#Constants), also called ES6.
145+
There are a few ways to define functions in JavaScript. Here we will use [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), which are described in a newer version of JavaScript known as [ECMAScript 6](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const), also called ES6.
146146

147147
Because the function consists of only a single expression we have used a shorthand, which represents this piece of code:
148148

src/content/1/en/part1d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ Programming is hard, that is why I will use all the possible means to make it ea
11281128

11291129
### Utilization of Large language models
11301130

1131-
Large language models such as [ChatGPT](https://chat.openai.com/auth/login), [Claude](https://claude.ai/) and [GitHub Copilot](https://github.com/ features/copilot) have proven to be very useful in software development.
1131+
Large language models such as [ChatGPT](https://chat.openai.com/auth/login), [Claude](https://claude.ai/) and [GitHub Copilot](https://github.com/features/copilot) have proven to be very useful in software development.
11321132

11331133
Personally, I mainly use Copilot, which integrates seamlessly with VS Code thanks to the [plugin](https://visualstudio.microsoft.com/github-copilot/).
11341134

src/content/1/es/part1b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ Cuando se trata de sintaxis, las clases y los objetos creados a partir de ellos
518518

519519
La introducción de la sintaxis de clases fue una adición controvertida. Consulta [No es impresionante: clases de ES6](https://github.com/petsel/not-awesome-es6-classes) o [¿Es la "clase" en ES6 la nueva parte "mala"?](Https://medium.com/@rajaraodv/is-class-in-es6-the-new-bad-part-6c4e6fe1ee65) para obtener más detalles.
520520

521-
La sintaxis de la clase ES6 se usa mucho en React "antiguo" y también en Node.js, por lo que comprenderlo es beneficioso incluso en este curso. Sin embargo, dado que estamos usando la nueva función [Hooks](https://es.react.dev/reference/react) de React a lo largo de este curso, no tenemos un uso concreto para la sintaxis de clases de JavaScripts.
521+
La sintaxis de la clase ES6 se usa mucho en React "antiguo" y también en Node.js, por lo que comprenderlo es beneficioso incluso en este curso. Sin embargo, dado que estamos usando la nueva funcionalidad [Hooks](https://es.react.dev/reference/react) de React a lo largo de este curso, no tenemos un uso concreto para la sintaxis de clases de JavaScript.
522522

523523
### Materiales JavaScript
524524

src/content/11/en/part11c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Next step is to automate the deployment. There are two options, a ready-made cus
277277

278278
<strong>Deployment with custom action</strong>
279279

280-
Go to GitHub Actions [marketplace](https://github.com/marketplace) and search for action for our purposes. You might search with <i>render deploy</i>. There are several actions to choose from. You can pick any. Quite often the best choice is the one with the most stars. It is also a good idea to look if the action is actively maintained (time of the last release) and does it has many open issues or pull requests.
280+
Go to GitHub Actions [marketplace](https://github.com/marketplace) and search for action for our purposes. You might search with <i>render deploy</i>. There are several actions to choose from. You can pick any. Quite often the best choice is the one with the most stars. It is also a good idea to look if the action is actively maintained (time of the last release) and does it have many open issues or pull requests.
281281

282282
**Warning**: for some reason, the most starred option [render-action](https://github.com/Bounceapp/render-action) was very unreliable when the part was updated (16th Jan 2024), so better avoid that. If you end up with too much problems, the deploy hook might be a better option!
283283

src/content/12/en/part12b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ This file will initialize the database with a user and a few todos. Next, we nee
425425

426426
We could create a new image FROM mongo and COPY the file inside, or we can use a [bind mount](https://docs.docker.com/storage/bind-mounts/) to mount the file <i>mongo-init.js</i> to the container. Let's do the latter.
427427

428-
Bind mount is the act of binding a file (or directory) on the host machine to a file (or directory) in the container. A bind mount is done by adding a _-v_ flag with _container run_. The syntax is _-v FILE-IN-HOST:FILE-IN-CONTAINER_. Since we already learned about Docker Compose let's skip that. The bind mount is declared under key <i>volumes</i> in docker-compose-yml. Otherwise the format is the same, first host and then container:
428+
Bind mount is the act of binding a file (or directory) on the host machine to a file (or directory) in the container. A bind mount is done by adding a _-v_ flag with _container run_. The syntax is _-v FILE-IN-HOST:FILE-IN-CONTAINER_. Since we already learned about Docker Compose let's skip that. The bind mount is declared under key <i>volumes</i> in docker-compose.dev.yml. Otherwise the format is the same, first host and then container:
429429

430430
```yml
431431
mongo:

src/content/13/en/part13c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,14 +1335,14 @@ const adminUsers = await User.scope('admin').findAll()
13351335
const disabledUsers = await User.scope('disabled').findAll()
13361336
13371337
// users with the string jami in their name
1338-
const jamiUsers = User.scope({ method: ['name', '%jami%'] }).findAll()
1338+
const jamiUsers = await User.scope({ method: ['name', '%jami%'] }).findAll()
13391339
```
13401340
13411341
It is also possible to chain scopes:
13421342
13431343
```js
13441344
// admins with the string jami in their name
1345-
const jamiUsers = User.scope('admin', { method: ['name', '%jami%'] }).findAll()
1345+
const jamiUsers = await User.scope('admin', { method: ['name', '%jami%'] }).findAll()
13461346
```
13471347
13481348
Since Sequelize models are normal [JavaScript classes](https://sequelize.org/master/manual/model-basics.html#taking-advantage-of-models-being-classes), it is possible to add new methods to them.

src/content/2/en/part2a.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ The exercises are submitted **One part at a time**. When you have submitted the
581581

582582
Note that this part has more exercises than the ones before, so <i>do not submit</i> until you have done all the exercises from this part you want to submit.
583583

584-
<h4>2.1: Course information step6</h4>
584+
<h4>2.1: Course information step 6</h4>
585585

586586
Let's finish the code for rendering course contents from exercises 1.1 - 1.5. You can start with the code from the model answers. The model answers for part 1 can be found by going to the [submission system](https://studies.cs.helsinki.fi/stats/courses/fullstackopen), clicking on <i>my submissions</i> at the top, and in the row corresponding to part 1 under the <i>solutions</i> column clicking on <i>show</i>. To see the solution to the <i>course info</i> exercise, click on _index.js_ under <i>kurssitiedot</i> ("kurssitiedot" means "course info").
587587

@@ -647,13 +647,13 @@ The application must work <i>regardless of the number of parts a course has</i>,
647647

648648
Ensure that the console shows no errors!
649649

650-
<h4>2.2: Course information step7</h4>
650+
<h4>2.2: Course information step 7</h4>
651651

652652
Show also the sum of the exercises of the course.
653653

654654
![sum of exercises added feature](../../images/teht/9e.png)
655655

656-
<h4>2.3*: Course information step8</h4>
656+
<h4>2.3*: Course information step 8</h4>
657657

658658
If you haven't done so already, calculate the sum of exercises with the array method [reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce).
659659

@@ -675,7 +675,7 @@ const total = parts.reduce((s, p) => {
675675

676676
**Not working? :** Use your search engine to look up how _reduce_ is used in an **Object Array**.
677677

678-
<h4>2.4: Course information step9</h4>
678+
<h4>2.4: Course information step 9</h4>
679679

680680
Let's extend our application to allow for an <i>arbitrary number</i> of courses:
681681

src/content/2/en/part2b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Note the use of the React developer tools extension in the picture above!
461461

462462
<h4>2.7: The Phonebook Step 2</h4>
463463

464-
Prevent the user from being able to add names that already exist in the phonebook. JavaScript arrays have numerous suitable [methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) for accomplishing this task. Keep in mind [how object equality works](https://www.joshbritz.co/posts/why-its-so-hard-to-check-object-equality/) in Javascript.
464+
Prevent the user from being able to add names that already exist in the phonebook. JavaScript arrays have numerous suitable [methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) for accomplishing this task. Keep in mind [how object equality works](https://www.joshbritz.co/blog/why-its-so-hard-to-check-object-equality/) in Javascript.
465465

466466
Issue a warning with the [alert](https://developer.mozilla.org/en-US/docs/Web/API/Window/alert) command when such an action is attempted:
467467

0 commit comments

Comments
 (0)