If this, then that.

As complicated and tedious as computer programming can be, it is in fact a very simple and straight forward endeavor. In its simplest form; programming is the act of assembling a series of instructions which automates a specific task or solving a specific problem. This means that computer programming refers to the act of programming a computer. The definition of a computer can vary, but think of the name; a computer computes things, solves things, runs programs. For the instructions that we give computers, we write them out and assemble them using computer languages (there are many) and this sequence of instructions is called computer code. A few terms in there, but really just remember; nothing more than a set of instructions which will be followed systematically.

Computers have existed for a very long time since they can be instruments as simple as a common abacus or any other device used for counting or measuring. Fundamentally, the concept of computers is almost universally tied to numbers in some way. Modern computers often incorporate electronic components to process, store and display information. These are the ones we commonly program today, but in the past before humanity took control over the electric current, computers could also be functioned as mechanical devices. These too could be programmed by using different gears or punch-cards or parts. Historically, people understood how computer technology was going to advance with the advent of new technologies, and the first modern computer programs were actually written before they had a computer to run on.

The more complicated the computer, the more complicated its programming tends to be. If for instance the computer only has 3 parts, and changing one of them is how you instruct it, that’s simple. If a computer has hundreds of electronic components to do various things when instructed by computer language, numerous considerations must be made in programming for all of the computer’s various functions. If you are looking for a simple, basic electronic computer with only a few parts, check out the Raspberry Pi; a small, credit card sized computer that needs very little electricity to operate and can run simple programs all the way up to complex operating systems.

When a computer is given a sequence of instructions (a program), it will run through it line by line until it completes its task, provided that there are no errors in the code. A single failure to use a proper character in the computer language code can cause the entire program to stop, since the computer will not know how to move past that line or improvise unless you have instructed it to before hand. This is syntax.

Syntax is one of the most important things in programming; it is not the language itself but the formal rules and regulations of the language being used. As mentioned, there are a variety of languages that have been established in order to fulfill different requirements for differing system architectures, but when a computer knows how to read a language, it only knows how to read that language. That is to say, it doesn’t know how to read that language if something is not precise when handed over to the computer. The computer will look for identifying characters and terms in order to determine anything from what language it is reading to how to react to a certain command or function. It may have been instructed to add two sums together, but upon looking for those sums it may crash because these sums were not defined properly (maybe the language dictated that they needed to be within {parentheses}, and they were within “quotations” by human error).

So again we stress that syntax is one of the most important thing in computer programming. People make errors in language syntax, computers don’t make errors in reading it. Think of it like linguistic slang; humans are capable of cutting someone some slack and using their imagination if encountered by terminology or syntax they are not accustomed to. Computers are expecting precise, formal language and simple will not respond to anything that deviates from this (unless again, they are programmed to do so).

Take lots of notes when you are writing code. Most programming languages allow you to add harmless notations right in the script that the computer will ignore, so take advantage of this and document any changes or even thoughts as you go along. Keep snippets of code if you are removing them until you have tested the program or function; you may come to realize you have otherwise deleted an important piece of script that will take time and consideration to rewrite.

This leads us to another basic fundamental of computer programming which is the measurement and analysis of data. Data can come in several forms, from numbers to terms and functions in their own right. In programming, instructions are given to determine data, often by using provided data or even working some data out first.

Computers love logic.

You will see the term logic associated with computers a lot. This is because computers and their programs as we know them are cold, calculated logic machines. Just like their requirement for perfect syntax, computers also to know what to do when they’ve worked something out. They either record that data somewhere, display it, or use it in another set of instructions and keep on going. The “Boolean” is an important concept in computer programming (borrowed from mathematics). It is a type of data that helps determine is something is true or false.

True or false is a massive concept for programming. Programmed instructions often require a certain set of conditions to be met before proceeding forward, and this is often determined by a true or false Boolean.

Is the computer’s processor responding?

Yes.

Then we may proceed.

This is reflective of the inner logical thoughts of a computer and its program. It will constantly have to check if certain things are true, and if they are(or are not), what to do about it. This is commonly referred to as “if this then that”. If all the required criteria is all set and ready to go, let’s work the math problem out and tell the user what the answer is. If we are missing any values, let’s tell the user that we can’t work out the problem because we don’t have enough information. A simple exchange such as that is an example of Boolean data and how it would be determined.

If this, then that.

We’ve mentioned a variety of programming languages. Some of them are composed for very specific and limited reasons, while some have evolved over generations and contributed to the formation of even more lanugages. Things like “C” language evolving into “C+”, or people taking the principles of C language and building Java script out of it using some of the same syntax, but different terminology and functions. There is Pyton, Ruby, PHP… even HTML (the language of the internet) is a language of computer programming. Every webpage works just like a program; it declares what language it is written in (so the computer knows how to read it), and then it gives a sequence of instructions like “load this background”, “use this font size”, “show this image here and make it a link to this other webpage”, and so on.

If you want a quick and exciting way to see what computer programming looks like, simply check the source code on this very webpage. Hit the “Ctrl” + “U” keys (on most browsers, otherwise find a “view source” button) and you will see the entire sequence of instructions in computer language that contributed to displaying this webpage to you now. It may look complicated, but remember it is just a linear sequence of instructions.

Frankly if you actually wanted to get started on learning any of the common programming languages, we suggest Codecademy, they have built an easy to understand website that makes learning computer programming interactive and engaging. They offer free courses from basic to advanced lessons on several languages in addition to generalized courses that will see you using a bit of several languages to accomplish one goal (like building a website). There’s no way that we could teach you computer programming better than they can, so by all means, go check out Codecademy.

Raspberry PI 3 Model B A1.2GHz 64-bit quad-core ARMv8 CPU, 1GB RAM

1.2GHz 64-bit quad-core ARMv8 CPU, 1 GB RAM
802.11n Wireless LAN, 10/100Mbps Lan Speed
Bluetooth 4.1, Bluetooth Low Energy

Additional images:

Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail

Price: $59.99 $35.70

Buy Now

PiTFT 2.8″ Touchscreen for the Raspberry Pi

PiTFT 2.8″ Touchscreen for the Raspberry Pi Adafruit Product ID: 1601

Additional images:

Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail Product Thumbnail

Price: $34.95

Buy Now