Getting Started

You’re probably really keen to start programming! I don’t blame you! But we’re not quite ready yet. If you’re completely new to programming, there are a few things we should try to understand first.

We’re going to learn about computers, and how they’re programmed.

What is a Computer?

This might seem like a strange question. Don’t we all know what computers are? Maybe you haven’t put much thought into it yet.

We can think of computers as something that processes information. That is, we give a computer a problem to work on, it thinks about it for a while, and then provides a solution.

Examples of computers include a desktop or laptop, smartphones, and tablets. Even TVs today are computers with applications!

Computers are a collection of hardware. Hardware is the physical parts of the computer that we can see and touch. This includes the screen, keyboards, mice, and other parts.

Computers, and the applications that run on them, are here to make our lives easier and better. We can use them to send messages to our friends, to watch videos, to read and write documents, to access the internet, and to store information.

Did You Know?

The first computer was The Babbage Difference Engine. It was an advanced calculating machine, designed by Charles Babbage in 1821.

It was originally designed to be steam-powered!

Software, Programs, and Apps

Computers run programs. These are also known as applications or apps. You may already know that this is software. We can’t physically touch software. It exists only in the memory of the computer.

Computers can’t think on their own. We need to give them instructions, so they know what to do. That’s what programs are. They’re a list of instructions that tell the hardware what to do.

But we don’t normally see these instructions. Someone else has made apps for us to use. All we need to do is use the app. The software gives the hardware its instructions behind the scenes, invisible to most of us.

Did You Know?

The very first program was written over 150 years ago by Ada Lovelace in 1848! It was created for the Babbage Difference Engine.

Programming Languages

Computer programming has come a long way in the last 150 years! The original programs required the programmer to give the computer instructions one at a time, which took a long time to do. It was also easy for the programmer to make mistakes, and they’d have to start again from the beginning.

Today, we have programming languages. These let us talk to the computer in a way it understands. We use the programming language to create a program. This is a list of instructions for the computer hardware. When we’re ready, we can send them all to the computer, and the computer will start doing what it is told.

Programming languages are our way of giving the computer instructions

There are a LOT of different programming languages today. Some of the well-known languages are python, C++, Java, HTML, PHP, and SQL.

Why are there so many languages? Well, they are all made with different goals in mind. For example, the SQL language is very good at storing and retrieving information. We use another language, HTML to create web pages.

Also, some programming languages are very old. For example, we’ve had a language called COBOL since 1959. Newer languages have learned from these older languages, and have made many improvements.

Did You Know?

The first programming language was invented by Ada Lovelace in 1883, to work with the Babbage Difference Engine.

The first ‘modern’ programming language was made in 1949 and was called Assembly Language.

It’s All Lines of Code…

When we give instructions to a computer, we write them down. A simple program is shown here. Each line has an instruction for the computer.

These instructions are called code.

All the instructions that make up a program are called the program’s source code.

# This program adds two numbers

num1 = 1.5
num2 = 6.3

# Add two numbers
sum = num1 + num2

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))

Most people won’t ever look at a program’s source code. Most people will be happy to just run an application, without knowing how it works behind the scenes.

In a lot of cases, the source code for an application is a closely guarded secret. Only the programmers and a few others will ever get to see it. This is normal for applications that you buy.

In other cases, the coder (another name for the programmer) shares their source code with anyone who wants to see it. If we want to we can use, learn from, and improve on their code.

Sometimes a program doesn’t work as well as it was meant to. We often call this a bug or a glitch. When this happens, the programmer will find the error in the code and fix it. This is debugging. There are special tools to help with debugging.

Did You Know?

The first official computer bug was in the 1940s, in a computer called the Mark II. When it was having problems, the computer operators looked inside to see what was going wrong.

They found a moth in the electronic equipment, which was causing the problems. They ‘debugged’ the computer by removing the moth.

Next…

Next, we’ll start looking at Python, what it’s used for, and how to install it.

Leave a Reply