Introduction: The Basics of Programming

About: Enjoying the projects? Support this page on Patreon: https://goo.gl/QQZX6w

Hey everyone. In recent months I have had more and more comments and personal messages about what programming is and what the different tools do.

So here is my most basic explanation of programming.

(warning this is really basic so if you have programmed before you probably know all of this already :D)

Enjoy

Step 1: HTML (the Way You Are Looking at This Right Now)

HTML was created by Tim Berners-Lee back in 1989 and it stands for Hyper Text Markup Language. What this language is mainly used for is programming webpages. In fact, if you press CTRL U on Firefox right now you will see the source code (the code that makes up a webpage) for the page you are on right now unless you use Chrome in which case get Firefox because Google is going to become Skynet (just kidding, Google's great)

Now normally when you want to program something like an App you'll need advanced software, however, when it comes to HTML you can use any word processor (notepad) and a browser. Typical HTML code will look like this:

<.html>(starting the code by declaring its HTML)

<.head>( declaring the start of the heading

<.title> This is my Page Title

<./title>(The Title) ( declaring the end of a heading with a /)

<.body>( starting body of the page)

This is my test page (the body of the page)

<./body>(ending the body of the page with a /)

<./html>(ending the code)

Just remember that this is a super basic example, most professional webpages actually use many different programming language. Here is how they all work together:

Html: places text on web based pages and gives it size/style

Css: tells the html/text on the page how to look and where to go. (Makes pretty)

Java-Script: gives your html/css animation/function

Step 2: Java

(first please note that this is different to java script) Java is a programming language that developers use to create applications on your computer. Chances are you've downloaded a program that required the Java run-time, and so you probably have it installed it on your system. Java also has a web plug-in that allows you to run these apps in your browser. Java was created by James Gosling in 1995. Now, if you want to program Apps you'll probably end up using using Java in some way or another. Here is some example of code:

/* HelloWorld.java (The name of the App)
*/ (starting the code)

public class HelloWorld

{

public static void main(String[] args) {

System.out.println("Hello World!"); (telling the app what to display)

}

} (closing the code)

Examples of games programmed in Java would be Minecraft, many Tom Clancy games and tons more

Step 3: Arduino

The Arduino IDE is an awesome programming language with similar commands to C. Its main uses are for programming the Arduino brand micro-controllers. (As well as a few other compatible micro-controllers.) The Arduino IDE is different to Java and Html because instead of programming Apps or Webpages, what it does is it takes the code you input and makes it Machine language which it then sends to a micro-controller. (A micro-controller is a small computer capable of controlling anything from motors to robots.)

int led = 13; (declaring that pin 13 on the Arduino will now be known as led)

void setup() { (Setting up the pins input or outputs)

pinMode(led, OUTPUT); (saying that pin led (13) will be an output)

} (closing the void setup)

void loop(); (starting the void loop, this is what will repeat forever)

{ (starting the void loop)

digitalWrite(led, HIGH); (Turning the led on)

delay(1000); (keeping the led on for 1 second, 1000 milliseconds)

digitalWrite(led, LOW); (turning the led off)

delay(1000); (keeping the led off for 1 second, 1000 milliseconds)

} (closing the void loop)

You can find more info about the Arduino IDE and Arduino micro-controller in my other Instructable : https://www.instructables.com/id/Arduino-Uno-Intro-Plus-Projects/

Step 4: C++

C++ is defined on Google as a general-purpose programming langue, and that's exactly what it is. C as a whole is used for programming things anywhere from a micro controller (like Arduino) to making apps (like Java). However C++ mainly used to program things like Games, Office Applications, video editors and even operating systems. The chances are if you are using software that doesn't connect to the internet it's written in some form of C. I won't list an example for this because there are so many different versions , however a quick Google with the version you are running will bring you to pages upon pages of code.

Step 5: To Conclude

So, to conclude, many different programming languages are used for many different things. Html is used for websites Arduino is used for microcontrollers and Java is used for App development. So the next time you want to program something you know exactly what software to use with it.