Coding Concepts (Basic)

Puneet Kumar
6 min readJun 30, 2021
Basic Coding Concepts

Coding is actually much simpler than you think! Everyone can already understand some of the basic coding concepts, even if they don’t know what they are specifically.

So what exactly does coding for look like? As it turns out, we all use coding concepts on a regular basis without even thinking about it! You would be surprised how almost anything you do in your daily life can be used as an example when explaining the concepts of computer programming. Brushing your teeth? Getting dressed? Making pancakes? All of these are examples of real-life algorithms we use daily. We’ll explain how to use these examples below

Coding Concept 1: Algorithm

If you use the word algorithm with a five year old, it probably won’t mean much them. However, they actually use algorithms on a daily basis and the concept is easy to understand. If you are looking to introduce simple coding, the best way to start is with a lesson on Algorithms.

An algorithm is an instruction given in order to complete a certain task and receive the desired result. So, a computer programmer will write an algorithm to tell the computer how to perform a certain task to produce that result.

One great example is deciding which clothes to put on when you get dressed. So, if you have just got out of the bath or shower, which piece of clothing would you put on first? You wouldn’t put your underwear on after your jeans would you? Or you wouldn’t put your t-shirt over your sweater/jumper. When getting dressed there is a certain order to put clothes on to make sure you are dressed correctly.

You can write out this algorithm in steps using a visual schedule. Students will need to put the steps in order to design the correct algorithm that will get them dressed in the proper order. Computer programmers need to break down complex steps and order them correctly. This process is called decomposition and is one of the four cornerstones of computational thinking.

Coding Concept 2: Sequence

Teaching about the concept of a sequence is a fairly easy task. Sequence is basically completing a task in a certain order. So, if we refer to algorithms above, it means putting those instructions in order. A great introduction to coding is to learn about sequencing, as this is a core skill that is foundational to many concepts across the curriculum.

You can easily integrate a lesson on sequencing by reading a popular children’s book or nursery rhyme. Break the story into pictures that explain the sequence of events in your book. For example, if you are using a popular story such as Little Red Riding Hood, you can ask students to identify the correct order of events when little red goes to grandma’s house.

Coding Concept 3: Loop

Mention the word loop and they may already have an idea of what it is about. What is a loop? Something that goes round and round again and again right?

In coding, loops allow you to repeat something again and again. Loops will repeat until you give instructions for the computer to stop. In some cases, you might tell your computer to stop after it has repeated the loop a certain number of times. In other cases, you may tell your computer to stop once a certain condition is met.

When explaining coding, it’s useful if we start with an example of something that they already do every day. For loops, an example could be how they arrive at school every day. If every day the child takes the same directions either by foot or by car, this can be considered a loop.

  • Walk out of the house to the bus stop
  • Wait for the bus
  • Get on the School Bus
  • Make 4 stops
  • Arrive at school
  • Walk to the classroom

Wouldn’t it be a lot simpler if we didn’t have to write out all these steps every time we went to school? We already do this naturally, by labeling this algorithm as our ‘getting to school’ routine. Since every day we repeat the same steps, this is a considered a loop. We may tell our computer to repeat this loop every day for 100 days. Or we may tell our computer to repeat this loop on weekdays but not weekends. These instructions help our computer know when to stop performing the loop.

Computer programmers use loops to make their programs more efficient. When students learn loops, they also become faster and more efficient. For example, learning how to get dressed for outdoor playtime goes faster when the teacher only has to say ‘get dressed’ and does not have to tell each child to put on each item of clothing separately.

Coding Concept 4: Decomposition

Decomposition means breaking down problems into smaller more manageable steps. We can teach students about decomposition by asking them to break down their everyday routines into smaller steps.

Ask your students to teach you how to brush your teeth. They may quickly jump to picking up the brush and telling you to brush. Get them to think smaller! First, you need to turn on the water, then you need to pick up your brush, then you need to put toothpaste on the brush, then you add a little water, then you take the brush and rub it back and forth across your teeth. You repeat this action until your teeth are clean. There are many steps needed to brush your teeth!

Decomposition is being able to break these tasks into small chunks that a computer can understand.

Coding Concept 5: Branch

Branching basically means checking conditions which determine the choice being made. So, in other words, making a decision depending on what is happening or what has happened.

When explaining the coding concept, you can use an example of their school day using different steps. You can start with what you would expect to happen.

1.Wake up
2.Get dressed
3.Eat breakfast
4.Brush teeth
5.Go to school
6.Come home from school
7.Play
8.Have dinner
9.Read a book
10.Go to bed

Then to go into more detail you could ask things such as:
“But what if on Wednesdays you have tennis practice after school, how would that change your day?
Or
“But on Thursday you are going out for dinner and you will get home late, so there will be no time for reading a book, so what does that mean?”

Using their routines, and the variations of their “normal” routine, can help to understand what branching means when learning coding concepts.

Bonus Coding Concept: Debug

Debugging has nothing to do with bugs and insects that we find in the garden. Though that’s what they may think though when you first introduce this coding concept.

Debugging is basically fixing an issue that you come across within the instructions in order to produce your desired result.

So, if you are talking about debugging, they basically need to understand that to debug, is to fix a potential problem. Debugging is one of my favorite coding skills to teach in the classroom, as this concept teaches skills that go well beyond the computer. There are so many benefits to teaching code, and debugging helps us build resilience and problem-solving skill essential for their future.

A good example to use is giving them steps to follow and making an error in the mistakes. So, write out a “sequence” but put one step in the wrong order.

This can easily be demonstrated using a simple maze. You can use our simple maze made with a deck of cards below or draw your own. Start out by giving instructions to the students that cause them to run into an obstacle or wall of the maze. They will soon realize that there is a “problem” with these instructions and have to figure out how they can fix them to solve the maze.

Debugging isn’t always the easiest coding concept to understand. Most children can become impatient. Many want the answer right there and then. It is an important coding concept to learn because problem-solving plays a large part in computer programming.

--

--