Programming Foundations: Fundamentals

Programming is literally all around us. From the cell phones, we use to the computers or laptops we use. We are in the fourth industrial revolution now and almost everything is done online. From shopping, banking to studying fully online and the games we play online or even on our phones. Everything is being automated to be used online. So what is this programming?

Programming is the process of converting ideas into instructions that a computer can understand and execute or run. The instructions are specific and run in order. The process of planning, design, testing, deployment, and even maintenance, altogether, can be called programming. As there are languages for every subject or topic, programming also has a language. A programming language is made up of syntax or rules and semantics or meaning.

The instructions or source code for the computer is written in plain text and we use a text editor to write those instructions. A source code can be one line or hundreds of lines, it just depends on the needs of your program. We can also use an IDE. IDE stands for Integrated Development Environment. It is an application that provides special tools needed to write, debug and compile code.

When writing our code we use statements and expressions. Statements are building blocks of any program and are individual actions you want the program to take. Each statement can be made up of keywords, expressions, and operators. Operators are symbols that tell the computer to perform an action with some input or operands. Expressions are the combination of operators and operands that break down a single value.

When getting deeper into the foundation of programming we will be talking about variables and data types. A variable is simply a container for a value. A data type allows you to put a variable in a particular category so that the computer knows how much space to give in its memory.

Variables have rules, namely; Names contain letters, numbers, and underscores. Spaces are not allowed. Names are case-sensitive. Variables cannot be keywords.

For a program that is long and the source code is a lot, you will need notes so that should you want to revisit the program again, you know or remember what it is supposed to do. We use comments to make those notes on our program. Comments are notes to your future self and others to describe what your code does. They are virtual sticky notes and have their own syntax depending on the programming language you use.

Most programs have conditions, just like on our phone we have options for certain actions, example you can either accept a phone call or decline it. Just as in our program we have conditions. Conditional or boolean expression is any expression that breaks down to either true or false.

Imagine having to write two identical boolean expressions for your code, that would be easy, right. Now imagine having to write over hundreds of identical boolean expressions, so not so simple right. We use functions for that, a function is a block of code packaged together with a name. Functions are key to preventing us from writing the same code over and over again. Imagine how simply they would make your life as a programmer when you have to write the same code over and over again.

So, to sum up, everything. Programming is fun, it makes our lives easier and convenient. Programming can be learned by anyone that has the passion and dedication for it. You can really create some cool applications with just simple lines of code, using variables, data types, expressions, and functions. Whenever you think of a program you want to code, don’t think of the lines of code, rather focus on its functionality. How you want it to work and bang! You have your idea for a program.