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
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,11 @@ Most resources are using a fair amount of text and go into lots of details. Kids
18
18
19
19
### Only what's necessary, not more
20
20
21
-
The primary goal of FRC Java Koans are not to teach all of Java capabilities and available sugar syntax, but rather the minimum required before mentors can start teaching how to program a robot with WPILib. Lots of resources are, for example, explaining how to express conditions (the if / else statement, but also the ternary operator and the switch / case statement). We chose a single one. The reason is that kids are coming for programming robots. We observed they are way more motivated to learn about a new syntax or concept once they have a robot moving, and that syntax or concept unlocks a new cool trick of the robot. So we are teaching the necessary remainder of Java during the robot programming lessons.
21
+
The primary goal of FRC Java Koans are not to teach all of Java capabilities and available sugar syntax. But rather, teach them the minimum required before mentors can start teaching how to program a robot with WPILib. Lots of resources are, for example, explaining how to express conditions (the if / else statement, but also the ternary operator and the switch / case statement). We chose a single one. The reason is that kids are coming for programming robots. We observed they are way more motivated to learn about a new syntax or concept once they have a robot moving, and that syntax or concept unlocks a new cool trick of the robot. So we are teaching the necessary remainder of Java during the robot programming lessons.
22
22
23
-
You might ask why not start right away with programming the robot then? The students are way too lost in the midst of pages of immensely arcane syntax, and we think it is actually slower to teach that way in the long run. In particular, it is requiring a lot more repetition, because they jump too fast from one concept they don't master to another, and don't register them the first times they hear about it.
23
+
In particular: kids don't need to know about functionnal interfaces, arrays, or for loops to learn to program a basic `TimedRobot`. Therefore, we try to bring them as fast as possible to the point they can program a robot simply. Once they have a robot moving, teaching them functionnal interfaces (for example when teaching them commands) or arrays (when teaching them swerve drive programming) can usually be done while they are programming the robot. They appear to not require specific exercises to master those.
24
+
25
+
You might ask why not start right away with programming the robot then? The students are way too lost in the midst of pages of arcane syntax, and we observed anecdotally it is slower to teach that way. In particular, it is requiring a lot more repetition, because they jump too fast from one concept they don't master to another, and don't register them the first time they hear about it.
24
26
25
27
### Enough exercises
26
28
@@ -61,7 +63,7 @@ We expressed above a concern for saving student's attention / motivation / time.
61
63
62
64
- Strive to work on a bare WPILib installation: on VSCode with no need for a plugin.
63
65
- Simple start: no dependency other than the Java standard library, so as to avoid a build step with a dependency management tool.
64
-
- Java 11, because as of 2023, this is the version used by default in WPILib's VSCode.
66
+
- Java 17, because as of 2024, this is the version used by default in WPILib's VSCode.
Copy file name to clipboardExpand all lines: README.md
+64-12Lines changed: 64 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,12 @@
23
23
Java Koans for the FRC is an interactive, step by step, course to teach Java to students engaged in the [First Robotics Competition](https://www.firstinspires.org/robotics/frc). It requires no previous experience in programming. It does not intend to teach the entirety of the Java language, but rather most of the fundamentals required to start learning how to program a FRC robot.
24
24
25
25
## Getting Started with VS Code
26
+
26
27
To get started you will need to either install VS Code or use GitHub Codespaces, which is a browser based IDE. If you are unable to install VS Code, because you're on a Chromebook or do not have permissions to install an application, you can skip ahead to [Getting Started with GitHub Codespaces](#getting-started-with-github-codespaces)
27
28
28
29
To install VS Code, you will need to install [WPILib](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html) first to run the Java Koans for the FRC.
29
30
30
-
Once installed, download the [latest release](https://github.com/jletroui/FrcJavaKoans/releases/download/v1.0/FrcJavaKoans.zip) of the Java Koans.
31
+
Once installed, download the [latest release](https://github.com/jletroui/FrcJavaKoans/releases/download/v1.1/FrcJavaKoans.zip) of the Java Koans.
31
32
32
33
Then, extract it somewhere on your computer. Go to the folder where you have downloaded the koans, righ-click on the koans zip file, and choose 'Extract All'. Choose your destination folder, for example, a `/src` folder within your `Documents` folder.
33
34
@@ -47,6 +48,7 @@ Note: VS Code will ask you if you trust the code within the folder. You'll have
47
48
You are ready to go!
48
49
49
50
## Getting Started with GitHub Codespaces
51
+
50
52
GitHub Codespaces provides a cloud-based development environment. It allows you to effortlessly set up and access a consistent development environment directly from your web browser. This is useful when your students only have access to Chromebooks or for other reasons are not able to install and configure VS Code.
51
53
52
54
To get started with GitHub Codespaces, simply click the "Code" button and select "Create codespace on Master" to create or access your development environment.
@@ -75,9 +77,11 @@ This will open what is called a _terminal_ at the bottom of the VS Code window a
75
77
76
78

77
79
78
-
The master of the Java Koans is telling you a lot of things at once, so let's decompose a bit.
80
+
The master of the Java Koans is telling you a lot of things at once, so let's decompose a bit:
First, it tells you that it is trying to teach you `AboutConsoleAndVariables`. Then it tells you that you did not complete the `AboutConsoleAndVariables.sayHelloInConsole` koan. Which is normal, because you have not even started yet! Then it shows a mysterious `Console` box, which we will ignore for now. At the very bottom, it tells you you can look for `sayHelloInConsole` in the `src/main/java/koans/english/AboutConsoleAndVariables.java` file.
84
+
First, it tells you that it is trying to teach you `AboutConsoleAndVariables`. Then it tells you that you did not complete the `Displaying some text in the console` koan. Which is normal, because you have not even started yet! Then it shows a mysterious `Console` box, which we will ignore for now. At the very bottom, it tells you you can look for `Displaying some text in the console` in the `src/main/java/koans/english/AboutConsoleAndVariables.java` file.
81
85
82
86
### Opening the koan file
83
87
@@ -117,19 +121,21 @@ Next, we can see these lines, colored in green:
117
121
118
122
```java
119
123
/**
124
+
* # Displaying some text in the console
125
+
*
120
126
* Display 'Hello!' in the console.
121
127
*
122
128
* --------- TIPS --------------
123
129
*
124
130
* All lines of code in Java must end with the ';' character. Ex:
125
131
*
126
-
* System.out.println("Apple");
132
+
* System.out.println("Apple");
127
133
*
128
-
* You can use the method System.out.println([some value]) to write something in the console.
134
+
* You can use the method System.out.println([some value]) to display a value in the console.
129
135
*
130
136
* You can tell Java that some value is text by enclosing it between double quotes. Ex:
131
137
*
132
-
* "This is text"
138
+
* "This is text"
133
139
*
134
140
* -------------------------------
135
141
*
@@ -140,7 +146,11 @@ Next, we can see these lines, colored in green:
140
146
*/
141
147
```
142
148
143
-
These lines are forming what's called a 'comment'. All the text between a `/*` and a `*/` is a comment. A comment is a piece of information that is ignored by Java. It is not code. It is very useful for documenting your code while you are writing Java. The master is putting each Koan's instructions for you in such a comment. You can find the goal of the koan at the top of each such comment: `Display'Hello!' in the console.`.The console is the simplest way for a Java program to communicate with you by displaying simple text in a terminal. Remember what was displayed when running the Koans?You saw this bit:
149
+
These lines are forming what's called a 'comment'. All the text between a `/*` and a `*/` is a comment. A comment is a piece of information that is ignored by Java. It is not code. It is very useful for documenting your code while you are writing Java. The master is putting each Koan's instructions for you in such a comment.
150
+
151
+
The first line of the comment tells you the title of the Koan: `# Displaying some text in the console`.
152
+
153
+
Then comes the goal of the koan at the top of each such comment: `Display'Hello!' in the console.`.The console is the simplest way for a Java program to communicate with you by displaying simple text in a terminal. Remember what was displayed when running the Koans?You saw this bit:
144
154
145
155
```
146
156
Console:
@@ -257,14 +267,31 @@ This course intent to come batteries included, with 100% of the information need
257
267
258
268
We have found that students learn faster if mentors are not giving solutions to students' issues, but instead ask them open questions about what they don't understand about the exercise instructions or displayed error. Programming is, most of the time, about figuring out what little detail have been overlooked. Thus, helping students to look for answers by themselves in the koans' text will help them become more autonomous faster when it will be time to program and debug a robot.
259
269
260
-
If you are interested in contributing, please take a look at [CONTRIBUTING.md](CONTRIBUTING.md) :)
If you are interested in learning more about this course or contributing to it, please take a look at [CONTRIBUTING.md](CONTRIBUTING.md) :)
261
284
262
285
## Credits
263
286
264
287
Created by a mentor from the [3550 Robotronix team](https://www.instagram.com/3550robotronix/) (Montréal, Canada).
265
288
266
289
Heavily inspired by the wonderful [Ruby Koans](https://www.rubykoans.com/).
267
290
291
+
The Github Codespaces feature is a contribution of `jmcconne10`.
292
+
293
+
Typos have been fixed by `someonesomething`.
294
+
268
295
Many thanks to early testers who gave me feedback: Andy, Noémie, Chenxin, and Dumitru.
269
296
270
297
## License
@@ -293,11 +320,12 @@ Many thanks to early testers who gave me feedback: Andy, Noémie, Chenxin, and D
293
320
LesKoansJava pour la FRC forment un cours interactif, pas à pas, pour enseigner le Java à des élèves engagés dans la [Compétition RobotiqueFirst](https://www.firstinspires.org/robotics/frc). Il ne requiert aucune expérience préalable en programmation. L'intention n'est pas d'être un cours complet sur Java, mais plutôt d'apprendre juste ce qu'il faut des fondamentaux pour pouvoir commencer à apprendre à programmer un robot FRC avec WPILib.
294
321
295
322
## Comment commencer avec VSCode
323
+
296
324
Pour commencer, vous devrez soit installer VSCode, soit utiliser GitHubCodespaces, qui est un environnement de développement intégré basé sur navigateur. Si vous ne pouvez pas installer VSCode, par exemple si vous utilisez un Chromebook ou si vous n'avez pas les autorisations nécessaires pour installer une application, vous pouvez passer à l'étape suivante [Comment commencer avec GitHubCodespaces](#comment-commencer-avec-github-codespaces).
297
325
298
326
Si ce n'est déjà fait, tu vas devoir installer [WPILib](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html) pour pouvoir exécuter les Koans Java pour la FRC.
299
327
300
-
Une fois installé, télécharge [la dernière version](https://github.com/jletroui/FrcJavaKoans/releases/download/v1.0/FrcJavaKoans.zip) des Koans Java.
328
+
Une fois installé, télécharge [la dernière version](https://github.com/jletroui/FrcJavaKoans/releases/download/v1.1/FrcJavaKoans.zip) des Koans Java.
301
329
302
330
Ensuite, décompresse les quelque part sur ton ordinateur. Pour ce faire, va dans le répertoire où tu as téléchargé les koans, clic-droit dessus, et choisis "Extraire Tout". Choisis un répertoire de destination, par exemple, un répertoire `/src` dans ton répertoire `Documents`.
303
331
@@ -317,6 +345,7 @@ Note: VS Code va te demander si tu fais confiance à ce code. Tu vas devoir rép
317
345
Tu es maintenant prêt·e!
318
346
319
347
## Comment commencer avec GitHub Codespaces
348
+
320
349
Ce dépôt est configuré pour une utilisation aisée avec GitHub Codespaces. GitHub Codespaces fournit un environnement de développement basé sur le cloud. Il vous permet de configurer et d'accéder facilement à un environnement de développement cohérent directement depuis votre navigateur web. Cela est particulièrement utile lorsque vos étudiants n'ont accès qu'à des Chromebooks ou pour d'autres raisons ne peuvent pas installer et configurer Visual Studio Code.
321
350
322
351
Pour commencer avec GitHub Codespaces, cliquez simplement sur le bouton "Code" et sélectionnez "Créer un espace de code sur Master" pour créer ou accéder à votre environnement de développement.
@@ -343,7 +372,9 @@ Cela va ouvrir ce que l'on appelle un _terminal_ dans le bas de la fenêtre de V
343
372
344
373

345
374
346
-
Le maître des Koans Java te dit beaucoup de choses d'un coup. Alors décomposons tout ça.
375
+
Le maître des Koans Java te dit beaucoup de choses d'un coup. Alors décomposons tout ça:
Tout d'abord, il te dit qu'il essaie de t'enseigner `AboutConsoleAndVariables`. Ensuite, il te dit que tu n'as pas complété le koan `AboutConsoleAndVariables.sayHelloInConsole`.Ce qui est normal, car tu n'a même pas encore commencé! Ensuite, il te montre une boîte étrange appelée `Console`, que l'on va ignorer pour le moment. Tout en bas,il te dit que tu peux chercher `sayHelloInConsole` dans le fichier `src/main/java/koans/english/AboutConsoleAndVariables.java`.
349
380
@@ -387,6 +418,8 @@ Ensuite, nous pouvons voir ces lignes, en vert:
387
418
388
419
```java
389
420
/**
421
+
* # Afficher du texte dans la console
422
+
*
390
423
* Afficher 'Hello!' dans la console.
391
424
*
392
425
* --------- INDICES --------------
@@ -412,7 +445,9 @@ Ensuite, nous pouvons voir ces lignes, en vert:
412
445
413
446
Ces lignes forment ce qu'on appelle un 'commentaire'. Tout le texte vert entre `/**` et `*/` est un commentaire. Un commentaire est une information destinée à des humains, et est ignoré par Java. Ce n'est pas du code. C'est très utile pour documenter ton code quand tu écris du Java. Le maître se sert d'un de ces commentaires pour placer les instructions de chacun de ses koans.
414
447
415
-
Tu peux trouver l'objectif du koan en haut du commentaire: `Afficher 'Hello!' dans la console.`. La console est la façon la plus simple pour un programme Java d'afficher quelque chose dans un terminal. Tu te souviens de ce qui a été affiché lorsque tu as exécuté les koans?Tu as vu ce bout de texte:
448
+
La première ligne du commentaire te donne le titre du Koan: `# Afficher du texte dans la console`.
449
+
450
+
Ensuite, tu peux trouver l'objectif du koan en haut du commentaire: `Afficher 'Hello!' dans la console.`. La console est la façon la plus simple pour un programme Java d'afficher quelque chose dans un terminal. Tu te souviens de ce qui a été affiché lorsque tu as exécuté les koans?Tu as vu ce bout de texte:
416
451
417
452
```
418
453
Console:
@@ -532,14 +567,31 @@ Ce cours se veut fournir toute l'information nécessaire pour qu'un élève moti
532
567
533
568
Nous avons trouvé que les élèves passent à travers le cours plus rapidement, et intègrent mieux les notions si le ou la mentor ne lui donne pas de solution à ses problèmes. À la place, le ou la mentor peut garder l'élève dans une posture active en lui demandant ce qu'iel ne comprend pas dans l'énoncé de l'exercice, ou du message d'erreur, et le / la guider dans des stratégies pour comprendre par iel même. La programmation consiste, la plupart du temps, à trouver quel petit détail nous avons oublié. En aidant les élèves à trouver les ressources pour résoudre les problèmes eux-même, ils deviennent au final autonomes plus rapidement lorsqu'ils débogueront un programme de robot.
534
569
535
-
Si vous êtes intéressés à contribuer à ce cours, rendez-vous sur la page [CONTRIBUTING.md](CONTRIBUTING.md) :)
0 commit comments