diff --git a/index.md b/index.md index 57f688a..abef661 100644 --- a/index.md +++ b/index.md @@ -2,6 +2,7 @@ This website is to store documentation for various aspects of programming FRC robots, made by Bots on Wheels. Main website for Bow 4290 can be found [here](https://www.bow4290.org/). ## Index +- [4290 Programming Training](./training/) - [Guidebook](./guides/) ## Important Links (2023 Offseason) diff --git a/training/chapter_1/1_syntax_variables.md b/training/chapter_1/1_syntax_variables.md new file mode 100644 index 0000000..fb073b8 --- /dev/null +++ b/training/chapter_1/1_syntax_variables.md @@ -0,0 +1,26 @@ +# 4290 Programming Training Ch 1.1 - Syntax & Variables +## Syntax +The syntax of a programming defines how code written in it will be structured, providing many rules and guides for best practices. The following article(s)explain some of these rules and guides for Java. + +- [1. Article - Syntax (Geeks for Geeks)](https://www.geeksforgeeks.org/java-basic-syntax/?ref=lbp) +- [2. Video - Java in 100 Seconds (Fireship)](https://www.youtube.com/watch?v=l9AzO1FMgM8) + - Although this video is a good for starting, I would recommend watching this after reading through the 1st article + - The intent of this video is to show off some of the basics of Java in a visual way. It's completely fine if you don't understand some of the things talked about in the video! + + + +## Variables +Variables are like containers for values in code. Variables can have many different types and values, such as numbers or words. The following article(s) explain how these work in Java. + +- [1. Video - Java Variables Explained (Treehouse)](https://www.youtube.com/watch?v=8fyTQsXX0pM) +- [2. Article - Java Variables (Java T Point)](https://www.javatpoint.com/java-variables) +- [3. Article - Java Data Types (W3 Schools)](https://www.w3schools.com/java/java_data_types.asp) + - Also read nested pages: + - [3.1 Numbers](https://www.w3schools.com/java/java_data_types_numbers.asp) + - [3.2 Booleans](https://www.w3schools.com/java/java_data_types_boolean.asp) + - [3.3 Characters](https://www.w3schools.com/java/java_data_types_characters.asp) + - [3.4 Non-primitive Types](https://www.w3schools.com/java/java_data_types_non-prim.asp) + +--- + +### [<< Previous](./) | Next (Coming Soon) >> \ No newline at end of file diff --git a/training/chapter_1/2_comments.md b/training/chapter_1/2_comments.md new file mode 100644 index 0000000..6c36ad8 --- /dev/null +++ b/training/chapter_1/2_comments.md @@ -0,0 +1,36 @@ +# 4290 Programming Training Ch 1.2 - Comments +## About Comments +Comments exist in most programming languages in some form, and are used to tell the program to ignore the text. Comments can be used for documentation, explanations of abstract code, or even to ignore lines of code. + +## Writing Comments + +### Single Line +Single line comments start with two forward slashes. Any text between // and the end of the line will be ignored when the code runs. + +```java +// I am comment +System.out.println("This code will run"); + +// The code below won't run +// System.out.println("This code has been commented out") +``` + +### Multi Line +Multi Line comments take up multiple lines, Any text Between `/*` and `*/` will be ignored when the code runs. + +```java +/* I am a comment. +The code below will print "Hello World" */ +System.out.println("Hello World"); + +// The code below will not run +/* +void sayHello(){ + System.out.println("Hello"); +} +*/ +``` + +--- + +### [<< Previous](./1_syntax_variables.md) | [Next >>](./3_operators.md) \ No newline at end of file diff --git a/training/chapter_1/3_operators.md b/training/chapter_1/3_operators.md new file mode 100644 index 0000000..c3e3720 --- /dev/null +++ b/training/chapter_1/3_operators.md @@ -0,0 +1,10 @@ +# 4290 Programming Training Ch 1.3 - Operators +In programming, operators are symbols used to work with values, such as adding values together, or comparing two different values. The article(s) below show how these operators work in Java, although most languages use similiar if not exact operators and syntax. + +- [1. Video - Operators in Programming (WeTeach_CS)](https://www.youtube.com/watch?v=PaHpU7-BNaU) + - This video is not language specific and instead goes over the concpets more than the exectuion, but it still very much applies to Java. +- [2. Article - Operators (W3 Schools)](https://www.w3schools.com/java/java_operators.asp) + +--- + +### [<< Previous](./2_comments.md) | Next (Coming Soon) >> \ No newline at end of file diff --git a/training/chapter_1/index.md b/training/chapter_1/index.md new file mode 100644 index 0000000..42ee13e --- /dev/null +++ b/training/chapter_1/index.md @@ -0,0 +1,20 @@ +# 4290 Programming Training - Chapter 1 +## About WPILib and Java +This chapter of the book will be going over various basic topics on programming using Java, which is one of the programming languages that WPILib supports. + +WPILib is the official library for FRC. In programming, a library is a bunch of reusable code made to make developing certain things easier, in this case, programming robots. + +## Installing WPILib +The official first documentation has a great guide on installing WPILib that can be found [here](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html). + +This installation will include: WPILib VSCode, The correct version of Java, and a few other things. VSCode is a lightweight code editor, and although not necessary it is recommended to use the WPILib specific version of VSCode as your editor when editing robot code. + +## Pages +- 1.1 [Syntax & Variables](./1_syntax_variables.md) +- 1.2 [Comments](./2_comments.md) +- 1.3 [Operators & Basic Math](./3_operators.md) +- 1.4 Coming Soon.. + +--- + +### [<< Previous](../) | [Next >>](./syntax_variables.md) \ No newline at end of file diff --git a/training/index.md b/training/index.md new file mode 100644 index 0000000..aa7f3eb --- /dev/null +++ b/training/index.md @@ -0,0 +1,8 @@ +# 4290 Programming Training +The goal of this book / course is to compile various resources and materials to be used for training and learning about programming FRC robots using Java. + +This book will be organized by chapters, with each one focusing on specific topics and concepts, containing links to learning resources, as well as explanations. + +## Chapters: +1. [Basics](./chapter_1/) +2. Coming soon... \ No newline at end of file