summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2018-02-24 11:39:19 -0500
committerknolax <1339802534.kk@gmail.com>2018-02-24 11:39:19 -0500
commit2798f699ff6f27b881590debcf65ab09c7df7511 (patch)
tree33932bc939f6adbf720ac5986679e2a3d08690f8
parent25a8d02da23411937d2a7393af40307f76c36111 (diff)
added another handout
-rw-r--r--handouts/trial-section370
1 files changed, 70 insertions, 0 deletions
diff --git a/handouts/trial-section3 b/handouts/trial-section3
new file mode 100644
index 0000000..1cbb34f
--- /dev/null
+++ b/handouts/trial-section3
@@ -0,0 +1,70 @@
+- - - - - - ---=[Urbana Electronics & Programming Summer Program]=--- - - - - -
+[Trial Session 2/23/2018]
+TOPIC 1 - Linux System Maintenance
+
+[Section 3, Nano]---------------------------------------------------------------
+
+ First off, in order to get this file you have to download it off the
+internet. The command for that is "wget". Type:
+
+ wget http://uepsp.xyz/handouts/trial-section3
+
+ Now, if you type "ls" you should be able to see "trial-section3"
+
+ If you want to just read the file, use the "less" command. This opens a
+file and let's you scroll through it. It's called less because there used to be
+a command called "more" that it replaced.
+
+ less trial-section3
+
+ To exit, press q.
+
+ Ok so you can look at a file, but what about edit it? That's where a
+text edit comes in. A text editor lets you, wait for it, edit text. The one
+you'll be using today is called nano. To make a new file called hello.c simply
+type:
+
+ nano hello.c
+
+ hello.c didn't exist before, but now nano has created this file.
+
+ You can now edit the text file as you would normally edit text anywher
+else. To exit, press "CTRL X". If you've made any changes it should ask "Save
+modified buffer?...", press y to save. Then it should show the name of the file
+you're editing, press enter.
+
+ Ok so now you know nano!
+[Section 4, GCC]----------------------------------------------------------------
+
+ Ok now to the juicy bits, programming. You're going to learn the C
+language. C was one of the earliest high level programming languages, and is one
+that many other languages base their syntax off of. If you don't what that means
+don't worry, it just means that if you learn C, every other language will seem
+like a breeze.
+
+ Many people say tha C is too hard, but after walking you through this
+example you'll know that C is a breeze!.
+
+ Here's what you're finished program should look like:
+
+#include<stdio.h>
+int main (int argc, char *argv[]) {
+ printf("hi ducky!\n");
+ return 0;
+}
+
+ Now let's break that down. First off you have "#include<stdio.h>". This
+is called a preprocessor directive, it's something that's technically a part of
+the code, and gets processed by the "preprocessor" before the code is compiled.
+Preprocessor directives start with a # and usually
+
+ "Preprocessor", "Compiled", what do all these words mean? Well, when you
+write code, that's in what's called a Human Readable Language, but that isn't
+what your computer runs. Computers run something called "machine code", which
+isn't pretty to look at and is way more complicated to this. To create "machine
+code" that does what want, you write code in a programming language, in this
+case C, and then compile that code to create a "binary executable". A binary
+executable just means that it's the file containing the code that your computer
+is going to run, a program so to speak.
+
+ But before the compiler can do anyth