You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,16 @@ We really appreciate that you are considering contributing! There are many ways
6
6
7
7
1. Fork the repository
8
8
2. Clone your fork
9
-
3. Verify that you are running Node version 10 ([NVM](https://github.com/nvm-sh/nvm) recommended for managing node versions)
9
+
3. Verify that you are running Node version 10 ([NVM](https://github.com/nvm-sh/nvm) recommended for managing node versions, with it you can run `nvm use` to activate correct node version)
10
10
4. Install dependencies with `npm install`
11
11
5. Start the application with `npm start`
12
12
6. Application will be available at <http://localhost:8000>
13
13
14
14
# Setting up the PR
15
15
16
-
1. Prettify your code with `npm run format`
17
-
2. Create a new branch for your changes
18
-
3. Create the PR from that branch to the source branch
19
-
4. If your pull request is for a specific part of the course material, please add a corresponding label to your pull request (eg. "Part 3")
16
+
1. Create a new branch for your changes
17
+
2. Create the PR from that branch to the source branch
18
+
3. If your pull request is for a specific part of the course material, please add the part number to the beginning of the title (eg. "**Part 3a:** Fix broken link")
Copy file name to clipboardExpand all lines: src/content/0/fi/osa0a.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,6 +275,7 @@ Kurssilla ei ole enää vuosittaisia versiota. Kurssi on siis käynnissä koko a
275
275
Muutoksista huolimatta <i>kaikki jo tehdyt palautukset säilyvät voimassa</i>, eli voit jatkaa kurssia päivityksistä huolimatta normaaliin tapaan.
276
276
277
277
Viimeaikaisia isompia muutoksia
278
+
- Osa 6 (12.10.2025): Jest korvattu Vitestillä. Axios korvattu Fetch API:lla.
278
279
- Osa 5 (21.8.2025): React päivitetty versioon 19. Proptypes ja forwardRef poistuneet käytöstä. Eslint-konfiguraatiot päivitetty
279
280
- Osa 4 (13.8.2025): Express päivitetty versioon 5 ja kirjasto express-async-errors poistettu osasta 4b
280
281
- Osa 9 (28.8.2024): Zod-kirjasto datan validointiin
@@ -326,7 +327,7 @@ Asenna myös joku järkevä web-devausta tukeva tekstieditori. Enemmän kuin suo
326
327
327
328
Älä koodaa nanolla, Notepadilla tai Geditillä. Myöskään NetBeans ei ole omimmillaan web-devauksessa, ja se on myös turhan raskas verrattuna esim. Visual Studio Codeen.
328
329
329
-
Asenna koneeseesi heti myös [Node.js](https://nodejs.org/en/). Materiaalia ollaan päivittämässä Noden versioon v22. Osat 0-5 on tehty käyttäen Noden versiota 22.3.0, osa 10 käyttäen versiota 20.11.0 ja loput osat käyttäen versiota 18.13.0. Käytä aina vähintään yhtä tuoretta Node-versiota. Asennusohjeita on [Node.js:n sivuilla](https://nodejs.org/en/download/package-manager/).
330
+
Asenna koneeseesi heti myös [Node.js](https://nodejs.org/en/). Materiaalia ollaan päivittämässä Noden versioon v22. Osat 0-6 on tehty käyttäen Noden versiota 22, osa 10 käyttäen versiota 20.11.0 ja loput osat käyttäen versiota 18.13.0. Käytä aina vähintään yhtä tuoretta Node-versiota. Asennusohjeita on [Node.js:n sivuilla](https://nodejs.org/en/download/package-manager/).
330
331
331
332
Noden myötä koneelle asentuu myös [npm](https://www.npmjs.com/get-npm) (alunperin lyhennelmä <i>Node Package Manager</i> ‑nimelle), jota tulemme tarvitsemaan kurssin aikana aktiivisesti. Tuoreen Noden kera asentuu myös [npx](https://www.npmjs.com/package/npx), jota tarvitaan myös muutaman kerran.
Let's answer the questions presented by the tool as follows:
21
+
22
+

23
+
24
+
We have now created an application named <i>part1</i>. The tool could have also installed the required dependencies and started the application automatically if we had answered "Yes" to the question "Install with npm and start now?" However, we will perform these steps manually so we can see how they are done.
25
+
26
+
Next, let's move into the application's directory and install the required libraries:
27
+
24
28
```bash
25
-
cdintrodemo
29
+
cdpart1
26
30
npm install
27
31
```
28
32
29
-
The application is started as follows
33
+
The application is started as follows:
30
34
31
35
```bash
32
36
npm run dev
@@ -87,7 +91,7 @@ By default, the file <i>index.html</i> doesn't contain any HTML markup that is v
**NB**: <em>export</em> at the bottom is left out in these <i>examples</i>, now and in the future. It is still needed for the code to work
289
293
290
-
Writing components with React is easy, and by combining components, even a more complex application can be kept fairly maintainable. Indeed, a core philosophy of React is composing applications from many specialized reusable components.
294
+
Writing components with React is easy, and by combining components, an even more complex application can be kept fairly maintainable. Indeed, a core philosophy of React is composing applications from many specialized reusable components.
291
295
292
296
Another strong convention is the idea of a <i>root component</i> called <i>App</i> at the top of the component tree of the application. Nevertheless, as we will learn in [part 6](/en/part6), there are situations where the component <i>App</i> is not exactly the root, but is wrapped within an appropriate utility component.
Copy file name to clipboardExpand all lines: src/content/1/en/part1c.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -631,7 +631,7 @@ Since we now have an easily reusable <i>Button</i> component, we've also impleme
631
631
The event handler is passed to the <i>Button</i> component through the _onClick_ prop. When creating your own components, you can theoretically choose the prop name freely. However, our naming choice for the event handler was not entirely arbitrary.
632
632
633
633
React's own official [tutorial](https://react.dev/learn/tutorial-tic-tac-toe) suggests:
634
-
"In React, it’s conventional to use _onSomething_ names for props which take functions which handle events and handleSomething for the actual function definitions which handle those events."
634
+
"In React, it’s conventional to use _onSomething_ names for props which take functions which handle events and _handleSomething_ for the actual function definitions which handle those events."
Copy file name to clipboardExpand all lines: src/content/1/en/part1d.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -315,7 +315,7 @@ Even though a new value was set for _left_ by calling _setLeft(left + 1)_, the o
315
315
setTotal(left + right)
316
316
```
317
317
318
-
The reason for this is that a state update in React happens [asynchronously](https://react.dev/learn/queueing-a-series-of-state-updates), i.e. not immediately but "at some point" before the component is rendered again.
318
+
The reason for this is that a state update in React happens [asynchronously](https://react.dev/learn/queueing-a-series-of-state-updates), i.e. not immediately but "at some point" after the current component function is finished, before the component is rendered again.
319
319
320
320
We can fix the app as follows:
321
321
@@ -1084,7 +1084,7 @@ const App = () => {
1084
1084
}
1085
1085
```
1086
1086
1087
-
The application still appears to work, but **don't implement components like this!** Never define components inside of other components. The method provides no benefits and leads to many unpleasant problems. The biggest problems are because React treats a component defined inside of another component as a new component in every render. This makes it impossible for React to optimize the component.
1087
+
The application still appears to work, but **do not implement components like this!** Never define components inside of other components. The method provides no benefits and only leads to problems. One such problem is that React will treat a component defined inside of another component as a "new component" in every render. This makes it impossible for React to optimize the component.
1088
1088
1089
1089
Let's instead move the <i>Display</i> component function to its correct place, which is outside of the <i>App</i> component function:
1090
1090
@@ -1125,24 +1125,24 @@ You may find the following links useful:
1125
1125
- The [official React documentation](https://react.dev/learn) is worth checking out at some point, although most of it will become relevant only later on in the course. Also, everything related to class-based components is irrelevant to us;
1126
1126
- Some courses on [Egghead.io](https://egghead.io) like [Start learning React](https://egghead.io/courses/start-learning-react) are of high quality, and the recently updated [Beginner's Guide to React](https://egghead.io/courses/the-beginner-s-guide-to-reactjs) is also relatively good; both courses introduce concepts that will also be introduced later on in this course. **NB** The first one uses class components but the latter uses the new functional ones.
1127
1127
1128
-
### Web programmers oath
1128
+
### Web Programmer's Oath
1129
1129
1130
-
Programming is hard, that is whyI will use all the possible means to make it easier
1130
+
Programming is hard. That is why, as a developer, I will use all possible means to make it easier.
1131
1131
1132
-
- I will have my browser developer console open all the time
1133
-
- I progress with small steps
1134
-
- I will write lots of _console.log_ statements to make sure I understand how the code behaves and to help pinpointing problems
1135
-
- If my code does not work, I will not write more code. Instead I will start deleting the code until it works or just return to a state when everything was still working
1136
-
- When I ask for help in the course Discord channel or elsewhere I formulate my questions properly, see [here](http://fullstackopen.com/en/part0/general_info#how-to-get-help-in-discord) how to ask for help
1132
+
- I will have my browser's developer console open at all times.
1133
+
- I will progress in small steps, making sure that my code is working at each step.
1134
+
- I will write many _console.log_ statements to make sure I understand how the code behaves and to help pinpointing problems.
1135
+
- If my code does not work, I will not write more code. Instead, I will either start deleting the code until it works or return to a state where my program was working.
1136
+
- When I ask for help in the course Discord channel or elsewhere, I will formulate my questions properly. See [this section](http://fullstackopen.com/en/part0/general_info#how-to-get-help-in-discord)to learn how to ask for help.
1137
1137
1138
1138
### Utilization of Large language models
1139
1139
1140
1140
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.
1141
1141
1142
1142
Personally, I mainly use GitHub Copilot, which is now [natively integrated into Visual Studio Code](https://code.visualstudio.com/docs/copilot/overview)
1143
-
As a reminder, if you're a university student, you can access Copilot pro for free through the [GitHub Student Developer Pack](https://education.github.com/pack).
1143
+
As a reminder, if you're a university student, you can access Copilot Pro for free through the [GitHub Student Developer Pack](https://education.github.com/pack).
1144
1144
1145
-
Copilot is useful in a wide variety of scenarios. Copilot can be asked to generate code for an open file by describing the desired functionality in text:
1145
+
Copilot is useful in a wide variety of scenarios. For example, Copilot can be asked to generate code for an open file by describing the desired functionality in text:
1146
1146
1147
1147

1148
1148
@@ -1156,35 +1156,35 @@ An event handler may also be generated. By writing the first line of the functio
In Copilot's chat window, it is possible to ask for an explanation of the function of the painted code area:
1159
+
In Copilot's chat window, it is possible to ask for an explanation of the function of the selected code area:
1160
1160
1161
1161

1162
1162
1163
-
Copilot is also useful in error situations, by copying the error message into Copilot's chat, you will get an explanation of the problem and a suggested fix:
1163
+
Copilot is also useful for debugging. If you copy an error message into Copilot's chat, you will get an explanation of the problem and a suggested fix:
1164
1164
1165
1165

1166
1166
1167
-
Copilot's chat also enables the creation of larger set of functionality
1167
+
Copilot's chat also enables the creation of larger set of functionality. For example, the image below shows Copilot creating a login component using the _useState_ hook.
1168
1168
1169
1169

1170
1170
1171
-
The degree of usefulness of the hints provided by Copilot and other language models varies. Perhaps the biggest problem with language models is [hallucination](https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)), they sometimes generate completely convincing-looking answers, which, however, are completely wrong. When programming, of course, the hallucinated code is often caught quickly if the code does not work. More problematic situations are those where the code generated by the language model seems to work, but it contains more difficult to detect bugs or e.g. security vulnerabilities.
1171
+
The usefulness of Copilot and other language models in programming varies. The biggest problem with language models is [hallucination](https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)). Large language models sometimes generate answers that may seem correct, but are completely wrong. In programming, errors in hallucinated code are often caught quickly when the code fails to run. However, some code generated by a language model may work at first but still have hidden issues, such as logic errors or security vulnerabilities.
1172
1172
1173
-
Another problem in applying language models to software development is that it is difficult for language models to "understand" larger projects, and e.g. to generate functionality that would require changes to several files. Language models are also currently unable to generalize code, i.e. if the code has, for example, existing functions or components that the language model could use with minor changes for the requested functionality, the language model will not bend to this. The result of this can be that the code base deteriorates, as the language models generate a lot of repetition in the code, see more e.g. [here](https://visualstudiomagazine.com/articles/2024/01/25/copilot-research.aspx).
1173
+
Another problem in applying language models to software development is that it is difficult for language models to "understand" larger projects. One major limitation of language models is that they are unable to implement changes across several files. Language models are also currently unable to generalize code. For example, if the programmer requests for new functionality that can be implemented with existing functions or components (even with minor adjustments), the language model may fail to use them. This deteriorates the code base quality because the language models generate duplicate functions and components. For more information about this, read [this article](https://visualstudiomagazine.com/articles/2024/01/25/copilot-research.aspx).
1174
1174
1175
-
When using language models, the responsibility always stays with the programmer.
1175
+
If you choose to use language models when programming, remember that its output is your responsibility.
1176
1176
1177
-
The rapid development of language models puts the student of programming in a challenging position: is it worth and is it even necessary to learn programming in a detailed level, when you can get almost everything ready-made from language models?
1177
+
The rapid development of language models puts programming students in a challenging position. Is it worth, or even necessary, to learn programming to a detailed level when you can get almost everything ready-made from language models?
1178
1178
1179
1179
At this point, it is worth remembering the old wisdom of [Brian Kerningham](https://en.wikipedia.org/wiki/Brian_Kernighan), co-author of *The C Programming Language*:
1180
1180
1181
1181

1182
1182
1183
-
In other words, since debugging is twice as difficult as programming, it is not worth programming such code that you can only barely understand. How can debugging be even possible in a situation where programming is outsourced to a language model and the software developer does not understand the debugged code at all?
1183
+
In other words, since debugging is twice as difficult as programming, it is not worth creating code that you barely understand. How can debugging even be possible when the software developer does not understand the debugged code because they outsourced programming to a language model?
1184
1184
1185
-
So far, the development of language models and artificial intelligence is still at the stage where they are not self-sufficient, and the most difficult problems are left for humans to solve. Because of this, even novice software developers must learn to program really well just in case. It may be that, despite the development of language models, even more in-depth knowledge is needed. Artificial intelligence does the easy things, but a human is needed to sort out the most complicated messes caused by AI. GitHub Copilot is a very well-named product, it's Copilot, a second pilot who helps the main pilot in an aircraft. The programmer is still the main pilot, the captain, and bears the ultimate responsibility.
1185
+
So far, the development of language models and artificial intelligence is still at the stage where they are not self-sufficient, and the most difficult problems are left for humans to solve. Because of this, even novice software developers must learn to program really well just in case. It may be that, despite the development of language models, even more in-depth knowledge is needed. Artificial intelligence does the easy things, but a human is needed to sort out the most complicated messes caused by AI. GitHub Copilot is a very well-named product because it's a Copilot; a second pilot who helps the main pilot in an aircraft. The programmer is still the main pilot, the captain, and the one who ultimately bears the responsibility.
1186
1186
1187
-
It may be in your own interest that you turn off Copilot by default when you do this course and rely on it only in a real emergency.
1187
+
Throughout this course, it may be in your own interest that you turn off Copilot by default and only rely on it in a real emergency.
0 commit comments