Chapter 2: What Is Code?

In this chapter, we'll look at what code actually is and why we need to use it.

You don't need to do anything for chapter 2 except read and watch. Sit back and absorb all the information.

We will be looking at why code and coding even exist. What problem did it solve that was so important?

Once we understand the problems that coding solves, it will make more sense why we should put in the effort to learn how to do it.

So why exactly do we code? What exactly is "code" anyway?

Put in the most simple terms, if you build a machine that can do a lot of different things, then telling that machine exactly what you want it to do becomes an artform in itself. This is because the machine's capabilities are so vast that simply articulating what you want it to do becomes a skill.

If it sounds like we're being vague here, it's because this principle is so universal. Far beyond coding for computers, it applies to any machine that can do anything complex.

Machines don't have brains like humans do, they are mechanical objects that can only operate in a mechanical way. So if you have a machine that can do complicated things, you need to be able to turn the instructions you give it into something mechanical so that it matches the operations of the machine.

In other words: it's not enough to just know what you want the machine to do. You need to do it on the machine's own terms. You need to follow the machine's own “rules”, or its “code of conduct”. This has been shortened to simply: “code”.

See? We just used the word "code" in its fully correct context. See what we did there?

Introducing the SoC mascot: Naughty Goose

That's what we actually mean when we say the word “code”. It's just been used so much these days to describe something we do with computers that the original meaning isn't clear anymore. A bit like when a band has a silly name that you stop noticing after a while because you love their music.

It's important to understand that the concept of coding, on its own, has NOTHING to do with computers. Computers do use code, but that's because it's convenient. Coding existed before computers did.

To see an example of this, move on to the next section, where we will look at one of the first pieces of machinery that used code. It's probably older than you think.

Continue to 2.1: Code For Clothes