Currently set to Index
Currently set to Follow
Skip main navigation

What is programming?

There are many different definitions of programming, but Martin O'Hanlon's is simple. Watch his video to find out the three basic structures.

What is programming?

There are countless definitions of what computer programming is, but here is mine.
“Programming is how you get computers to solve problems.”
There are two key phrases here that are important:
  • You: without the programmer (you), the computer is useless. It does what you tell it to do.
  • Solve problems: computers are tools. They are complex tools, admittedly, but they are not mysterious or magical: they exist to make tasks easier.

Computer programs make computers work

Computer programs (or software) are what makes computers work. Without software, modern computers are just complicated machines for turning electricity into heat. It’s software on your computer that runs your operating system, browser, email, games, movie player – just about everything.

Programming is creative

Programming is a creative task: there is no right or wrong way to solve a problem, in the same way, that there is no right or wrong way to paint a picture.
There are choices to be made, and one way may seem better than another, but that doesn’t mean the other is wrong! With the right skills and experience, a programmer can craft software to solve an unlimited number of problems – from telling you when your next train will arrive at playing your favourite music.
The possibilities are constrained only by your imagination. That’s why I love programming.
An animated GIF of cartoon of a computer following instructions as text appears on the screen. 1. turn and face the cliff 2. walk towards the cliff 3. stop at the edge of the cliff 4. jump off the cliff
When you create a program for a computer, you give it a set of instructions, which it will run one at a time in order, precisely as given. If you told a computer to jump off a cliff, it would!
1. turn and face the cliff
2. walk towards the cliff
3. stop at the edge of the cliff
4. jump off the cliff
 
To stop computers from constantly falling off cliffs, they can also make choices about what to do next:
 
If I won't survive the fall, don't jump off the cliff
 
Computers never get bored and are really good at doing the same thing over and over again. Instruction 2 above might look in more detail like this:
 
 2a. left foot forward
 2b. right foot forward
 2c. go back to 2a
 
An animated GIF of a cartoon computer walking forwards, repeatedly taking a step with one foot and then with the other.
 
These three concepts are the basic logical structures in computer programming:
 
 
    1. Sequence: running instructions in order
 
    1. Selection: making choices
 
    1. Repetition: doing the same thing more than once, also called iteration
 
 
Add to these concepts the ability to deal with inputs and outputs and to store data, and you have the tools to solve the majority of all computing problems.
 

Programming languages

 
Unfortunately, computers don’t understand languages like English or Spanish, so we have to use a programming language they understand to give them instructions.
 
There are many different programming languages, all of which have their own merits, and certain languages are better suited to particular types of tasks, but there is no one language that is the ‘best’.
 
In this course, you will be programming using a language called Python. Python is one of a group of languages called “general-purpose programming languages”, which can be used to solve a wide variety of problems. Other popular languages in this category are C, Ruby, Java and BASIC.
 
This is a small Python program that asks the user to enter their name and says “Hi” to them:
 
print("Hello and welcome.")
name = input("Whats your name?")
if name == "Martin":
 print("Thats my name too!")
print("Hi " + name)
You don’t need to be a computer programmer to be able to read this code. It contains English words and it is readable (if not perhaps understandable). However, by the end of this course you will understand this code, what it does, and the concepts it uses.
Programs are often referred to as code and hence programming is also known as coding.
This article is from the free online

Programming 101: An Introduction to Python for Educators

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education