Programming fundamentals part 1

January 27, 2019 / Alexander Fountain

Programming fundamentals are often zipped by on the journey to learn a computer language. It's far too easy and sometimes a necessity to do so. Some job positions or prospective job positions just don't allow you time to do so. The way you learn to code can determine your level of study of programming fundamentals. Self taught programmers compared to university trained can get away with not having to learn the fundamentals. Why or how is not important though. Let's start together at the very beginning.

A program is a special set of instructions to tell the computer what tasks to perform.

Statements

When programming, a group of letters, numbers, and operators create a statement. Let's use Javascript for our examples. Below is a simple statement example.

c = b + 42


c and b are variables. Variables are simple groups of letters that store data. = and + are operators. Operators perform actions on your data, like addition or subtraction. 42 is just a value also known as a literal value.

The statement c = b + 42 tells the computer to add the value of b to 42 and assign that value to the variable c

Expressions

Statements are made up of one more more expressions. Expressions are a reference to a value or variable combined with operators.

Let's take another look at our first statement example.

c = b + 42
  • 42 is a literal value expression.
  • b is a variable expression which is going to retrieve its value.
  • b + 42 is an arithmetic expression which is going to do the addition.
  • c = b + 42 is an assignment expression, which will assign the value of b + 42 to c.

Executing

Writing expressions and statements is nice and all, but computers don't know what to do with them. Computers use utilities to compile or interpret the code so they can understand, or sometimes the code is compiled before the computer runs it.

That's it for now! Stay tuned for part 2 of programming fundamentals where we'll start playing with some examples!

Contact Us

Fill out the form below.

© 2019, Built by 1986.io