[Off-topic] dbzfanatic:
Basic Programming Ideas and Principles​

Ok first a bit of terminology so people don't get too confused.

Variable - A variable is a storage device for data. Variables have certain types. They are:

Char - a single character or number (0-9,a-z,etc)(1 byte)

Integer - A whole number (2-4 bytes)

String - Text. Words. You know, language :P

Array - A variable containing other variables or multiple data sets/types.

Vector - Expanding/contracting array

Double - Can have decimals (8 bytes)

Float - Can have decimals (4 bytes)

Function - A piece of code that performs a single, specific task.

Data - information

Code - ...duh...

Parameter - A function-specific variable. Takes input to use in the function.

Loop - a piece of code that continues until certain conditions are met

Infinite Loop - never stops

Event - notifies the program and the OS that something happened.

Control - Something a user interacts with, such as a button, radiobutton, checkbox, etc

Now that that's out of the way lets get into the basics. "What is programming?" It's making a machine do what you tell it :P. There are different programming languages just like there are different spoken languages. Different ways of expressing the same idea. My preferred language is AutoIt (as I've stated before...I think) since I'm more familiar with it than anything else right now. "Which language is the best to use?" Well they all have merit, find the one you like the best and go for it. "Are you going to teach us a language?" No, I want you to find the language that you like best and learn it for yourselves. The ideas will carry over regardless of what the language is as long as you have a good grasp of what's going on.

Hello World

This is the most basic program for any language (at least any I've seen). Normally all it does is open a console/terminal window with the words "Hello World". Even in this basic example you're already learning valuable lessons. How to structure the code, how to open a console window, how to output text. These will all be used quite a bit at first, then the only one that will fade will be the console window as you move into GUIs.

Ok now onto something more advanced/useful, Loops. "When would I use a loop?" You would use a loop when you need something to happen over and over again, such as the main body of your program or a check for something (different value, specific value, button press event, etc). Loops are very common and make things much easier. If some data changes all you need to do is call your function again using the new data. Instead of doing this manually a loop could be set up. In this loop we would want to check for a change in the data (so as not to call the function needlessly and waste time) and if something changed then call the function with the new data. Loops also keep our program running, you don't want your program to just flash for 1/10th of a second do you? :P

There are a few basic types of loops. The For loop, the Do loop, and the While loop.

The For loop is usually used to do things a set number of times. Each time the loop goes through it adds a specific value to a variable (usually 1 but sometimes more. It can also be a negative number effectively counting down). After the loop has gone through the number of times its supposed to it then moves on to the next chunk of code.

The Do loop runs until certain conditions are met. These conditions could be any number of things, just use your imagination.

The While loop runs while something is happening. It's similar to the Do loop in that it runs until a condition is met, but that condition is always "until *condition* stops". You will see "While 1" a lot, that simply says "while the program is running" (effectively). It actually means "While 1=1" which will never change. This is an infinite loop, a loop that will never stop on its own. If we want it to stop we have to stop it explicitly.

Now that you know what functions and loops are it's time to explain events in a bit more detail. Events are pieces of code that run when something specific happens. Your OS (operating system, windows linux mac etc) has events built-in that it executes all the time. As an example whenever your mouse is clicked an event is sent to the main OS telling it a button was clicked, where it was clicked, and what button it was. Sometimes we want to capture these events and have our own code executed as well as or sometimes instead of the main OS code. Sometimes the main OS event is just a notification, it tells everything that something happened and doesn't do anything else. If we make a program with a button but don't have any functions tied to it then an event will still be triggered but it will simply tell the OS and other programs a button was clicked. When we tie code into our controls all we're really doing is setting a specific event as the trigger for our code, the condition for it.

Well that's pretty much it for basic principles. This should get you started and at least able to do pseudo-code (stuff that looks like code but really isn't). Here's an example of some pseudo-code.

if *something happens* then *send an alert*