Understand what defines a programming language

Completed

In the previous unit, we talked about how learning to code is a great skill. But - what is coding?

What is code?

Lines of code are instructions that humans give to computers to make them do things. While you may hear about how smart and amazing computers are, on their own they're only good at one thing: following explicit instructions.

Code is how we tell the Moon rovers where to go and rockets how to fly. Without code, computers would be nothing more than a heap of metal. But with code, computers can perform actions beyond the reach of humans.

How do we code?

To code, or write instructions for computers, we need to write in a language that computers understand. This communication takes the form of programming languages. The code that is written in these languages is translated further into ones and zeros, called binary, that computers can read and run as actions. There are many programming languages throughout the world, all specializing in something different. In this learning path, we're going to focus on Python - a language that works well with large data problems.

Note

The people who code have many names. Some names imply different specialties. But some of the common names you might encounter are: developer, coder, and programmer. During these modules, you'll see us refer to people who write code as "developers".

Running and debugging code

After a developer has written code, they execute, or "run" it. Executing code tells the computer to read the code and perform the instructions. When you tell the computer to run the code, it will do one of two things: successfully run the code or tell you there was an error somewhere.

Errors in code are known as "bugs" and fixing them is known as "debugging". Debugging is a large part of programming and a great skill you can apply to many other aspects of life.

Debugging is essentially following the scientific method. A developer will:

  • Have a hypothesis of what should have happened
  • Gather information by walking through the code - with a tool called a debugger or by reading the code manually
  • Analyze where the execution differs from expected behavior
  • Modify the code
  • Test again