Hello everyone! Apparently my previous programming tutorial for programming was quite hard to understand, so here is a new version! So lets begin. First you obviously need to choose a language. For most people, this is very confusing, so lets cover the basics. First of all, there are two main types of programming languages, functional and non functional(commonly object oriented, but that doesn't have to always be the case). The functional languages are quite a hard concept so I wouldn't really recommend them for beginers. Even after eliminating functional languages, there is still a ton, possibly thousands. So now, we will focus on the syntax. There is multiple types of general syntaxes for programming languages, but propably the most popular is the C-type syntax. Its preety much what majority of programming languages use today, and the syntax itself is preety solid too! So, how does it look? Here are some code examples that are included in such syntax // This is a comment spreading 1 line /* This is a comment for as long as its between these two weird things */ // This is how you define a function MODIFIERS TYPE NAME (ARGUMENTS){ /*spacing not requied*/ // some function contents if(a == 10){ // syntax for conditions/loops } } etc... So there are obviously more types of syntaxes, such as rust, python or assembly syntax. C syntax is propably best tho, because if you learn language similiar to this, you will be able to learn any language with the same syntax in(propably) like half an hour. So, lets say you choosed C++ as your programming language, why not. First step, is to write hello world program. Why hello world exactly? Well its a long long programming tradition to do so, and you will understand if you learn coding at some point. For now tho, how do we write this thing? Well first, we need to include the standard library. Standard library is something your operating system has, and it allows you to use basic functions such as reading or writing to the standard output(also known as terminal), using networking to communicate between computers and many, many more. So lets include it! Obviously the standard library is from more parts tho, because if you included the entire library when you dont need it, it would not be very good. Lets just include the io module. #include As you can see, I've used the # on the start of the command, indicating that this should require something by the complier, in this case, to include and link to the iostream. What is linking? Simply put, its to save space in your programs. Normally the entire Clib takes from 40-200Mb, depending on architecture etc. If we didn't link it and just put the Clib into the executable, our hello world executable could be up to 200Mb in side. Instead, the program has in its header(data near start of the executable), filled with information thats saying something like "please complier, provide me with this library, it should be in /lib64/....so". Now, when you know how to include a library, lets make a main function, shall we? int main(int argc, char** argv){ return 0; } As you can see, I defined the type int, which indicates that the function returns an int. In basics that means, when you call it you can get information from it in form of an integer(32bit one, signed in this case). So lets say there is a cosine function like this: float cos(){/*some contents*/} The float is just a different datatype which doesn't really matter, but when you now do something like float a = cos(0.94); It should return the value into the variable a. Anyway that would be returns covered, now the name of the function. The name is just used to indicate what function it is, and if the name is main that means the main will be called at the start of your program(main is quite special due to this). Now the arguments. They are used for transfering data into the function, in this case the programs arguments. The arguments are always defined as (TYPE NAME, TYPE NAME, ...) syntax. Now the contents. We have a simply line containing the keyword return and the value 0 folowed by a semicolon. Keyword is just a special word for the language that you commonly can't use directly(so you can't have argument of function called return, for example). These keywords help us do various functionality in the language, and in this case we are returning the exit code 0(aka. the program executed just fine). What about the semicolon? The semicolon should be placed at end of each line in C-style languages, because that allows you to separate lines. Why not just do 1 command per line? Well, then you couldn't do stuff like placing 2 commands on line etc. Now, lets print out the hello world. In C++ there are several ways to do this, but we will go the inteded way: std::cout << "Hello, world!\n"; As you can see, I am inputting the string of characters "Hello, world!\n" to the std::cout. The std:: is a namespace for the standard library. This is exclusive to C++ however, in C there are no namespaces for example and in c# the namespaces are done such as std.something. Then, we are doing operator on class std, but that just means we are calling a function called something like `operator<<(std::string str){...}`. And what is the '\n' character at the end? Well, that is newline character. It basically tells the terminal to press the enter key. Now that we've got the hello world, lets compile it! The completed code looks like this by the way: #include int main(int argc, char** argv){ std::cout << "Hello, world!\n"; return 0; } Now, you've got to have the complier. If you are on linux, this should be preety easy. You just go to your terminal, and type `g++ program.cpp` and execute it by `./a.out`. If you're on windows, the steps are fairly different. First of all, you can just save the .cpp file in any directory, and then press Win+R. After that, you can simply type in cmd.exe and press enter. You can now navigate to the directory using cd command, or if you are at modern versions of windows, just right click in the directory and press open in windows terminal or such. Now, if you don't have gcc(GNU C complier) or g++ installed, heres how to do it. You can simply download MinGW, and then you should be able to folow the steps for same as linux, except the file wont be a.out but a.exe. Here is some link to mingw if you're interested: `https://sourceforge.net/projects/mingw/`. Now, how do we do something more interesting? Lets define a variable. Variables are pieces of data on memory(RAM) which is temporary storage your program can use. Lets define a simple decimal(no decimal point) number with 32bits called `number`, with value of 10, like this: int number = 10; Now we can also print the number like this: std::cout << number << std::endl; std::endl is simply just another variant for '\n' btw. Now, lets edit the varaible! number = 25; // Sets the valud of the variable to 25 number = number + 24; // Adds 24 to the existing value of the number number += 10; // Adds 10 to the existing value of the number These are just some ways to edit the number tho! Lets explore some others. We can also subtract, multiply, divide etc. like this: number /= 10; // Divide the number by 10 number *= 5; // Multiply the number by 10 number -= 4 // Subtract 4 from the number Now when we've got that, how could we possibly run something that only runs if some condition is met? Well thats simple! Using conditions. Lets write an example one. if(number == 10){ std::cout << "number = 10\n"; } Like this, we have made a condition and the things inside of it will only run when the value of the number is 10. There are obviously also other quick operations, such as != for if the number is not smaller, < or > if the number is bigger/smaller, and combinations such as >= or <=(smaller or equal). Why isnt the if equal just one equal sign but 2? Well that for preety simple reason. Lets say you are trying to store to a variable(for whatever reason) if the number is equal to 5 like this: `int is5 = number == 5;` Now, the is5 will be 1 or 0 depending on if the number is 5 or not, but when I try to do: `int is5 = number = 5;` The is5 now equals to number which equals to 5. So, thats why. Part 2 of this tutorial will come out soon! Bye to everyone thats reading this!