Introduction to coding

Hi I’m Giles McMullen and giffgaff, the mobile network run by you, has asked me to teach you how to code.

Before we explore how to code. There are a couple of other questions that we need to answer. One of them is, why do we code in the first place? And the other question is, what does it mean to code, what is code - when you’re coding with a computer what are you actually doing?

To answer that we need to consider how a computer really works. I’ve explained this using a piece of string on my video so I won’t go into that here, but make sure you watch it as it’s an important part of learning the basics of coding.

At a very basic level, coders just provide a set of instructions for the computer to follow to tell it how to process the information of the input that it receives so that it can output hopefully what we want it to output. But, computers really only understand, two things, and those two things are zero and one. The two binary digits. So if we want to explain the world to a computer, we first have to convert it to zeros and ones.

Every electronic device or digital system that you interact with is being run by code, whether that’s a smartphone or a computer or a smart TV or the automated systems in a car or a plane or on a website, or interactions with a website.

The applications that are running on those websites are also being controlled by code. The network that enables you to connect to that website, code is controlling that, too. It is everywhere, and it really influences our lives.

My coding lesson will cover lots of things that you should consider when you begin to start learning to code including:

  • Which language to learn
  • The skills you need to acquire
  • Where to find really good resources online

Which programming language should I learn?

I have two recommendations when it comes to which programming language to learn. The first is Scratch. Scratch was designed for eight to sixteen-year-olds but it’s being used by a much wider age group than that. It’s a sort of graphical user interface and enables you to pick up the concepts of programming, without having to worry about the syntax, and you can really create some interesting projects in Scratch. It’s a very good way to dip your toe into the water of coding, without it being too daunting.

scratch.mit.edu

If you’re looking for something a little bit more serious then I definitely recommend Python as your first main programming language. Python is definitely a really good first choice as it’s domain agnostic so it can be used in lots of different settings and it’s used to run web servers. It’s also used to develop apps and in data science. It’s really versatile.

Why python? It can do anything. It really can

What skills do I need to grasp?

Get Python on your computer by installing it on the Python website or you can find it via a website that enables you to run Python. Sometimes installing Python can be a little difficult. And if you’re having problems installing it then go to a website called repl.it and you can run Python there.

Code and collaborate, without friction

Python has its own tutorial which you can follow on there and is a good place to start to learn more about how to use it.

Image of python code

The main skills that you need to get a basic understanding of with Python are listed below. Once you grasp these you will have a good idea of what to do next. This can include:

  • The print function in Python
  • What a variable is
  • What conditionals are
  • What a loop is
  • What functions are
  • How to import modules in Python

Next, you need to start learning how to solve problems. Search online for Python problems, begin with solving simple ones, and then work on the more complex ones. From there you can start to write little Python programmes that will solve problems for you and begin working on your own projects.

What online resources can I use?

Stack Overflow has answers to thousands of problems that people at all levels of programming have had with Python and other languages too. This is a really good tool and will get you well on your way to being a coder.

Screenshot of StackOverflow

I’d love to hear how you have got on learning to code. Let me know over on the giffgaff social channels Twitter, Instagram, or the giffgaff community post.